From 6896ee5bd58e9b6e4e9f935e2cf22119702fc885 Mon Sep 17 00:00:00 2001 From: Andrew Anderson Date: Thu, 29 Oct 2026 15:02:28 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20tracker:=20reporter-trust=20?= =?UTF-8?q?hold=20reads=20'Triage=20needed'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An issue the reporter-trust gate holds for a maintainer sat in the Open column as 'New · since 28m' with the ask only in the caption (hivecommons/hive#15437–#15440, labels not yet written). The 000-new state now stamps the needs-triage modifier when its triage gate is next, and the Open chevron / headline / chevron hover read 'Triage needed' for that row and for the needs-triage pill alike, so the word, colour and the inline Accept triage lead match the label case. Signed-off-by: Andrew Anderson --- .../fixed-triage-needed-reporter-hold.md | 1 + src/docs/dashboard-copy-inventory.md | 1 + src/docs/dashboard-sections.md | 4 +- src/docs/operator-reference.md | 2 +- src/pkg/dashboard/stage_tracker_new.go | 24 ++++++++++++ src/pkg/dashboard/stage_tracker_new_test.go | 38 ++++++++++++++++--- .../stage_tracker_triage_modifier_test.go | 31 +++++++++++++++ .../dashboard/static-src/js/tracker-row.js | 20 +++++++++- .../dashboard/static-src/js/tracker-words.js | 1 + src/pkg/dashboard/static/index.html | 21 +++++++++- 10 files changed, 133 insertions(+), 10 deletions(-) create mode 100644 src/changelog.d/fixed-triage-needed-reporter-hold.md diff --git a/src/changelog.d/fixed-triage-needed-reporter-hold.md b/src/changelog.d/fixed-triage-needed-reporter-hold.md new file mode 100644 index 0000000000..8029eaa9ca --- /dev/null +++ b/src/changelog.d/fixed-triage-needed-reporter-hold.md @@ -0,0 +1 @@ +- Activity Monitor: an issue the reporter-trust gate holds for a maintainer now reads **Triage needed** in the Open column (chevron, hover and row headline) from the moment the gate holds it, with the `needs-triage` modifier and the inline **Accept triage** lead — instead of **New** with the ask only in the caption, as hivecommons/hive#15437–#15440 did before the awaiting label landed. diff --git a/src/docs/dashboard-copy-inventory.md b/src/docs/dashboard-copy-inventory.md index 599c634f37..bfd5831e1c 100644 --- a/src/docs/dashboard-copy-inventory.md +++ b/src/docs/dashboard-copy-inventory.md @@ -62,6 +62,7 @@ The new hover, verbatim (title line omitted): | Confirm: Approve & merge as maintainer | dialog | 76 | 53 | same | | Confirm: Approve — let hive merge | dialog | 62 | 49 | same | | ⋯ menu hints (`stageTrackerLeadActions` → `ham-menu-hint`) | ⋯ menu | server consequences (11–31 each) | server consequences (≤ 12 each) | Go budget test | +| `stageTrackerOpenTriageNeeded` → `stageTrackerSegments` / `stageTrackerHeadline` Open word (`tracker-row.js`, `tracker-words.js`) | Open chevron, chevron hover first word, row tooltip headline | *New · since 28m* on a reporter-trust hold; the ask lived only in the caption ([#15437](https://github.com/hivecommons/hive/issues/15437)) | *Triage needed · since 28m* (same word as the `needs-triage` chip / 015) | `TestStageTrackerNewRowRendering`, `TestStageTracker_ReporterTrustHoldReadsTriageNeeded` | | `stageTrackerLeadActionHtml` (`tracker-actions.js`) | the row header's inline lead button (chip slot) | — (the lead sat in the ⋯ menu only) | the menu entry's label (1–4), its hint as the hover | `TestStageTrackerLeadActionInline`, `TestStageTrackerMaintainerRowsHaveLeadAction` | | Toasts (`STAGE_TRACKER_ACTING_CAPTIONS`, acted labels) | toast | 2–4 each | unchanged | — | | Settings → Features → Auto-merge → "Merge only on current base" help (`renderGovFeatures`, `config-features.js`) and the Repos-tab override row / repo-card `current-base` chip ([#15335](https://github.com/hivecommons/hive/issues/15335)) | settingHelpMark popover, checkbox label, chip hover | — (new) | 56 (help), 5 (row label), 1 (chip) | `TestCurrentBaseSettingsMarkupNodeGuard` | diff --git a/src/docs/dashboard-sections.md b/src/docs/dashboard-sections.md index 1d09f03f6e..61a70c6d04 100644 --- a/src/docs/dashboard-sections.md +++ b/src/docs/dashboard-sections.md @@ -818,6 +818,8 @@ An Open blocked item reads **Open · blocked · since 7h** with a yellow ⛔. Un A draft PR (GitHub draft bit or `do-not-merge/work-in-progress`) reads **Draft · since 18h**, with a muted ✎ and `draft` chip. It never turns stale: review/merge lanes skip it until the author marks it ready. Hold or blocked still wins, with draft in the chip's `+N` ([#14572](https://github.com/hivecommons/hive/issues/14572)). +An Open issue waiting on a maintainer's triage reads **Triage needed · since 28m** — the `needs-triage` chip, or a 000-new row the reporter-trust gate holds (`new.next_mover: maintainer`, triage gate *next*) before the awaiting label has landed; the server stamps the `needs-triage` modifier on such a row so the chevron word, the chip and the inline **Accept triage** lead are the same as the label case ([#15437](https://github.com/hivecommons/hive/issues/15437) read *New · since 28m* with the ask only in the caption). The caption and hover keep the next-pass narration. + 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). @@ -1017,7 +1019,7 @@ A `blocked` issue with neither (a human-applied label) keeps the bare pill. This Every open issue and pull request in `project.repos` is on the list from the moment GitHub reports it — there is no gap between "opened" and "the hive has an opinion about it" ([#15094](https://github.com/hivecommons/hive/issues/15094)). The `issues.opened` / `pull_request.opened` webhook re-read inserts the item into the status payload straight away (`insertFrontendRepoItem`; the governor side keeps the same row in its cached snapshot so a republish does not drop it), the per-item replay re-applies that insert after a governor republish, and the enumeration poll is the fallback for a missed delivery. -Until something places the item — a stage record, a `stage/*` label, a hold, a blocked marker, a bucket other than *reporter triage* / *unclassified* — the row is anchored in the **Open** column with the lit chevron reading **New** (`ham-open-new`, blue ✦ rather than amber) and a caption that names who moves it next and when: `New · waiting for the stage-label pass (→ 010 actionable), then the scanner (next pass in 7m)` for an issue the reporter gate has already admitted, `New · waiting for a maintainer's triage (add `triage/accepted`); the hive's next pass in 7m` for a human contributor's issue the reporter-trust gate is still holding (the label names come from `issues.filter.reporter_trust.untrusted_require_labels`), and `New · waiting for the stage-label pass (→ 050 review pending)` for a pull request. +Until something places the item — a stage record, a `stage/*` label, a hold, a blocked marker, a bucket other than *reporter triage* / *unclassified* — the row is anchored in the **Open** column with the lit chevron reading **New** (`ham-open-new`, blue ✦ rather than amber) — or **Triage needed** when the next mover is a maintainer, see above — and a caption that names who moves it next and when: `New · waiting for the stage-label pass (→ 010 actionable), then the scanner (next pass in 7m)` for an issue the reporter gate has already admitted, `New · waiting for a maintainer's triage (add `triage/accepted`); the hive's next pass in 7m` for a human contributor's issue the reporter-trust gate is still holding (the label names come from `issues.filter.reporter_trust.untrusted_require_labels`), and `New · waiting for the stage-label pass (→ 050 review pending)` for a pull request. The *since* time is the item's `created_at`; "next pass" is the governor's next kick (`governor.nextKickAt`, so it counts down with the Governor tile and reads *due now* once it has passed). The payload carries it all as `new{since, next_mover (maintainer|hive), next_mover_text, next_pass_at, next_pass_in_seconds, gates[], text}`; the chevron tooltip lists the gates ahead — **triage** (the reporter gate: done when admitted, next when a triage label is still needed), **actionable** (the stage-label pass marks it 010), **claimed** (the scanner claims it, 020) — each marked ✓ done, → next or · later, and the row's actor icon reads *human* while the next mover is a maintainer and *hive* otherwise. diff --git a/src/docs/operator-reference.md b/src/docs/operator-reference.md index 8610f1725a..6e3300da30 100644 --- a/src/docs/operator-reference.md +++ b/src/docs/operator-reference.md @@ -1025,7 +1025,7 @@ that level, the power the write-back exists to govern? | Stage labeler (`pkg/github/stage_labeler.go`, `stage_writer.go`, `pkg/stagelabels`) | stage engine reconcile | `stage/NNN-*` add/remove, `hive:stage-needs-decision` comment, role/author labels | every tracked PR and issue | `stage_label`, `needs_decision_comment` → L5 + opt-in label on foreign PRs; issue stage labels follow the issue filter, not this gate | | Supersession sweep (`pr_supersession_sweep.go`, `_autoclose.go`, `_resolve.go`) | hourly sweep | supersession notice comment, `hive/superseded` close, `needs-human` label | contributor PRs overlapping a hive PR | `supersession_notice` → L5 + label; `supersession_close` → L6 + label | | Duplicate-fix sweep (`pr_duplicate_fix_sweep.go`, `open_pr_links.go`) | hourly sweep | `hive:duplicate-fix` comment, `has-open-pr` label, `hive/superseded` close | PR pairs fixing one issue | `duplicate_fix_notice` → L5 + label | -| Reporter-trust reconcile (`pr_reporter_trust.go`, `reporter_trust_wait.go`) | PR watcher | hold comment + `needs-human` | PRs tracing to issues from untrusted reporters | `reporter_trust_hold` → L5 + label | +| Reporter-trust reconcile (`pr_reporter_trust.go`, `reporter_trust_wait.go`) | PR watcher | hold comment + `needs-human` | PRs tracing to issues from untrusted reporters | `reporter_trust_hold` → L5 + label. Held issues read **Triage needed** in the Activity Monitor from the moment the gate holds them and carry `needs-triage` (`reporter_trust.awaiting_label`) once the wait notice is posted. | | PR↔issue linker (`pr_issue_link.go`, `pr_contributor_link.go`, `linked_prs.go`) | PR watcher | "covered by PR" label on the issue, link comments | issues referenced by any PR | `covered_by_pr_label` → L5 + label | | Verdict / decision labels (`pr_decision_operator.go`, `human_decision_label.go`, `legacy_decision_labels.go`, `contribute_verdict_settle.go`) | review verdicts, dashboard decisions | `hive:verdict-*`, decision labels | reviewed PRs | `verdict_label` → L3 + label; dashboard-triggered decisions are solicited | | Contributor adopt / nudge / bot takeover (`automerge/automerge_contributor_*.go`, `automerge_bot_takeover.go`) | auto-merge sweep | adopt comment, update-branch push, workflow approval, nudge comments | contributor PRs in the contributor lane | `contributor_adopt` → L6 + label | diff --git a/src/pkg/dashboard/stage_tracker_new.go b/src/pkg/dashboard/stage_tracker_new.go index 695ac757bb..8bd7abb0b9 100644 --- a/src/pkg/dashboard/stage_tracker_new.go +++ b/src/pkg/dashboard/stage_tracker_new.go @@ -203,6 +203,30 @@ func applyStageTrackerNew(it *StageTrackerItem, n *StageTrackerNew) { if n.Since != nil && it.StageSince == nil { it.StageSince = n.Since } + // A reporter-trust hold is "Triage needed" whether or not the awaiting + // label has landed yet: the gate decided it, the stage-label pass only + // writes it down later. The same modifier the `needs-triage` label + // yields drives the Open chevron word, the pill and Accept triage. + if n.TriagePending() && !slices.Contains(it.Modifiers, modNeedsTriage) { + it.Modifiers = append(it.Modifiers, modNeedsTriage) + slices.SortFunc(it.Modifiers, func(a, b string) int { + return slices.Index(stageTrackerModifierOrder, a) - slices.Index(stageTrackerModifierOrder, b) + }) + } +} + +// TriagePending reports whether the 000-new row waits on a maintainer's +// triage: the triage gate is the next one. +func (n *StageTrackerNew) TriagePending() bool { + if n == nil || n.NextMover != StageTrackerMoverMaintainer { + return false + } + for _, g := range n.Gates { + if g.Name == "triage" && g.State == StageTrackerGateNext { + return true + } + } + return false } // issueFilterConfig is the project's issue filter, or nil without deps. diff --git a/src/pkg/dashboard/stage_tracker_new_test.go b/src/pkg/dashboard/stage_tracker_new_test.go index 6c5392bdeb..e63c66c96e 100644 --- a/src/pkg/dashboard/stage_tracker_new_test.go +++ b/src/pkg/dashboard/stage_tracker_new_test.go @@ -2,6 +2,7 @@ package dashboard import ( "os/exec" + "slices" "strings" "testing" "time" @@ -70,6 +71,16 @@ func TestWebhookOpenedItemInsertedIntoTracker(t *testing.T) { if len(it.New.Gates) != 3 || it.New.Gates[0].Name != "triage" || it.New.Gates[0].State != StageTrackerGateNext || it.New.Gates[1].Name != "actionable" || it.New.Gates[2].Name != "claimed" { t.Fatalf("#15092 gates = %+v, want triage (next) → actionable → claimed", it.New.Gates) } + // The hold is decided before the awaiting label lands (hivecommons/hive#15437 + // read "New" with labels: null): the row carries the needs-triage + // modifier the label would yield, so the Open chevron reads "Triage + // needed" and Accept triage leads. + if !slices.Contains(it.Modifiers, modNeedsTriage) { + t.Fatalf("#15092 modifiers = %v, want %s on a reporter_triage row without the label", it.Modifiers, modNeedsTriage) + } + if !it.New.TriagePending() { + t.Fatalf("#15092 new = %+v, want TriagePending", it.New) + } if it.New.NextPassAt == nil || it.New.NextPassInSeconds != 7*60 || !strings.Contains(it.Caption, "next pass in 7m") { t.Fatalf("#15092 next pass = %v / %ds caption %q, want the governor's kick in 7m", it.New.NextPassAt, it.New.NextPassInSeconds, it.Caption) } @@ -78,6 +89,9 @@ func TestWebhookOpenedItemInsertedIntoTracker(t *testing.T) { if it.New == nil || it.New.NextMover != StageTrackerMoverHive || it.Caption != "New · waiting for the stage-label pass (→ 010 actionable), then the scanner (next pass in 7m)" { t.Fatalf("#15095 = %+v caption %q, want the stage-label pass as next mover", it.New, it.Caption) } + if slices.Contains(it.Modifiers, modNeedsTriage) || it.New.TriagePending() { + t.Fatalf("#15095 (admitted reporter) modifiers = %v, must not read triage needed", it.Modifiers) + } if it.New.Gates[0].Name != "triage" || it.New.Gates[0].State != StageTrackerGateDone { t.Fatalf("#15095 gates = %+v, want triage already done", it.New.Gates) } @@ -271,6 +285,7 @@ func TestStageTrackerNewRowRendering(t *testing.T) { jsFunc(t, html, "stageTrackerOpenSince"), jsFunc(t, html, "stageTrackerShortAgo"), jsFunc(t, html, "stageTrackerNewState"), + jsFunc(t, html, "stageTrackerOpenTriageNeeded"), jsFunc(t, html, "stageTrackerNewLines"), jsConstLine(t, html, "STAGE_TRACKER_ACTOR_NONE"), jsFunc(t, html, "stageTrackerStageActor"), @@ -291,23 +306,34 @@ const fresh = { repo: 'hivecommons/hive', number: 15092, kind: 'issue', title: ' gates: [{ name: 'triage', state: 'next', text: 'a maintainer accepts triage (triage/accepted)' }, { name: 'actionable', state: 'later', text: 'the stage-label pass marks it 010 actionable' }, { name: 'claimed', state: 'later', text: 'the scanner claims it (020)' }], text: 'New · waiting for a maintainer\'s triage (add ` + "`triage/accepted`" + `); the hive\'s next pass in 7m' } }; -assert.strictEqual(stageTrackerHeadline(fresh), 'New'); +// A reporter-trust hold reads "Triage needed" in the Open column even +// before the needs-triage label has landed (hivecommons/hive#15437: the row +// said "New" and the ask lived only in the caption). +assert.strictEqual(stageTrackerHeadline(fresh), 'Triage needed'); assert.strictEqual(stageTrackerActorKind(fresh), 'human', 'a maintainer-gated new issue asks for a human move'); const segs = stageTrackerSegments(fresh, stages, now); assert.strictEqual(segs[0].state, 'active'); assert.ok(segs[0].isNew, 'the Open segment is flagged new'); -assert.strictEqual(segs[0].short, 'New · since 8m', segs[0].short); +assert.strictEqual(segs[0].short, 'Triage needed · since 8m', segs[0].short); const strip = stageTrackerStripItems(fresh, stages, null, now, {}); assert.ok(/
  • New · since 8m'), strip); +assert.ok(strip.includes('Triage needed · since 8m'), strip); const chevronTip = /title="([^"]*)"/.exec(strip)[1]; -assert.ok(chevronTip.startsWith('New — Next: a maintainer's triage') || chevronTip.startsWith('New — Next: a maintainer\'s triage'), chevronTip); +assert.ok(chevronTip.startsWith('Triage needed — Next: a maintainer's triage') || chevronTip.startsWith('Triage needed — Next: a maintainer\'s triage'), chevronTip); +// With the label on (modifiers carry needs-triage) the word is the same. +const labelled = Object.assign({}, fresh, { labels: ['needs-triage'], modifiers: ['needs-triage'] }); +assert.strictEqual(stageTrackerSegments(labelled, stages, now)[0].short, 'Triage needed · since 8m'); +assert.strictEqual(stageTrackerHeadline(labelled), 'Triage needed'); +// An admitted reporter's new issue still reads New. +const admitted = Object.assign({}, fresh, { bucket: '', new: Object.assign({}, fresh.new, { next_mover: 'hive', gates: [{ name: 'triage', state: 'done' }, { name: 'actionable', state: 'next' }] }) }); +assert.strictEqual(stageTrackerSegments(admitted, stages, now)[0].short, 'New · since 8m'); +assert.strictEqual(stageTrackerHeadline(admitted), 'New'); assert.ok(chevronTip.includes('next hive pass in 7m'), chevronTip); assert.ok(chevronTip.includes('Gates ahead: triage (next) → actionable → claimed'), chevronTip); assert.ok(chevronTip.includes('Next move: human'), chevronTip); const tip = stageTrackerTooltip(fresh, now); const lines = tip.split('\n'); -assert.strictEqual(lines[0], 'New'); +assert.strictEqual(lines[0], 'Triage needed'); assert.ok(lines.some(l => l.startsWith('Next: a maintainer') && l.endsWith('next hive pass in 7m')), tip); assert.ok(lines.includes('Gates ahead: triage (next) → actionable → claimed'), tip); assert.ok(lines.includes(' claimed: the scanner claims it (020)'), tip); @@ -332,7 +358,7 @@ for (const it of [ assert.ok(!s.includes('>New'), JSON.stringify(it) + ' → ' + s); assert.notStrictEqual(stageTrackerHeadline(it), 'New'); } -assert.strictEqual(stageTrackerHeadline({ kind: 'issue', stage: 0, caption: 'No stage recorded yet', labels: ['needs-triage'], modifiers: ['needs-triage'] }), 'Open'); +assert.strictEqual(stageTrackerHeadline({ kind: 'issue', stage: 0, caption: 'No stage recorded yet', labels: ['needs-triage'], modifiers: ['needs-triage'] }), 'Triage needed'); assert.deepStrictEqual(stageTrackerNewLines({ stage: 0 }, now), []); ` cmd := exec.Command(node, "-") diff --git a/src/pkg/dashboard/stage_tracker_triage_modifier_test.go b/src/pkg/dashboard/stage_tracker_triage_modifier_test.go index 4b44372b17..e9b9466757 100644 --- a/src/pkg/dashboard/stage_tracker_triage_modifier_test.go +++ b/src/pkg/dashboard/stage_tracker_triage_modifier_test.go @@ -124,3 +124,34 @@ func TestStageTracker_NeedsTriageStaleOnlyPastClaim(t *testing.T) { } } } + +// A reporter-trust hold the awaiting label has not reached yet +// (hivecommons/hive#15437: stage 0, bucket reporter_triage, labels null, +// modifiers []) carries the needs-triage modifier all the same, so the Open +// chevron reads "Triage needed" rather than "New" and Accept triage leads. +// The caption keeps the next-pass narration. +func TestStageTracker_ReporterTrustHoldReadsTriageNeeded(t *testing.T) { + now := time.Date(2026, 10, 29, 18, 20, 0, 0, time.UTC) + opened := now.Add(-28 * time.Minute) + s := newTestServer() + store := stagelabels.NewStore("", func() time.Time { return now }) + s.stageStore = store + status := minimalPayload() + status.HiveID = "hv-test" + status.Governor.NextKickAt = now.Add(4 * time.Minute).UTC().Format(time.RFC3339) + status.Repos = []FrontendRepo{{Name: "hive", Full: "hivecommons/hive", NonActionableIssues: []any{ + github.RepoWorkIssue{Repo: "hivecommons/hive", Number: 15437, Title: "ServiceMonitor component", Author: "onkar717", AuthorIsHuman: true, + CreatedAt: opened, UpdatedAt: opened, Bucket: "reporter_triage", Reason: "Awaiting maintainer triage label"}, + }}} + s.UpdateStatus(status) + it := trackerItem(t, s.buildStageTracker(s.status, store, now), "issue", 15437) + if it.Stage != 0 || it.StageSlug != StageTrackerNewSlug || it.New == nil || !it.New.TriagePending() { + t.Fatalf("#15437 = stage %d slug %q new %+v, want 000-new with triage pending", it.Stage, it.StageSlug, it.New) + } + if !slices.Equal(it.Modifiers, []string{modNeedsTriage}) { + t.Fatalf("#15437 modifiers = %v, want [%s] without the label", it.Modifiers, modNeedsTriage) + } + if it.Actor != StageTrackerMoverMaintainer || !strings.HasPrefix(it.Caption, "New · waiting for a maintainer's triage (add `triage/accepted`)") || !strings.Contains(it.Caption, "next pass in 4m") { + t.Fatalf("#15437 caption %q actor %q, want the maintainer's triage with the next pass", it.Caption, it.Actor) + } +} diff --git a/src/pkg/dashboard/static-src/js/tracker-row.js b/src/pkg/dashboard/static-src/js/tracker-row.js index 277151e0bd..328f94112b 100644 --- a/src/pkg/dashboard/static-src/js/tracker-row.js +++ b/src/pkg/dashboard/static-src/js/tracker-row.js @@ -75,10 +75,14 @@ // names who moves it next (hivecommons/hive#15094). const openNew = n === 0 && state === 'active' && !openHold && !openBlocked && !openDraft && typeof stageTrackerNewState === 'function' && !!stageTrackerNewState(item); const advisory = n === 0 && state === 'active' && !openHold && !openBlocked && typeof stageTrackerAdvisoryOf === 'function' ? stageTrackerAdvisoryOf(item) : null; + // An issue waiting on a maintainer's triage says so in the column + // (hivecommons/hive#15437 read "New" while the caption held the ask). + const openTriage = n === 0 && state === 'active' && !openHold && !openBlocked && !openDraft && !advisory && typeof stageTrackerOpenTriageNeeded === 'function' && stageTrackerOpenTriageNeeded(item); if (openHold) word = 'Open · hold'; else if (openBlocked) word = 'Open · blocked'; else if (advisory) word = advisory.chip || 'Advisory · read & close'; else if (openDraft) word = 'Draft'; + else if (openTriage) word = 'Triage needed'; else if (openNew) word = 'New'; // A plain, blocked or draft Open step (no stage label, not held) // says how long it has sat there, from the same instant the since @@ -240,6 +244,20 @@ if (!item || (Number(item.stage) || 0) !== 0 || !item.new || typeof item.new !== 'object') return null; return item.new; } + // Pure: an issue in the Open column that waits on a maintainer's triage + // — the needs-triage pill, or a 000-new reporter-trust hold whose next + // mover is the maintainer (triage gate next) before the awaiting label + // has landed. The chevron then says "Triage needed", not "New": the ask + // is in the column, not only in the caption. + function stageTrackerOpenTriageNeeded(item) { + if (!item || item.kind === 'pr' || (Number(item.stage) || 0) !== 0) return false; + const mods = Array.isArray(item.modifiers) ? item.modifiers : []; + if (mods.indexOf('needs-triage') >= 0) return true; + const fresh = stageTrackerNewState(item); + if (!fresh || fresh.next_mover !== 'maintainer') return false; + const gates = Array.isArray(fresh.gates) ? fresh.gates : []; + return gates.some(g => g && g.name === 'triage' && g.state === 'next'); + } // "Next: …" and "Gates ahead: triage ✓ → actionable → claimed" for the // row tooltip and the lit chevron. nowMs refreshes the next-pass countdown. function stageTrackerNewLines(item, nowMs) { @@ -334,7 +352,7 @@ tip = sg.label + (sg.description ? ' — ' + sg.description : ''); if (sg.blocked) tip += ' — ' + stageTrackerBlockedTip(item); if (sg.draft) tip += ' — ' + STAGE_TRACKER_DRAFT_TIP; - if (sg.isNew && typeof stageTrackerNewLines === 'function') tip = 'New — ' + stageTrackerNewLines(item, nowMs).join(' — '); + if (sg.isNew && typeof stageTrackerNewLines === 'function') tip = (typeof stageTrackerOpenTriageNeeded === 'function' && stageTrackerOpenTriageNeeded(item) ? 'Triage needed — ' : 'New — ') + stageTrackerNewLines(item, nowMs).join(' — '); if (sg.advisory) tip = (item.advisory && item.advisory.caption) || 'Advisory for maintainers · read, then close'; if (sg.openSince) tip += ' — open since ' + new Date(sg.openSince.ms).toISOString() + (sg.openSince.fromCreated ? ' (opened)' : ''); // The shared Merge gate word hides 080 vs 095 vs 100; the chevron tooltip carries it. diff --git a/src/pkg/dashboard/static-src/js/tracker-words.js b/src/pkg/dashboard/static-src/js/tracker-words.js index eab7cd8d41..51615a057e 100644 --- a/src/pkg/dashboard/static-src/js/tracker-words.js +++ b/src/pkg/dashboard/static-src/js/tracker-words.js @@ -462,6 +462,7 @@ if (n === 0 && mods.indexOf('blocked') >= 0) return 'Open · blocked'; if (n === 0 && mods.indexOf('draft') >= 0) return 'Open · draft'; // Guarded: test harnesses lift this function by name without the 000-new helpers. + if (n === 0 && typeof stageTrackerOpenTriageNeeded === 'function' && stageTrackerOpenTriageNeeded(item)) return 'Triage needed'; if (n === 0 && typeof stageTrackerNewState === 'function' && stageTrackerNewState(item)) return 'New'; // An issue parked on a person (045, or a pre-045 085 with no covering // PR) is parked itself, so no "(its PR)" suffix. diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 265becabf4..c7bff71454 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -14636,6 +14636,7 @@

    Where to get help

    if (n === 0 && mods.indexOf('blocked') >= 0) return 'Open · blocked'; if (n === 0 && mods.indexOf('draft') >= 0) return 'Open · draft'; // Guarded: test harnesses lift this function by name without the 000-new helpers. + if (n === 0 && typeof stageTrackerOpenTriageNeeded === 'function' && stageTrackerOpenTriageNeeded(item)) return 'Triage needed'; if (n === 0 && typeof stageTrackerNewState === 'function' && stageTrackerNewState(item)) return 'New'; // An issue parked on a person (045, or a pre-045 085 with no covering // PR) is parked itself, so no "(its PR)" suffix. @@ -15582,10 +15583,14 @@

    Where to get help

    // names who moves it next (hivecommons/hive#15094). const openNew = n === 0 && state === 'active' && !openHold && !openBlocked && !openDraft && typeof stageTrackerNewState === 'function' && !!stageTrackerNewState(item); const advisory = n === 0 && state === 'active' && !openHold && !openBlocked && typeof stageTrackerAdvisoryOf === 'function' ? stageTrackerAdvisoryOf(item) : null; + // An issue waiting on a maintainer's triage says so in the column + // (hivecommons/hive#15437 read "New" while the caption held the ask). + const openTriage = n === 0 && state === 'active' && !openHold && !openBlocked && !openDraft && !advisory && typeof stageTrackerOpenTriageNeeded === 'function' && stageTrackerOpenTriageNeeded(item); if (openHold) word = 'Open · hold'; else if (openBlocked) word = 'Open · blocked'; else if (advisory) word = advisory.chip || 'Advisory · read & close'; else if (openDraft) word = 'Draft'; + else if (openTriage) word = 'Triage needed'; else if (openNew) word = 'New'; // A plain, blocked or draft Open step (no stage label, not held) // says how long it has sat there, from the same instant the since @@ -15747,6 +15752,20 @@

    Where to get help

    if (!item || (Number(item.stage) || 0) !== 0 || !item.new || typeof item.new !== 'object') return null; return item.new; } + // Pure: an issue in the Open column that waits on a maintainer's triage + // — the needs-triage pill, or a 000-new reporter-trust hold whose next + // mover is the maintainer (triage gate next) before the awaiting label + // has landed. The chevron then says "Triage needed", not "New": the ask + // is in the column, not only in the caption. + function stageTrackerOpenTriageNeeded(item) { + if (!item || item.kind === 'pr' || (Number(item.stage) || 0) !== 0) return false; + const mods = Array.isArray(item.modifiers) ? item.modifiers : []; + if (mods.indexOf('needs-triage') >= 0) return true; + const fresh = stageTrackerNewState(item); + if (!fresh || fresh.next_mover !== 'maintainer') return false; + const gates = Array.isArray(fresh.gates) ? fresh.gates : []; + return gates.some(g => g && g.name === 'triage' && g.state === 'next'); + } // "Next: …" and "Gates ahead: triage ✓ → actionable → claimed" for the // row tooltip and the lit chevron. nowMs refreshes the next-pass countdown. function stageTrackerNewLines(item, nowMs) { @@ -15841,7 +15860,7 @@

    Where to get help

    tip = sg.label + (sg.description ? ' — ' + sg.description : ''); if (sg.blocked) tip += ' — ' + stageTrackerBlockedTip(item); if (sg.draft) tip += ' — ' + STAGE_TRACKER_DRAFT_TIP; - if (sg.isNew && typeof stageTrackerNewLines === 'function') tip = 'New — ' + stageTrackerNewLines(item, nowMs).join(' — '); + if (sg.isNew && typeof stageTrackerNewLines === 'function') tip = (typeof stageTrackerOpenTriageNeeded === 'function' && stageTrackerOpenTriageNeeded(item) ? 'Triage needed — ' : 'New — ') + stageTrackerNewLines(item, nowMs).join(' — '); if (sg.advisory) tip = (item.advisory && item.advisory.caption) || 'Advisory for maintainers · read, then close'; if (sg.openSince) tip += ' — open since ' + new Date(sg.openSince.ms).toISOString() + (sg.openSince.fromCreated ? ' (opened)' : ''); // The shared Merge gate word hides 080 vs 095 vs 100; the chevron tooltip carries it. From d61b32826c44c1179e7a754c481e5f764567273c Mon Sep 17 00:00:00 2001 From: Andrew Anderson Date: Thu, 29 Oct 2026 15:14:49 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20tracker:=20held=20rows=20cap?= =?UTF-8?q?tion=20reads=20'Triage=20needed=20=E2=80=94=20accept=20or=20clo?= =?UTF-8?q?se'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 015 caption appended the lane reason ('triage needed: carries needs-triage') after 'waiting for triage', saying triage three times beside a chevron that already reads Triage needed. Every reporter-trust held row (015 and the 000-new hold) now carries exactly 'Triage needed — accept or close'; the next-mover / next-pass narration stays on the chevron hover. Changelog fragment moved to the repository root where the guard reads it. Signed-off-by: Andrew Anderson --- .../fixed-triage-needed-reporter-hold.md | 2 +- src/docs/dashboard-copy-inventory.md | 1 + src/docs/dashboard-sections.md | 6 +++--- src/pkg/dashboard/stage_tracker.go | 9 ++++++++- .../dashboard/stage_tracker_accept_triage_test.go | 4 ++-- src/pkg/dashboard/stage_tracker_lead_action_test.go | 2 +- src/pkg/dashboard/stage_tracker_new.go | 4 +++- src/pkg/dashboard/stage_tracker_new_test.go | 12 ++++++------ .../dashboard/stage_tracker_triage_modifier_test.go | 10 +++++----- 9 files changed, 30 insertions(+), 20 deletions(-) rename {src/changelog.d => changelog.d}/fixed-triage-needed-reporter-hold.md (71%) diff --git a/src/changelog.d/fixed-triage-needed-reporter-hold.md b/changelog.d/fixed-triage-needed-reporter-hold.md similarity index 71% rename from src/changelog.d/fixed-triage-needed-reporter-hold.md rename to changelog.d/fixed-triage-needed-reporter-hold.md index 8029eaa9ca..001e1e27ca 100644 --- a/src/changelog.d/fixed-triage-needed-reporter-hold.md +++ b/changelog.d/fixed-triage-needed-reporter-hold.md @@ -1 +1 @@ -- Activity Monitor: an issue the reporter-trust gate holds for a maintainer now reads **Triage needed** in the Open column (chevron, hover and row headline) from the moment the gate holds it, with the `needs-triage` modifier and the inline **Accept triage** lead — instead of **New** with the ask only in the caption, as hivecommons/hive#15437–#15440 did before the awaiting label landed. +- Activity Monitor: an issue the reporter-trust gate holds for a maintainer now reads **Triage needed** in the Open column (chevron, hover and row headline) from the moment the gate holds it, with the `needs-triage` modifier and the inline **Accept triage** lead — instead of **New** with the ask only in the caption, as hivecommons/hive#15437–#15440 did before the awaiting label landed; the caption of every held row (000-new or 015) is now exactly *Triage needed — accept or close* instead of repeating *triage* three times. diff --git a/src/docs/dashboard-copy-inventory.md b/src/docs/dashboard-copy-inventory.md index bfd5831e1c..802c035681 100644 --- a/src/docs/dashboard-copy-inventory.md +++ b/src/docs/dashboard-copy-inventory.md @@ -63,6 +63,7 @@ The new hover, verbatim (title line omitted): | Confirm: Approve — let hive merge | dialog | 62 | 49 | same | | ⋯ menu hints (`stageTrackerLeadActions` → `ham-menu-hint`) | ⋯ menu | server consequences (11–31 each) | server consequences (≤ 12 each) | Go budget test | | `stageTrackerOpenTriageNeeded` → `stageTrackerSegments` / `stageTrackerHeadline` Open word (`tracker-row.js`, `tracker-words.js`) | Open chevron, chevron hover first word, row tooltip headline | *New · since 28m* on a reporter-trust hold; the ask lived only in the caption ([#15437](https://github.com/hivecommons/hive/issues/15437)) | *Triage needed · since 28m* (same word as the `needs-triage` chip / 015) | `TestStageTrackerNewRowRendering`, `TestStageTracker_ReporterTrustHoldReadsTriageNeeded` | +| `stageTrackerTriageNeededCaption` (`stageTrackerCaption` 015, `stageTrackerNewState` hold text) | row caption, feed | 110 ("Actionable, but no maintainer has looked at it yet; waiting for triage — triage needed: carries needs triage": *triage* ×3 after the chevron word) / 84 ("New · waiting for a maintainer's triage (add `triage/accepted`); the hive's next pass in 7m") | 31 ("Triage needed — accept or close"; the next-mover and next-pass narration stay on the chevron hover) | `TestStageTracker_TriageNeededStage`, `TestStageTracker_ReporterTrustHoldReadsTriageNeeded`, `TestStageTrackerNewState` | | `stageTrackerLeadActionHtml` (`tracker-actions.js`) | the row header's inline lead button (chip slot) | — (the lead sat in the ⋯ menu only) | the menu entry's label (1–4), its hint as the hover | `TestStageTrackerLeadActionInline`, `TestStageTrackerMaintainerRowsHaveLeadAction` | | Toasts (`STAGE_TRACKER_ACTING_CAPTIONS`, acted labels) | toast | 2–4 each | unchanged | — | | Settings → Features → Auto-merge → "Merge only on current base" help (`renderGovFeatures`, `config-features.js`) and the Repos-tab override row / repo-card `current-base` chip ([#15335](https://github.com/hivecommons/hive/issues/15335)) | settingHelpMark popover, checkbox label, chip hover | — (new) | 56 (help), 5 (row label), 1 (chip) | `TestCurrentBaseSettingsMarkupNodeGuard` | diff --git a/src/docs/dashboard-sections.md b/src/docs/dashboard-sections.md index 61a70c6d04..d557d227e0 100644 --- a/src/docs/dashboard-sections.md +++ b/src/docs/dashboard-sections.md @@ -818,7 +818,7 @@ An Open blocked item reads **Open · blocked · since 7h** with a yellow ⛔. Un A draft PR (GitHub draft bit or `do-not-merge/work-in-progress`) reads **Draft · since 18h**, with a muted ✎ and `draft` chip. It never turns stale: review/merge lanes skip it until the author marks it ready. Hold or blocked still wins, with draft in the chip's `+N` ([#14572](https://github.com/hivecommons/hive/issues/14572)). -An Open issue waiting on a maintainer's triage reads **Triage needed · since 28m** — the `needs-triage` chip, or a 000-new row the reporter-trust gate holds (`new.next_mover: maintainer`, triage gate *next*) before the awaiting label has landed; the server stamps the `needs-triage` modifier on such a row so the chevron word, the chip and the inline **Accept triage** lead are the same as the label case ([#15437](https://github.com/hivecommons/hive/issues/15437) read *New · since 28m* with the ask only in the caption). The caption and hover keep the next-pass narration. +An Open issue waiting on a maintainer's triage reads **Triage needed · since 28m** — the `needs-triage` chip, or a 000-new row the reporter-trust gate holds (`new.next_mover: maintainer`, triage gate *next*) before the awaiting label has landed; the server stamps the `needs-triage` modifier on such a row so the chevron word, the chip and the inline **Accept triage** lead are the same as the label case ([#15437](https://github.com/hivecommons/hive/issues/15437) read *New · since 28m* with the ask only in the caption). The caption is exactly **Triage needed — accept or close** on every held row (015 and 000-new alike — the 015 lane reason `triage needed: carries needs-triage` is not appended, so the row does not say *triage* three times); the chevron hover keeps the next-mover / next-pass narration and the gate list. 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)). @@ -1019,7 +1019,7 @@ A `blocked` issue with neither (a human-applied label) keeps the bare pill. This Every open issue and pull request in `project.repos` is on the list from the moment GitHub reports it — there is no gap between "opened" and "the hive has an opinion about it" ([#15094](https://github.com/hivecommons/hive/issues/15094)). The `issues.opened` / `pull_request.opened` webhook re-read inserts the item into the status payload straight away (`insertFrontendRepoItem`; the governor side keeps the same row in its cached snapshot so a republish does not drop it), the per-item replay re-applies that insert after a governor republish, and the enumeration poll is the fallback for a missed delivery. -Until something places the item — a stage record, a `stage/*` label, a hold, a blocked marker, a bucket other than *reporter triage* / *unclassified* — the row is anchored in the **Open** column with the lit chevron reading **New** (`ham-open-new`, blue ✦ rather than amber) — or **Triage needed** when the next mover is a maintainer, see above — and a caption that names who moves it next and when: `New · waiting for the stage-label pass (→ 010 actionable), then the scanner (next pass in 7m)` for an issue the reporter gate has already admitted, `New · waiting for a maintainer's triage (add `triage/accepted`); the hive's next pass in 7m` for a human contributor's issue the reporter-trust gate is still holding (the label names come from `issues.filter.reporter_trust.untrusted_require_labels`), and `New · waiting for the stage-label pass (→ 050 review pending)` for a pull request. +Until something places the item — a stage record, a `stage/*` label, a hold, a blocked marker, a bucket other than *reporter triage* / *unclassified* — the row is anchored in the **Open** column with the lit chevron reading **New** (`ham-open-new`, blue ✦ rather than amber) — or **Triage needed** when the next mover is a maintainer, see above — and a caption that names who moves it next and when: `New · waiting for the stage-label pass (→ 010 actionable), then the scanner (next pass in 7m)` for an issue the reporter gate has already admitted, `Triage needed — accept or close` for a human contributor's issue the reporter-trust gate is still holding (the hover still names the label to add and the next pass) (the label names come from `issues.filter.reporter_trust.untrusted_require_labels`), and `New · waiting for the stage-label pass (→ 050 review pending)` for a pull request. The *since* time is the item's `created_at`; "next pass" is the governor's next kick (`governor.nextKickAt`, so it counts down with the Governor tile and reads *due now* once it has passed). The payload carries it all as `new{since, next_mover (maintainer|hive), next_mover_text, next_pass_at, next_pass_in_seconds, gates[], text}`; the chevron tooltip lists the gates ahead — **triage** (the reporter gate: done when admitted, next when a triage label is still needed), **actionable** (the stage-label pass marks it 010), **claimed** (the scanner claims it, 020) — each marked ✓ done, → next or · later, and the row's actor icon reads *human* while the next mover is a maintainer and *hive* otherwise. @@ -1065,7 +1065,7 @@ Plain words throughout — working / waiting on X / set back by Y / merged — n #### The row's lead action, inline -A row whose next move is yours does not hide its answer behind three dots. Beside the chips on the right of the header (and on a nested PR sub-row's own header), the row renders its **lead action** as a real `