diff --git a/changelog.d/fixed-settled-open-chevron-tint.md b/changelog.d/fixed-settled-open-chevron-tint.md new file mode 100644 index 0000000000..055c1dc98b --- /dev/null +++ b/changelog.d/fixed-settled-open-chevron-tint.md @@ -0,0 +1 @@ +- Activity Monitor: while CI or review runs, the stage chevron keeps its neutral settled-current fill — the Open-column draft / blocked / New / stale tints no longer paint a second coloured chevron beside the running track (a draft PR with no stage read as slate Open + amber CI). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 01606bd2e8..e912a6f266 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -453,7 +453,7 @@ Plain words throughout — working / waiting on X / set back by Y / merged — n 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. **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. +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. Settled-current is always the neutral fill: the Open column's draft, blocked, New and stale tints and the held-gate amber never repaint it, so the running track is the row's only coloured chevron ([#17461](https://github.com/hivecommons/hive/issues/17461): a draft PR with no stage yet read as a slate Open beside amber CI). 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*, *Deferred · waiting on #N*, *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. diff --git a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js index 9827f18c1e..defa54ca6c 100644 --- a/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js +++ b/src/pkg/dashboard/stage_tracker_remediation_chevron.test.js @@ -40,6 +40,9 @@ const segments = new Function('stageTrackerAnchor', globals + ` const STAGE_TRACKER_ACTIVE_WORD = {70: 'Fixing'}; const STAGE_TRACKER_HUMAN_GATED = 85, STAGE_TRACKER_READY_FOR_HUMAN_MERGE = 90, STAGE_TRACKER_ADOPTED_BY_HIVE = 74; function stageTrackerSentinelInLane() { return false; } +function stageTrackerOpenSince(it) { return { ms: Date.parse(it.created_at || '') || 0 }; } +function stageTrackerShortAgo() { return '1d'; } +const STAGE_TRACKER_OPEN_STALE_DAYS = 7; function stageTrackerUnauthorizedWord() { return ''; } function stageTrackerManualMergeWord() { return 'Ready for human merge'; } function stageTrackerAdoptedWord() { return 'Adopted by hive'; } @@ -47,6 +50,7 @@ function stageTrackerAdoptedWord() { return 'Adopted by hive'; } const renderStrip = new Function('esc', 'stageTrackerSegments', 'stageTrackerActivityTrackHtml', globals + ` const STAGE_TRACKER_MOTION_STATIC = 'static', STAGE_TRACKER_MOTION_ACTIVE = 'active'; const STAGE_TRACKER_READY_FOR_HUMAN_MERGE = 90; +const STAGE_TRACKER_DRAFT_TIP = 'Draft — the author is still working on it.'; function stageTrackerActorKind() { return ''; } function stageTrackerActorTip() { return ''; } function stageTrackerMotion() { return STAGE_TRACKER_MOTION_STATIC; } @@ -334,3 +338,31 @@ test('a stalled or stale-polled text-bearing track is plainly active: one amber if (words) assert.ok(/\bactive\b/.test(m[1]) && !/\b(pending|todo|done|failing|ham-settled-current)\b/.test(m[1]), 'text without the one active fill: ' + m[1]); } }); + +// hivecommons/hive#17461: a draft PR with no stage yet (Open column) whose CI +// runs draws the Open chevron settled-current — icon only, neutral fill — +// and the running track is the row's only coloured chevron. The Open word +// tints (draft, blocked, New, stale) are declared after the settled rule at +// equal specificity; the settled fill must still win. +test('a draft Open PR with running CI: Open is settled-current and no Open tint repaints it', () => { + const c = cells(redPR({ stage: 0, modifiers: ['draft'], created_at: '2026-11-03T01:50:50Z', + ci_activity: { head: 'abc1234def', state: 'running', active: true, caption: 'CI 51/64 · 12 running', checks_passed: 51, checks_total: 64, source: 'checks', observed_at: '2026-11-04T02:40:00Z' }, + review_activity: { head: 'abc1234def', state: 'not_started', caption: 'Review · draft, not requested', source: 'none', observed_at: '2026-11-04T02:40:00Z' } })); + assert.match(c[0], /^