Repository navigation
✨ Surface items waiting on the operator: sidebar badge, topbar pill, filter, toast - #15639
Conversation
…toast The stage tracker payload gains waiting_on_human (count + items with repo, number, type, kind, since, who) and per-item waiting_on_you / wait_kind, computed from the fields the tracker already carries (stage, modifiers, decision_needed, adoption, takeover, decided, advisory). Hold, advisories, decided rows, nested PRs and contributors still inside their grace are not counted. The SPA reads it in three places: a second attention-coloured badge on the Hive activity monitor sidebar item (tooltip lists the five longest waits), a Waiting on you · N topbar pill hidden at zero that lands on the activity monitor with the new waitingOnYou filter (also reachable via ?filter=waiting-on-you), and a debounced toast (one per ten minutes, never in kiosk mode) with a Show action when the count rises. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Conclusion: the classification and payload shape look right to me; one ordering defect makes the documented "count a nested decision once" rule dead code, and the unit test is shaped so it cannot notice. Scoped to the Go side — I did not read the CSS/HTML beyond the wiring.
Nested-row dedup never fires (medium).
src/pkg/dashboard/stage_tracker_waiting.go:139 skips rows with it.NestedUnder != 0 ("Nested rows … are skipped so one decision is counted once"). But NestedUnder is assigned in exactly one place, stage_tracker.go:3243-3244, inside stageTrackerResolveLinkedPRs — and buildStageTracker calls stageTrackerWaitingOnHuman(resp.Items) at stage_tracker.go:2454, one line before stageTrackerResolveLinkedPRs at :2455. At call time every item has NestedUnder == 0, so a PR at 085 drawn under its issue at 045 is counted twice, flagged waiting_on_you on both rows, and the header count the badge/pill/toast show is inflated accordingly. TestStageTrackerWaitingOnHuman_KindsAndAttribution (stage_tracker_waiting_test.go, item Number: 63, NestedUnder: 20) hands the function a pre-nested item directly, so it passes without exercising the production order. Fix is either to move the call after stageTrackerResolveLinkedPRs (and before the final sort), or — if a PR waiting under a non-waiting issue should still count, which the filter chip arguably wants — drop the skip and the comment, and dedup on the issue side instead. Either way a buildStageTracker-level test with a linked issue+PR pair would pin it.
Note the pre-existing stageTrackerHumanCounts at :2453 has the same ordering and makes no nesting claim, so needs_human and waiting_on_human.count will at least disagree in the nested case once this is fixed one way or the other.
Verified as correct: Adoption/Presence/Takeover (:2187-2195), DecisionNeeded (:2321, :2404), Decided/Advisory and hold are all populated before :2454, so the kind switch and the grace/decided/advisory exclusions read real values. The JS fallback in tracker-waiting.js filters !it.nested_under but is only reached when the header block is absent, so it does not mask the server-side count. The toast is gated on count rising, localStorage 10-minute gap and kiosk mode, and uses the in-app showToast, not a native dialog.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
…ing into stage_tracker_build.go Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
…lt into tracker-words-stage.js Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Fixes #15638
Why
Maintainer: "tell me how we will fix me not knowing that the items are waiting on a human". A dozen PRs sat 3–21 h at 085 needs-decision and nothing in the dashboard added them up or said so. This is the surfacing layer; the 085 computation and suppressed-label rendering are fixed in separate PRs.
What
Backend (
stage_tracker_waiting.go, wired afterstageTrackerHumanCounts):/api/stage-trackergainskind ∈
needs-decision(045/085 or modifier),ready-for-human-merge(090),approve-needed(needs-human/unauthorized),returned-to-contributor-offline(071/072 only once the author's grace elapsed —Takeover.GraceElapsed/AdoptNow,Adoption.DueorPresence.Next=adopt;whois the contributor, operator is the fallback),other-human-wait(015). Hold, advisories,decided, nested PRs are excluded. Each item also carrieswaiting_on_you/wait_kind. No new state — only existing record fields.SPA (
tracker-waiting.js+ smalltracker-filter.jshooks):#activity-monitor-waiting-badgeon Hive activity monitor,--status-attention, hidden at 0, tooltip = 5 longest waits with kind + age.#oc-waiting-on-youbutton "Waiting on you · N" beside Health, hidden at 0; click →ocNavigate('activity-monitor-section')+hamFilter('waitingOnYou', true).?filter=waiting-on-youdeep-links the same view (param consumed once).waitingOnYou, persisted like the others, title covered by the help test).showToast(..., 'warning', {actionLabel:'Show', onAction, autoDismissMs})(countdown bar) when the count rises; ≤ 1 per 10 min (localStorage), never whenwindow.hiveKioskMode().Docs:
dashboard-sections.md→ How you'll know something is waiting on you; changelog fragment.Hub follow-up (not in this PR)
The heartbeat relay is fixed-shape across
spoke.GovernorSummary→hub.GovernorSummary→HiveStatus→hub_widget.go→openapi.yaml, and the spoke builds it incmd/hive/main.gowithout access to the stage-tracker build. Extending that chain is a separate change; the spoke-side truth (waiting_on_human.count) is in place for it.Tests
TestStageTrackerWaitingOnHuman_*(kinds, attribution, grace signals, zero/nil),stage_tracker_ui_test.go(badge/pill/chip ids, filter guard, kiosk guard).stage_tracker_waiting.test.js(badge/pill/chip rendering, tooltip cap, fallback, toast debounce + action + singular, kiosk, URL filter).go test -count=1 ./pkg/dashboard/ ./pkg/dashboard/webstatic/andnode --test stage_tracker_*.test.jsgreen locally;index.htmlregenerated withgo generate.No screenshots: no fixture hive available locally.