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/fixed-one-lit-stage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Activity Monitor: a row lights exactly one stage chevron. When a push lands during review, CI is the lit chevron and Review is dim with a muted "re-review queued" note instead of a second amber chevron; the base-refresh detail line reads in plain words (no "preparation"/"unverified" jargon, each signal said once); the muted `stage ↓` pill now reads "stage reset" / "stage reset by push" (#17335).
16 changes: 9 additions & 7 deletions src/docs/dashboard-sections/activity-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ An Open issue waiting on a maintainer's triage reads **Triage needed Β· since 28

At most one health chip sits over the strip's cap, with `+N` for the rest: `stalled`, `regressed`, `hold`, `needs-human`, `needs-decision` (β€œneeds human decision”), `needs-triage` (β€œtriage needed”), `needs-rebase`, `blocked` or `draft`. At 015 the chevron already names triage; before claim, a lingering `needs-triage` can be a chip (010/017/045). At 020+ it is stale and omitted from chip/stage text: `stale_labels` supplies a muted *Stale label* tooltip until the sweep removes it ([#14586](https://github.com/hivecommons/hive/issues/14586)).

A genuine backward hop sets `regressed`; the first forward hop clears it. Lapsed claims 020β†’010, 030↔020 flicker and 040β†’010 after a partial merge are not regressions. A regression parked on a person is red. Otherwise it is a muted dashed **stage ↓**, yields to other modifiers and does not enter **Needs attention**: β€œthe hive is handling it β€” no action needed; clears on the next forward step.” See [The regressed marker](../labels-and-control-signals.md#the-regressed-marker-when-it-is-set-when-it-clears).
A genuine backward hop sets `regressed`; the first forward hop clears it. Lapsed claims 020β†’010, 030↔020 flicker and 040β†’010 after a partial merge are not regressions. A regression parked on a person is red. Otherwise it is a muted dashed **stage reset** β€” **stage reset by push** when a new head caused the fall ([#17335](https://github.com/hivecommons/hive/issues/17335)) β€” yields to other modifiers and does not enter **Needs attention**: β€œthe hive is handling it β€” no action needed; clears on the next forward step.” See [The regressed marker](../labels-and-control-signals.md#the-regressed-marker-when-it-is-set-when-it-clears).

The reason, actor, nudges, repository, flags and recent stage hops live on the `#N` tooltip (the PR link for a nested row). Titles wrap before their column edges and show full text on hover. Hairlines and whole-row hover keep the chip and age attached to the right row ([#14640](https://github.com/hivecommons/hive/issues/14640)). Passed/upcoming chevrons, kind/author icons, chips and `since` have no separate hover text.

Expand Down Expand Up @@ -270,8 +270,10 @@ A lone ticket draws no header: one owner (or one waiter) is the base-refresh loc
holder, not a train, so its row comment carries the role and verification state and
the header's count and front only appear once two recorded tickets share the base.
A refreshed owner is the usual lone ticket β€” `update-branch` moves its head, so the
ticket reads *Recorded preparation owner Β· unverified Β· Head changed* until it merges
or is released; that is expected, not a dropped batch.
ticket reads *Recorded first for the base refresh Β· ticket issued for an earlier head Β·
re-checked on <sha>* until it merges or is released; that is expected, not a dropped
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".

Expand Down Expand Up @@ -309,7 +311,7 @@ Issues on their own stages (Open, 010, 020, 045) keep every pill: a `needs-human
| `hold` | actionable now | always, whether set by a person or Hive; release rules still depend on provenance |
| `draft` | actionable now | always (the author's move) |
| `stalled` | actionable now | always |
| `regressed` | actionable now | always; muted `stage ↓` unless the row is parked on a person (see above) |
| `regressed` | actionable now | always; muted `stage reset` (`stage reset by push` after a new head) unless the row is parked on a person (see above) |
| `needs-rebase`, `blocked`, `triage needed`, `possible dupe` | actionable now | always |
| `unauthorized` β€” `unauthorized:approve-workflow-runs` | actionable now | always β€” the carve-out: held workflow runs mean CI cannot even start, and waiting for the gate would waste the whole CI / review cycle (rationguard#397 at 072) |
| `unauthorized` β€” any other step (merge, branch update, no step named) | merge gate | PR at stage/080 or later |
Expand Down Expand Up @@ -442,17 +444,17 @@ E.g. `At Merge queue β€” waiting on CI.` / `You chose Approve Β· 15:55 (5 min ag

#### Legend β€” the three cues a row may carry

The *state pill* says where the item is and what it is waiting on (`hold`, `needs human`, `stage ↓` …). The *working* cue on the lit chevron says Hive is doing something in that stage now; its tooltip explains the work. The *decision badge* (history mark with count) says a person acted here and what followed. These are separate signals: a recorded decision does not mean the requested effect happened.
The *state pill* says where the item is and what it is waiting on (`hold`, `needs human`, `stage reset` …). The *working* cue on the lit chevron says Hive is doing something in that stage now; its tooltip explains the work. The *decision badge* (history mark with count) says a person acted here and what followed. These are separate signals: a recorded decision does not mean the requested effect happened.

Plain words throughout β€” working / waiting on X / set back by Y / merged β€” nothing else blinks.

#### Chevron activation β€” the canonical rules

An *active* chevron is filled amber and carries words; an inactive one is its icon alone (CI / Review: the ring, green when the last run on this head passed, red when it failed, neutral when not yet run), with the counts in its tooltip. On every strip:

1. **1 ≀ active ≀ 2.** At least one chevron is active β€” the column where the item is or where it is stuck.
1. **Exactly one lit stage per row.** One chevron is active β€” the column where the item is or where it is stuck; later stages are shown dim, with a muted queued note when they are next ([#17335](https://github.com/hivecommons/hive/issues/17335): a push during review lit *CI 7/11 Β· 4 running* and *Review 5/5 Β· adjudicating* amber together).
2. **CI and Review resolve first.** A track is active only while it genuinely runs on the current head (a check-run in progress or queued, a ring not yet full; a reviewer running or queued). If either runs, the PR is waiting on it: the stage chevron (PR in progress, Merge queue …) renders settled-current β€” filled but still, icon only, its words in the tooltip β€” and nothing else is active.
3. **CI + Review is the only pair.** Two chevrons are active together only when both tracks run at once; every other combination is exactly one active chevron. The stage chevron is the β‰₯ 1 fallback: active only when no track is in motion.
3. **CI leads Review.** When both tracks would light at once β€” CI running while the review is queued, in progress or being re-adjudicated β€” CI is the lit chevron and Review is dim with a small note (*re-review queued* after a push, *review in progress*, *review queued*); its words stay in the tooltip, ending *… behind CI*. The stage chevron is the fallback: active only when no track is in motion.
4. **The PR in progress chevron speaks the PR's lifecycle** β€” draft, pushed, rebasing, *Unassigned Β· next: scanner*, *Waiting for @author Β· fix owed* β€” never a CI or review verdict. *CI failing*, *CI 4/11 Β· 1 failing* and *changes requested* are the CI and Review chevrons' words; the PR in progress tooltip keeps the red reason as detail.
5. **The CI and Review tooltips state what the track waits on β€” never "activity unknown".** With no verdict and no reviewer in flight the spoke derives the Review statement from what it already knows, in this order: the PR is merged or closed (*Review Β· n/a (closed)*), it is a draft (*Review Β· draft, not requested*), CI on the head has not finished (*Review Β· waiting for CI*), CI is done and nobody started (*Review Β· not started Β· hive reviewer next*, or *Β· needs reviewer* when the repo has no hive reviewer lane). A settled verdict explains itself β€” *Changes requested by the hive reviewer: 1 perspective posted findings … Β· 12m ago Β· quality βœ“ Β· security βœ—: token logged* β€” and stays known as its observation ages. The one no-data wording, *Review Β· no data for head f269349 yet Β· refreshing* (CI: *CI Β· no checks observed for head … yet Β· refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step.

Expand Down
3 changes: 2 additions & 1 deletion src/docs/labels-and-control-signals/stage-labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ How the chip renders depends on whether a person is in the loop. On a
hive-driven stage with no human-gate modifier (`hold`, `needs-human`,
`needs-decision`, `needs-rebase`, `blocked`, `stalled`) and off the
human-gated stages (045 / 071 / 072 / 085 / 090), it draws as a muted,
dashed `stage ↓` pill whose hover text names the fall and ends "the hive is
dashed `stage reset` pill (`stage reset by push` when a new head caused the
fall) whose hover text names the fall and ends "the hive is
handling it β€” no action needed; clears on the next forward step", and the
row stays out of **Needs attention** and keeps its ordinary headline. Only a
regression on a human-gated row keeps the red `regressed` pill and the
Expand Down
24 changes: 15 additions & 9 deletions src/pkg/dashboard/stage_tracker_activity.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function constLine(source, name) {
return match[0];
}
const trackConsts = ['STAGE_TRACKER_WORKFLOW_APPROVAL_BLOCKER', 'STAGE_TRACKER_PENDING_CHECKS_NAMED', 'STAGE_TRACKER_WORKFLOW_APPROVAL_TIP', 'STAGE_TRACKER_RING_SEGMENT_GAP_MAX', 'STAGE_TRACKER_RING_RADIUS', 'STAGE_TRACKER_RING_GAP_DEG'].map(name => constLine(strip, name)).join('\n');
const trackFns = ['stageTrackerHiveOwesReReview', 'stageTrackerTrackLead', 'stageTrackerWaitingOnPerson', 'stageTrackerTrackRunning', 'stageTrackerWorkflowApprovalPending', 'stageTrackerRingSvg', 'stageTrackerStalledTrack', 'stageTrackerQueueAheadWord', 'stageTrackerStageTrack', 'stageTrackerHiveOwnsRepair', 'stageTrackerTrackWord', 'stageTrackerAgoWord', 'stageTrackerActivityTrackHtml'].map(name => fn(strip, name)).join('\n');
const trackFns = ['stageTrackerHiveOwesReReview', 'stageTrackerTrackLead', 'stageTrackerWaitingOnPerson', 'stageTrackerTrackRunning', 'stageTrackerWorkflowApprovalPending', 'stageTrackerRingSvg', 'stageTrackerStalledTrack', 'stageTrackerQueueAheadWord', 'stageTrackerStageTrack', 'stageTrackerHiveOwnsRepair', 'stageTrackerTrackWord', 'stageTrackerAgoWord', 'stageTrackerQueuedTrackNote', 'stageTrackerActivityTrackHtml'].map(name => fn(strip, name)).join('\n');
const track = new Function('esc', 'stageTrackerIcon', trackConsts + '\n' + trackFns + ';return stageTrackerActivityTrackHtml;')(esc, (n, cls) => `<svg class="${cls}" data-icon="${n}"></svg>`);
const getAnchor = new Function(globals + anchor + ';return stageTrackerAnchor;')();
const header = new Function('esc', 'stageTrackerIcon', globals + fn(strip, 'stageTrackerHeaderHtml') + ';return stageTrackerHeaderHtml;')(esc, () => '');
Expand Down Expand Up @@ -123,7 +123,7 @@ function stageTrackerActorKind() { return ''; }
function stageTrackerActorTip() { return ''; }
function stageTrackerMotion() { return STAGE_TRACKER_MOTION_STATIC; }
function stageTrackerIcon(n) { return '<svg data-icon="' + n + '"></svg>'; }
` + fn(strip, 'stageTrackerWaitingOnPerson') + fn(strip, 'stageTrackerTrackRunning') + fn(strip, 'stageTrackerStageTrack') + fn(strip, 'stageTrackerStalledTrack') + fn(strip, 'stageTrackerStripItems') + ';return stageTrackerStripItems;')(esc, segments, track, ...Object.values(helpers));
` + fn(strip, 'stageTrackerWaitingOnPerson') + fn(strip, 'stageTrackerTrackRunning') + fn(strip, 'stageTrackerStageTrack') + fn(strip, 'stageTrackerStalledTrack') + fn(strip, 'stageTrackerTrackWouldLight') + fn(strip, 'stageTrackerLeadTrack') + fn(strip, 'stageTrackerQueuedTrackNote') + fn(strip, 'stageTrackerStripItems') + ';return stageTrackerStripItems;')(esc, segments, track, ...Object.values(helpers));
const renderStrip = makeStripRenderer();

function physicalTracks(item) {
Expand Down Expand Up @@ -531,8 +531,11 @@ test('current phase, running activity, failure and successful completion are ind
const cells = physicalTracks(livePR({ ci_activity: activity(state, caption, running) }));
assert.ok(cells.ci.includes('ham-activity-track ' + cls + ' ham-current'), state + ' β†’ ' + cls + ': ' + cells.ci);
assert.equal(cells.ci.includes('data-motion="active"'), running);
// The stage's own track (review, 050) is active with words (#16599).
assert.match(cells.review, /active ham-current[^]*data-activity-state="unknown"/);
// The stage's own track (review, 050) is active with words (#16599) β€”
// unless CI runs, when CI leads and Review is dim with a queued note
// (exactly one lit chevron, hivecommons/hive#17335).
if (running) assert.match(cells.review, /todo ham-track-queued ham-current[^]*data-activity-state="unknown"[^]*<span class="ham-track-note">review queued<\/span>/);
else assert.match(cells.review, /active ham-current[^]*data-activity-state="unknown"/);
}
const admitted = physicalTracks(livePR({ stage: 80, ci_activity: activity('passing', 'CI green Β· all 2 required checks passed'), review_activity: activity('approved', 'Review approved') }));
assert.doesNotMatch(admitted.ci + admitted.review, /ham-current|aria-current/);
Expand Down Expand Up @@ -905,7 +908,7 @@ test('#16484: count grammar β€” CI passed/total and Review done/total across eve
assert.equal(word({ head: 'h' }, 'review', false), '');
});

test('#16484: the three screenshot rows β€” both tracks lit with counts, swarm requested, red CI beside a done review', () => {
test('#16484: the three screenshot rows β€” CI leads with counts, swarm requested dim behind it, red CI beside a done review', () => {
const head = 'd3c0824304d4c97b8ee76a267fb1e91f6d4c79a4';
const fresh = (state, extra = {}) => ({ head, state, caption: state, source: 'cache', observed_at: new Date(now).toISOString(), ...extra });
const text = cell => cell.match(/aria-describedby="[^"]+">([^]*?)<span id=/)[1].replace(/<[^>]*>/g, '');
Expand All @@ -925,11 +928,14 @@ test('#16484: the three screenshot rows β€” both tracks lit with counts, swarm r
// #16491: review swarm requested, no bundle yet; CI shows its count.
cells = physicalTracks(livePR({ head, stage: 50, display_column: 50,
ci_activity: fresh('running', { checks_passed: 2, checks_total: 14 }), review_activity: fresh('unassigned', { perspectives_done: 0, perspectives_total: 5, blocker: 'no reviewer free' }) }));
// #16599: at 050 the Review column is the stage's own track β†’ active with
// words even while only queued; CI runs beside it (two lit).
assert.equal(cls(cells.review), 'active'); assert.equal(text(cells.review), 'Review 0/5 Β· queued');
assert.doesNotMatch(cells.review, /data-motion/, 'queued is lit but still');
// #16599: at 050 the Review column is the stage's own track, but CI runs
// beside it and leads β€” exactly one lit chevron (hivecommons/hive#17335):
// Review is dim with a muted "review queued" note, its words in the tooltip.
assert.equal(cls(cells.ci), 'active'); assert.equal(text(cells.ci), 'CI 2/14 Β· 12 running');
assert.equal(cls(cells.review), 'todo'); assert.match(cells.review, /ham-track-queued/);
assert.match(cells.review, /ham-track-verdict"><svg [^]*?<\/svg><\/span><span class="ham-track-note">review queued<\/span>/, 'no words on the dim track, only the muted note');
assert.match(cells.review, /aria-label="[^"]*Review: Review 0\/5 Β· queued Β· [^"]*Β· review queued behind CI"/);
assert.doesNotMatch(cells.review, /data-motion/, 'a demoted track is still');
// #16268: CI failed native-queue-policy, review approved, held.
cells = physicalTracks(livePR({ head, stage: 70, display_column: 50, modifiers: ['hold'], hold: { by: 'hanthor', pill: 'Held by @hanthor' },
ci_activity: fresh('failing', { checks_passed: 13, checks_total: 14, checks_failed: 1, checks_failing: ['native-queue-policy'], blocker: 'native-queue-policy' }),
Expand Down
Loading
Loading