Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/changed-merge-queue-icon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Activity Monitor: the **Merge queue** column header, its chevron, the merge-train chip and the Merge queue popover now wear a "merge" traffic-sign glyph (an up arrow with a lane curving in from the lower right, like the W4-1 road sign) instead of the railcar, which read as a tram front. Same inline SVG, `currentColor`, hover *Merge queue*.
4 changes: 2 additions & 2 deletions src/docs/dashboard-copy-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ old name).
| `stageTrackerOrdinal` | chevron, hover, popover | — | `1st 2nd 3rd 4th … 11th 12th 13th 21st 22nd 23rd` | same |
| `stageTrackerTrainStalledWord` + `STAGE_TRACKER_TRAIN_HEAD_STALL_WORD` | chevron label (stalled train), Merge queue popover | *Merge queue stalled · head #15425 waiting for a maintainer (untrusted author) 1h21m* — painted `--yellow` on the amber active chevron, so the row read as an **empty** chevron (#15529, #15530) | rider: *Merge queue · stalled — waiting on #15425 (needs maintainer merge) · 1h21m*; head row: *Merge queue · stalled — needs maintainer merge · 1h21m*; the why comes from `head_state` (`needs-human` → *needs maintainer merge* / *needs a human decision*, `ci` → *waiting for CI*, `soaking` → *soak overran*, `ready` → *waiting for a merge sweep*, `merging` → *merge call in flight*, `fixing` → *being fixed by its author*, `unknown` → *head not in this view*); an unmapped `merge_train.state` falls back to its humanised name + place (*Waiting for front · 3rd*), never `''`; `.ham-seg.active .ham-queue-stalled` inherits the chevron's text colour | `TestStageTrackerMergeTrainStateSlugsNeverLeak` (every state × stalled × head_state × place), `TestStageTrackerMergeTrainPayloadStates` |
| `stageTrackerTrainQueueTip` | chevron hover | *Behind #15253 … Estimated turn: ~25m.* / *Front of the merge queue* | *2nd of 6 in the merge queue · behind #15253 · ETA ~25m.* / *1st of 6 in the merge queue · merges next · ETA ~4m.*; *· merge sweep running* lives here only (one label per chevron, #15416) | same |
| `stageTrackerTrainHeaderText` + `stageTrackerTrainIconHtml` | train header chip | `⛓ merge train · 2 PRs · front #15400` | 🚆 (inline-SVG railcar, hover *Merge queue*) `merge train · 2 PRs · 1st: #15400` | `TestStageTrackerMergeTrain` |
| `stageTrackerTrainHeaderText` + `stageTrackerTrainIconHtml` | train header chip | `⛓ merge train · 2 PRs · front #15400` | (inline-SVG merge sign, hover *Merge queue*) `merge train · 2 PRs · 1st: #15400` | `TestStageTrackerMergeTrain` |
| `stageTrackerQueueMemberState` (`tracker-queue.js`) | Merge queue popover | *front of the queue* | *merges next* | `TestStageTrackerMergeQueuePopover` |
| `stageTrackerAnchor` (`tracker-row-anchor.js`) | which column lights | a 1st-in-train head at 050/070 lit **CI / Review** | every train state lights **Merge queue** | `TestStageTrackerMergeTrainStatesLightMergeColumn` |
| `stageTrackerHeaderHtml` | column header | *Merge gate* | 🚆 *Merge queue* (same icon as the chip and the 080 chevron) | `TestStageTrackerHeader…` |
| `stageTrackerHeaderHtml` | column header | *Merge gate* | *Merge queue* led by the merge-sign icon (same icon as the chip and the 080 chevron) | `TestStageTrackerHeader…` |
| Go: `prstage.MergeTrain.Sentence`, `stageTrackerMergeTrainFrontCaption`, `eta_basis` | gate reason, caption, hover | *front of the merge train (1st of 3)*, *Front of a merge train of N PRs* | *1st in the merge queue; merges next (1st of 3)*, *1st in a merge queue of N PRs* | `TestParseMergeTrainRejectsMalformed` |
| "merge gate" in decision copy (`delegatedecision` glossary, ladder, dashboard decided/new/vocabulary) | glossary, ⋯ hints, PR comments | *the merge gate merges it once every check passes* | *the merge queue merges it …* | `TestStageTrackerDecisionGlossaryMirrorsGo` |

Expand Down
4 changes: 2 additions & 2 deletions src/docs/dashboard-sections/activity-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ re-checked on <sha>* until it merges or is released; that is expected, not a dro
batch. The row never says *preparation* or *unverified* — those are the scheduler's
words, kept in the data ([#17335](https://github.com/hivecommons/hive/issues/17335)).

When several approved PRs to the same base touch the same files, the automerge lanes merge them one at a time ([#15117](https://github.com/hivecommons/hive/issues/15117)). The tracker renders every train contiguously, in merge order, with a thin left rail linking the rows and a header chip `🚆 merge train · 4 PRs · 1st: #15074` — the glyph is an inline-SVG railcar (14px, currentColor, hover *Merge queue*), the same icon the **Merge queue** column header and its chevrons wear; overlapping files are listed beside it. Pill wording per state is the PR's place in the queue (the owner's words — `front` and `queued-behind` appear nowhere a person reads): the head reads "Queued for merge · 1st of 4 · ~13m" (its own soak left plus the next pass); the others "Queued for merge · 2nd of 4 · ~4m", "Queued for merge · 3rd of 4", … (`1st 2nd 3rd 4th … 11th 12th 13th 21st`, always with the queue length, countdown to its turn); when the page draws more than one train each queue word ends with its train's tag — "Queued for merge · 1st of 2 · train main.go" (the first overlapping file's basename, else the head `#N`) — and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*, so two "1st"s on one page tell apart (one train → no tag); the header and every member row of a train share one rail accent (`.ham-train-k0…k3`, cycling in page order); once the front merged and the hive is rebasing a conflicting sibling, "Rebasing · attempt 1/2"; when the loop guard (`auto_merge.merge_train.max_rebase_attempts`) is spent, "Needs human decision · rebase failed twice" at stage/085 with the decision option "Rebase, then merge as maintainer".
When several approved PRs to the same base touch the same files, the automerge lanes merge them one at a time ([#15117](https://github.com/hivecommons/hive/issues/15117)). The tracker renders every train contiguously, in merge order, with a thin left rail linking the rows and a header chip `merge train · 4 PRs · 1st: #15074` led by the queue icon — the glyph is an inline-SVG merge sign — an up arrow with a lane curving in from the lower right, the W4-1 road sign (14px, currentColor, hover *Merge queue*; [#17459](https://github.com/hivecommons/hive/issues/17459)), the same icon the **Merge queue** column header and its chevrons wear; overlapping files are listed beside it. Pill wording per state is the PR's place in the queue (the owner's words — `front` and `queued-behind` appear nowhere a person reads): the head reads "Queued for merge · 1st of 4 · ~13m" (its own soak left plus the next pass); the others "Queued for merge · 2nd of 4 · ~4m", "Queued for merge · 3rd of 4", … (`1st 2nd 3rd 4th … 11th 12th 13th 21st`, always with the queue length, countdown to its turn); when the page draws more than one train each queue word ends with its train's tag — "Queued for merge · 1st of 2 · train main.go" (the first overlapping file's basename, else the head `#N`) — and the hover leads *Train of 2 PRs overlapping main.go; merges after #15567.*, so two "1st"s on one page tell apart (one train → no tag); the header and every member row of a train share one rail accent (`.ham-train-k0…k3`, cycling in page order); once the front merged and the hive is rebasing a conflicting sibling, "Rebasing · attempt 1/2"; when the loop guard (`auto_merge.merge_train.max_rebase_attempts`) is spent, "Needs human decision · rebase failed twice" at stage/085 with the decision option "Rebase, then merge as maintainer".

The tooltip lists the PRs ahead and the overlapping files. Waiting siblings are never red, never `needs human`; a `needs-rebase` label on one is reported under `stale_labels`, the train repairs it. Each item carries `merge_gate.state` (`queued-behind` / `rebasing` / `rebase-exhausted` / `front`, with an honest `reason` such as `behind #15074 in merge train (3rd of 4, overlapping files: stage_tracker.go, index.html)`) and `merge_train{id, state, front, position, size, attempt, max_attempts, overlap_files, ahead, members}`; the id is `<base>#<front>` and `members` is the whole roster in merge order.

Expand All @@ -292,7 +292,7 @@ The tooltip lists the PRs ahead and the overlapping files. Waiting siblings are
**One PR per issue** ([#15395](https://github.com/hivecommons/hive/issues/15395)). Two open PRs declaring the same `Fixes #N` never both ride the queue (hive's own #15402 and #15407, both for #15396, once sat side by side as "waiting its turn"). Before the trains are grouped the sweep keeps one PR per closing issue — a green head (not conflicting, not blocked on a red required check) beats a red one; among equals the earlier-opened wins — and holds the other out of every train with the stage reason `merge-train:duplicate-of#<winner>:<issue>/0:0/0:`. The held row's gate reads `duplicate-of:<winner>` (`merge_gate.duplicate_of`, `merge_gate.duplicate_issue`), its chip **Duplicate of #15402 · needs a pick** with no clock, it carries no `merge_train`, and it wears `needs-decision` so both PRs sit under their issue with the hold visible. *Let hive decide* on either row takes the existing supersede path (rule `one-pr-per-issue`): on the held PR it closes it as superseded by the kept one with a credit comment, through the same write gate as every delegate close; on the kept PR it releases it and names the duplicate the queue holds (or, if the kept PR has since gone red, only recommends the fix — the queue re-picks on its next pass, so an earlier red PR yields to a later green one).

- **Countdown to auto-merge.** `eta_s` is the member's own remaining soak, plus — for each PR ahead — its remaining soak or, with no clock of its own, one sweep (the lanes' floor cadence), plus the wait for the next sweep tick; `eta_basis` is the short reading ("2 ahead · head soaking 12m · next pass in 40s"). The chip's `· ~4m` counts down in place from `eta_at` on the same tick as the soak clock, and `eta_at` is anchored server-side to the member's first estimate at its position (re-anchored only when a fresh estimate runs more than a sweep longer), so a poll re-render never resets it. Past the estimate it reads *any moment now*; past twice the first estimate `late` is set and the chip reads *running late* with the estimate kept in the hover. Always a `~`: an estimate, not a promise. A head on a person, on CI or being fixed — or a member that is itself a person's — carries no estimate and the blocker instead.
- **Merge queue popover.** The sticky bar's **🚆 Merge queue N** chip (hidden with no train) opens a popover listing every train in merge order — ordinal, #, title, state in words, ETA — with the head's blocker on the front row; same pattern as the **Merged** popover (click outside / Escape closes).
- **Merge queue popover.** The sticky bar's **Merge queue N** chip (led by the merge-sign icon) (hidden with no train) opens a popover listing every train in merge order — ordinal, #, title, state in words, ETA — with the head's blocker on the front row; same pattern as the **Merged** popover (click outside / Escape closes).
- **Who rides.** A PR GitHub reports conflicting (`mergeable: CONFLICTING` / `DIRTY`) on its own, or one at **072 Returned to contributor** (by label or by the hive's stage record), is neither a member nor counted in the queue's length and draws no train idle comment — hive's own #15307 once read `queued-behind#15424:4/6` while conflicting at 072. A conflicting PR rides only while the train itself is repairing it (its rebase was requested behind a merged head and the loop guard still has attempts).
- **Stall warning.** Once the head has sat in one stage longer than `governor.merge_train_stall_warn_s` (default 3600) and is not merging — a soaking head counts only once its own clock has overrun — every member's chip turns to **Merge queue · stalled — waiting on #15253 (waiting for CI) · 3h** (the head's own row: **Merge queue · stalled — waiting for CI · 3h**; an untrusted-author head reads *needs maintainer merge*), the popover marks the train, and the activity log records one `merge train stalled` line per train per hour.

Expand Down
4 changes: 3 additions & 1 deletion src/pkg/dashboard/stage_tracker_merge_train_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ assert.strictEqual(stageTrackerTrainHeaderText(front.merge_train), 'merge train
const ico = stageTrackerTrainIconHtml('ham-train-icon');
assert.ok(ico.startsWith('<svg class="ham-train-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor"'), ico);
assert.ok(ico.includes('<title>Merge queue</title>') && ico.includes('aria-label="Merge queue"'), ico);
assert.ok(ico.includes(STAGE_TRACKER_TRAIN_ICON_PATH) && (ico.match(/<circle/g) || []).length === 2, 'two wheels: ' + ico);
// A merge sign (hivecommons/hive#17459): one path, an arrow shaft (V3), its
// head (l3-3 3 3) and a lane curving in from the lower right (c…); no railcar.
assert.ok(ico.includes(STAGE_TRACKER_TRAIN_ICON_PATH) && /<path [^>]*d="M6 14\.5V3M3 6l3-3 3 3M13 14\.5c/.test(ico) && !ico.includes('<circle') && !ico.includes('<rect'), 'merge sign: ' + ico);
assert.strictEqual(STAGE_TRACKER_ICONS[80], STAGE_TRACKER_TRAIN_ICON_PATH);
assert.ok(rows[0].html.includes(ico), rows[0].html);
assert.strictEqual(stageTrackerTrainRowClass(front, null, second), ' ham-train ham-train-front');
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/dashboard/stage_tracker_ui_rows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ assert.strictEqual(stageTrackerSortKey({ kind: 'pr', stage: 72 }, stages).anchor
const head = stageTrackerHeaderHtml(stages);
assert.deepStrictEqual(Array.from(head.matchAll(/<span class="ham-seg-t">(?:<svg[\s\S]*?<\/svg>)?([^<]*)<\/span>/g)).map(m => m[1]), ['Open', 'Actionable', 'Claimed', 'PR in progress', 'CI', 'Review', 'Merge queue']);
// The Merge queue column wears the train icon (hover "Merge queue"), the
// same railcar as the train header chip and the 080 chevron (#15395).
// same merge sign as the train header chip and the 080 chevron (#15395, #17459).
assert.ok(head.includes('<span class="ham-seg-t">' + stageTrackerTrainIconHtml('ham-ico ham-train-icon ham-col-ico') + 'Merge queue</span>'), head);
assert.strictEqual((head.match(/<title>Merge queue<\/title>/g) || []).length, 1);
assert.ok(head.includes('<span class="ham-since">since</span>'));
Expand Down
4 changes: 2 additions & 2 deletions src/pkg/dashboard/static-src/js/tracker-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@
// as one duplicated glyph (operator, 2026-11-03).
50: '<path d="M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z"/><circle cx="8" cy="8" r="2"/>',
ci: '<path d="M5.5 1.5h5M6.5 1.5v4.6L2.6 12.9a1 1 0 0 0 .9 1.6h9a1 1 0 0 0 .9-1.6L9.5 6.1V1.5"/><path d="M4.4 10.5h7.2"/>',
// Merge queue: the same railcar as the column header and train chip
// Merge queue: the same merge sign as the column header and train chip
// (STAGE_TRACKER_TRAIN_ICON_PATH in tracker-words.js; a test keeps them equal).
80: '<rect x="2" y="3.5" width="12" height="7" rx="1.5"/><path d="M2 7.5h12M6.5 3.5v4M10.5 3.5v4M4 13.5l-1.5 1.5M12 13.5l1.5 1.5"/><circle cx="5" cy="12.5" r="1.5"/><circle cx="11" cy="12.5" r="1.5"/>',
80: '<path stroke-width="2" d="M6 14.5V3M3 6l3-3 3 3M13 14.5c0-3.8-3.4-4.6-7-6.5"/>',
100: '<path d="M3 5h10M3 8h10M3 11h10"/>',
110: '<path d="M3 8l3 3 7-7"/>',
history: '<path d="M2 8a6 6 0 1 0 6-6 6.5 6.5 0 0 0-4.5 1.83L2 5.33"/><path d="M2 2v3.33h3.33"/><path d="M8 4.67V8l2.67 1.33"/>',
Expand Down
15 changes: 9 additions & 6 deletions src/pkg/dashboard/static-src/js/tracker-words-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,16 @@
const STAGE_TRACKER_TRAIN_STATE_QUEUED = 'queued-behind';
const STAGE_TRACKER_TRAIN_STATE_REBASING = 'rebasing';
const STAGE_TRACKER_TRAIN_STATE_EXHAUSTED = 'rebase-exhausted';
// The merge-queue icon: a side-view railcar on two wheels (14px,
// currentColor) — the owner read the old ⛓ as a scribble. One path for
// the Merge queue column header, the train header chip and the queue
// popover, so the picture means the same thing everywhere.
const STAGE_TRACKER_TRAIN_ICON_PATH = '<rect x="2" y="3.5" width="12" height="7" rx="1.5"/><path d="M2 7.5h12M6.5 3.5v4M10.5 3.5v4M4 13.5l-1.5 1.5M12 13.5l1.5 1.5"/><circle cx="5" cy="12.5" r="1.5"/><circle cx="11" cy="12.5" r="1.5"/>';
// The merge-queue icon: a "merge" traffic sign (US W4-1) — an up arrow
// with a second lane curving in from the lower right and joining the
// shaft mid-height (14px, currentColor). The owner read the old ⛓ as a
// scribble and the railcar that replaced it as a tram front
// (hivecommons/hive#17459). One path for the Merge queue column header,
// the 080 chevron, the train header chip and the queue popover, so the
// picture means the same thing everywhere.
const STAGE_TRACKER_TRAIN_ICON_PATH = '<path stroke-width="2" d="M6 14.5V3M3 6l3-3 3 3M13 14.5c0-3.8-3.4-4.6-7-6.5"/>';
const STAGE_TRACKER_TRAIN_ICON_TITLE = 'Merge queue';
// Pure: the inline-SVG train with its "Merge queue" hover.
// Pure: the inline-SVG merge sign with its "Merge queue" hover.
function stageTrackerTrainIconHtml(cls, title) {
const label = title || STAGE_TRACKER_TRAIN_ICON_TITLE;
return `<svg class="${esc(cls || 'ham-train-icon')}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="${esc(label)}"><title>${esc(label)}</title>${STAGE_TRACKER_TRAIN_ICON_PATH}</svg>`;
Expand Down
19 changes: 11 additions & 8 deletions src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15961,13 +15961,16 @@ <h3 class="faq-group-title">Where to get help</h3>
const STAGE_TRACKER_TRAIN_STATE_QUEUED = 'queued-behind';
const STAGE_TRACKER_TRAIN_STATE_REBASING = 'rebasing';
const STAGE_TRACKER_TRAIN_STATE_EXHAUSTED = 'rebase-exhausted';
// The merge-queue icon: a side-view railcar on two wheels (14px,
// currentColor) — the owner read the old ⛓ as a scribble. One path for
// the Merge queue column header, the train header chip and the queue
// popover, so the picture means the same thing everywhere.
const STAGE_TRACKER_TRAIN_ICON_PATH = '<rect x="2" y="3.5" width="12" height="7" rx="1.5"/><path d="M2 7.5h12M6.5 3.5v4M10.5 3.5v4M4 13.5l-1.5 1.5M12 13.5l1.5 1.5"/><circle cx="5" cy="12.5" r="1.5"/><circle cx="11" cy="12.5" r="1.5"/>';
// The merge-queue icon: a "merge" traffic sign (US W4-1) — an up arrow
// with a second lane curving in from the lower right and joining the
// shaft mid-height (14px, currentColor). The owner read the old ⛓ as a
// scribble and the railcar that replaced it as a tram front
// (hivecommons/hive#17459). One path for the Merge queue column header,
// the 080 chevron, the train header chip and the queue popover, so the
// picture means the same thing everywhere.
const STAGE_TRACKER_TRAIN_ICON_PATH = '<path stroke-width="2" d="M6 14.5V3M3 6l3-3 3 3M13 14.5c0-3.8-3.4-4.6-7-6.5"/>';
const STAGE_TRACKER_TRAIN_ICON_TITLE = 'Merge queue';
// Pure: the inline-SVG train with its "Merge queue" hover.
// Pure: the inline-SVG merge sign with its "Merge queue" hover.
function stageTrackerTrainIconHtml(cls, title) {
const label = title || STAGE_TRACKER_TRAIN_ICON_TITLE;
return `<svg class="${esc(cls || 'ham-train-icon')}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="${esc(label)}"><title>${esc(label)}</title>${STAGE_TRACKER_TRAIN_ICON_PATH}</svg>`;
Expand Down Expand Up @@ -18155,9 +18158,9 @@ <h3 class="faq-group-title">Where to get help</h3>
// as one duplicated glyph (operator, 2026-11-03).
50: '<path d="M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z"/><circle cx="8" cy="8" r="2"/>',
ci: '<path d="M5.5 1.5h5M6.5 1.5v4.6L2.6 12.9a1 1 0 0 0 .9 1.6h9a1 1 0 0 0 .9-1.6L9.5 6.1V1.5"/><path d="M4.4 10.5h7.2"/>',
// Merge queue: the same railcar as the column header and train chip
// Merge queue: the same merge sign as the column header and train chip
// (STAGE_TRACKER_TRAIN_ICON_PATH in tracker-words.js; a test keeps them equal).
80: '<rect x="2" y="3.5" width="12" height="7" rx="1.5"/><path d="M2 7.5h12M6.5 3.5v4M10.5 3.5v4M4 13.5l-1.5 1.5M12 13.5l1.5 1.5"/><circle cx="5" cy="12.5" r="1.5"/><circle cx="11" cy="12.5" r="1.5"/>',
80: '<path stroke-width="2" d="M6 14.5V3M3 6l3-3 3 3M13 14.5c0-3.8-3.4-4.6-7-6.5"/>',
100: '<path d="M3 5h10M3 8h10M3 11h10"/>',
110: '<path d="M3 8l3 3 7-7"/>',
history: '<path d="M2 8a6 6 0 1 0 6-6 6.5 6.5 0 0 0-4.5 1.83L2 5.33"/><path d="M2 2v3.33h3.33"/><path d="M8 4.67V8l2.67 1.33"/>',
Expand Down
Loading