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-triage-needed-reporter-hold.md
Original file line number Diff line number Diff line change
@@ -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; the caption of every held row (000-new or 015) is now exactly *Triage needed β€” accept or close* instead of repeating *triage* three times.
2 changes: 2 additions & 0 deletions src/docs/dashboard-copy-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ 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` |
| `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 | β€” |
| `stageTrackerSelectionTriage` (`tracker-actions.js`) | selection bar lead button / bulk β‹― menu entry, summary toast | β€” (no bulk Accept triage; one row at a time) | *Accept triage (4 selected)* / *Accept triage (2 of 4)* with the hint *skips the 2 not waiting on triage*; one toast *Accepted 4 issues* | `TestStageTrackerBulkAcceptTriage` |
Expand Down
6 changes: 4 additions & 2 deletions src/docs/dashboard-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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)).

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).
Expand Down Expand Up @@ -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, `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.

Expand Down Expand Up @@ -1065,7 +1067,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 `<button class="ham-lead-act">` β€” `[Accept triage]` on *New Β· waiting for a maintainer's triage* and *Triage needed*, `[Merge now]` (or the server's lead answer) on *Ready for human merge*, `[Let hive decide]` on *Needs human decision* and a duplicate's *Needs a pick*, `[Adopt…]` on a returned contributor PR whose adoption is due, `[Close (read)]` on an advisory issue. `stageTrackerLeadAction(item, ctx)` picks it from the same `stageTrackerRowActions(...)` list the β‹― menu shows: the entry flagged `lead`, else the first *Decide…* option, else Adopt / Adopt now / *Let hive decide β€” all N PRs*; one button only, everything else stays in β‹―. It carries the menu entry's id, its hint as the hover and its enable/disable reason: a viewer without write access sees it greyed with *Sign in with write access to this repo*, a non-merger sees a merge action greyed with the role reason, never hidden. Clicking runs `runRowAction(action, row)` β€” the menu's own path, so the busy chevron, the acting caption, the toast and the history badge are the same. A row the server marks as the maintainer's move (`actor: maintainer` or `new.next_mover: maintainer`) that yields no lead is a bug: a development host logs a console warning, and `TestStageTrackerMaintainerRowsHaveLeadAction` runs the real fixtures through the picker.
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 `<button class="ham-lead-act">` β€” `[Accept triage]` on *Triage needed* (000-new hold or 015), `[Merge now]` (or the server's lead answer) on *Ready for human merge*, `[Let hive decide]` on *Needs human decision* and a duplicate's *Needs a pick*, `[Adopt…]` on a returned contributor PR whose adoption is due, `[Close (read)]` on an advisory issue. `stageTrackerLeadAction(item, ctx)` picks it from the same `stageTrackerRowActions(...)` list the β‹― menu shows: the entry flagged `lead`, else the first *Decide…* option, else Adopt / Adopt now / *Let hive decide β€” all N PRs*; one button only, everything else stays in β‹―. It carries the menu entry's id, its hint as the hover and its enable/disable reason: a viewer without write access sees it greyed with *Sign in with write access to this repo*, a non-merger sees a merge action greyed with the role reason, never hidden. Clicking runs `runRowAction(action, row)` β€” the menu's own path, so the busy chevron, the acting caption, the toast and the history badge are the same. A row the server marks as the maintainer's move (`actor: maintainer` or `new.next_mover: maintainer`) that yields no lead is a bug: a development host logs a console warning, and `TestStageTrackerMaintainerRowsHaveLeadAction` runs the real fixtures through the picker.

#### Row actions (right-click, β‹―, Shift+F10)

Expand Down
2 changes: 1 addition & 1 deletion src/docs/operator-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
9 changes: 8 additions & 1 deletion src/pkg/dashboard/stage_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,11 @@ func mentionLogins(logins []string) string {
return strings.Join(out[:len(out)-1], ", ") + " and " + out[len(out)-1]
}

// stageTrackerTriageNeededCaption is the caption of every reporter-trust
// held issue β€” 015 and a 000-new hold alike. The chevron already reads
// "Triage needed", so the caption carries only the maintainer's two moves.
const stageTrackerTriageNeededCaption = "Triage needed β€” accept or close"

func joinClause(head, clause string) string {
if clause == "" {
return head
Expand Down Expand Up @@ -1691,7 +1696,9 @@ func stageTrackerCaption(stage stagelabels.Stage, reason, author string, kind st
case stagelabels.Actionable:
return joinClause("Triaged and eligible; waiting for the scanner to pick it up", clause), "scanner"
case stagelabels.TriageNeeded:
return joinClause("Actionable, but no maintainer has looked at it yet; waiting for triage", clause), "maintainer"
// The lane reason ("triage needed: carries needs-triage") would say
// triage a third time after the chevron word; the caption is the ask.
return stageTrackerTriageNeededCaption, "maintainer"
case stagelabels.PossiblyExisting:
return joinClause("Prior art found; the author must confirm the gap (`/hive decision proceed β€” <gap>`) or close it (`/hive decision exists`)", clause), strings.TrimPrefix(who, "@")
case stagelabels.Claimed:
Expand Down
4 changes: 2 additions & 2 deletions src/pkg/dashboard/stage_tracker_accept_triage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ assert.ok(ids(stageTrackerRowActions({ ...triage, stage: 20, modifiers: ['needs-
// (hivecommons/hive#15215) offers it too; its hint reads the configured
// label and the row's own next pass. A 000-new issue the hive moves next
// (reporter admitted) does not: nothing to accept.
const fresh = { ...triage, stage: 0, stage_slug: '000-new', actor: 'maintainer', caption: 'New Β· waiting for a maintainer\'s triage (add ' + BT + 'triage/ok' + BT + '); the hive\'s next pass in 7m',
new: { next_mover: 'maintainer', next_mover_text: 'a maintainer\'s triage (add ' + BT + 'triage/ok' + BT + ')', next_pass_at: '2026-10-28T20:07:00Z', gates: [{ name: 'triage', state: 'next', text: 'a maintainer accepts triage (triage/ok)' }, { 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 ' + BT + 'triage/ok' + BT + '); the hive\'s next pass in 7m' } };
const fresh = { ...triage, stage: 0, stage_slug: '000-new', actor: 'maintainer', caption: 'Triage needed β€” accept or close',
new: { next_mover: 'maintainer', next_mover_text: 'a maintainer\'s triage (add ' + BT + 'triage/ok' + BT + ')', next_pass_at: '2026-10-28T20:07:00Z', gates: [{ name: 'triage', state: 'next', text: 'a maintainer accepts triage (triage/ok)' }, { name: 'actionable', state: 'later', text: 'the stage-label pass marks it 010 actionable' }, { name: 'claimed', state: 'later', text: 'the scanner claims it (020)' }], text: 'Triage needed β€” accept or close' } };
as = stageTrackerRowActions(fresh, ctx);
assert.strictEqual(ids(as)[0], 'accept-triage', 'a 000-new reporter-trust hold leads with Accept triage');
assert.strictEqual(as[0].hint, 'adds ' + BT + 'triage/ok' + BT + ' as @octo; the hive takes it on its next pass (β‰ˆ7 min)');
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/dashboard/stage_tracker_lead_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const labelOf = h => { const m = h.match(/>([^<]*)<\/button>/); return m ? m[1]

// The screenshot row: a 000-new issue the reporter-trust gate holds.
const fresh = { repo: 'o/r', kind: 'issue', number: 15437, title: 'Monitoring component', url: 'https://github.com/o/r/issues/15437', stage: 0, stage_slug: '000-new', actor: 'maintainer', modifiers: [], bucket: 'reporter_triage',
caption: 'New Β· waiting for a maintainer\'s triage (add ' + BT + 'triage/accepted' + BT + '); the hive\'s next pass in 10m',
caption: 'Triage needed β€” accept or close',
new: { next_mover: 'maintainer', next_pass_at: '2026-10-29T18:10:00Z', gates: [{ name: 'triage', state: 'next' }, { name: 'actionable', state: 'later' }, { name: 'claimed', state: 'later' }] } };
let lead = stageTrackerLeadAction(fresh, ctx);
assert.strictEqual(lead.id, 'accept-triage');
Expand Down
28 changes: 27 additions & 1 deletion src/pkg/dashboard/stage_tracker_new.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package dashboard

import (
Expand Down Expand Up @@ -149,7 +149,9 @@
}
}
n.Text = "New Β· waiting for " + n.NextMoverText
if pass != "" && n.NextMover == StageTrackerMoverHive {
if triagePending {
n.Text = stageTrackerTriageNeededCaption
} else if pass != "" && n.NextMover == StageTrackerMoverHive {
n.Text += " (" + pass + ")"
} else if pass != "" {
n.Text += fmt.Sprintf("; the hive's %s", pass)
Expand Down Expand Up @@ -203,6 +205,30 @@
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.
Expand Down
Loading
Loading