merge-steward 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,10 +34,28 @@ export function QueueListView({ entries, recentlyCompleted, selectedEntryId, rec
34
34
  const displayedEvents = useMemo(() => recentEvents.slice(-eventRows), [eventRows, recentEvents]);
35
35
  const queueBlockLabel = summarizeQueueBlock(queueBlock);
36
36
  // Spec chain: main ─ #A ✓ ─ #B ● ─ #C ○
37
+ // Includes recently completed entries so the cascade stays visible.
38
+ // Deduplicates by prNumber (not entry ID) so re-admitted PRs don't
39
+ // appear twice — the active entry wins over the terminal one.
37
40
  const chainEntries = useMemo(() => {
38
- const active = entries.filter((e) => !TERMINAL_STATUSES.includes(e.status));
39
- return active.sort((a, b) => a.position - b.position);
40
- }, [entries]);
41
+ const seenPR = new Set();
42
+ const all = [];
43
+ // Active entries take priority.
44
+ for (const e of entries) {
45
+ if (!TERMINAL_STATUSES.includes(e.status) && !seenPR.has(e.prNumber)) {
46
+ all.push(e);
47
+ seenPR.add(e.prNumber);
48
+ }
49
+ }
50
+ // Recently completed fill in — only if no active entry for that PR.
51
+ for (const e of recentlyCompleted) {
52
+ if (!seenPR.has(e.prNumber)) {
53
+ all.push(e);
54
+ seenPR.add(e.prNumber);
55
+ }
56
+ }
57
+ return all.sort((a, b) => a.position - b.position);
58
+ }, [entries, recentlyCompleted]);
41
59
  return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [chainEntries.length > 0 && (_jsxs(Box, { marginBottom: 1, gap: 0, children: [_jsx(Text, { dimColor: true, children: "main" }), chainEntries.map((entry) => {
42
60
  const ci = ciStatusIcon(entry);
43
61
  return (_jsxs(Box, { gap: 0, children: [_jsx(Text, { dimColor: true, children: " \u2500 " }), _jsxs(Text, { bold: true, children: ["#", entry.prNumber] }), _jsx(Text, { color: ci.color, children: ` ${ci.icon}` })] }, entry.id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merge-steward",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Serial merge queue for GitHub — rebase, CI-gate, and merge PRs one at a time",
5
5
  "type": "module",
6
6
  "repository": {