Repository navigation
✨ Activity monitor: decision badge shows what you chose and what hive did next - #14992
Conversation
|
[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
|
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
Triage of the red checks at d0355f7 (all PR-local; base
Also carries 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Heads-up on overlap: two open hive PRs implement the same ledger this PR adds — #15004 (server: src/pkg/dashboard/operator_actions.go, /data/operator-actions.json, last_operator_action / operator_action_count, GET /api/repos/{owner}/{repo}/items/{number}, Closes #14996) and #15003 (UI badge + Decisions filter, Closes #14998). I read all three diffs; they conflict rather than duplicate:
- This PR's
outcomeis a closed vocabulary (pending|applied|no-op|failed|superseded-by-state-change,operator_actions.goconsts) withdetail,target,head_shaand a derivedstate/followed[]. #15004 stores free-textoutcomewith"ok"on success andhead; #15003's UI hard-codesoutcome !== 'ok'⇒ failed, so it cannot sit on this server. operator_action_countisomitemptyhere, unconditional in #15004.
Scope-wise this PR is the superset (ledger + derived state + badge + filter + copy table + GET …/items/{number}), and its body cites the #14991 owner request verbatim; #14996/#14998 read as the hive's split of that request. The decision question — which implementation lands on v5 — is raised on #15004 and addressed to you. If this one is chosen, #15004 and #15003 can be closed as superseded. I have not closed anything.
Not a full line-by-line read of the 1.4k-line UI change here; this comment is only about the overlap.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether #14992 (ledger + badge in one PR) or the split pair #15004 (server ledger, #14996) + #15003 (badge UI, #14998) is the one that lands — they create the same src/pkg/dashboard/operator_actions.go with incompatible last_operator_action shapes and cannot both merge.
Conclusion: the server ledger here is sound, but this PR conflicts with #15004/#15003 (same new files, different wire shape), and the current head is red for two reasons that are this diff's own.
1. Collides with #15004, not a duplicate. Both PRs create src/pkg/dashboard/operator_actions.go and operator_actions_test.go, write /data/operator-actions.json, register GET /api/repos/{owner}/{repo}/items/{number}, and add last_operator_action / operator_action_count to tracker rows. But the shapes differ: this PR's StageTrackerOperatorAction (operator_actions.go:461-482) carries state, stage_at, followed[], head_sha, detail, target; #15004's OperatorAction (operator_actions.go:18-25) carries head, stage, note. #15003's UI reads action.stage (not stage_at), so it is wired to #15004's server, not this one. One of the two lines has to be chosen; I have not closed anything.
2. Existing node fixtures don't include the new helpers (test (dashboard 1/4) et al.). stageTrackerRowHtml now calls stageTrackerActedBadgeHtml (static/index.html:14648, :14882) and stageTrackerNormalizeFilter reads STAGE_TRACKER_ACTED_FILTERS (:15386), but the Go fixtures assemble an explicit allowlist of functions via jsFunction/jsConstLine (stage_tracker_ui_test.go:86-…), and this PR only adds the new stage_tracker_acted.test.js. Result in CI: ReferenceError: stageTrackerActedBadgeHtml is not defined at stage_tracker_gutter_test.go:250 and stage_tracker_motion_test.go:652, STAGE_TRACKER_ACTED_FILTERS is not defined at stage_tracker_ui_test.go:1015. The three fixtures need the new const + badge helper appended (as #15003 does with its stageTrackerOperatorJS helper).
3. dashboard/openapi.json lacks the new route. TestOpenAPISpecCoversEveryRegisteredRoute fails (openapi_route_parity_test.go:388, "495 registered, 485 documented, 1 problem"); the diff touches api-reference.md but not dashboard/openapi.json, which has …/items/{number}/hold (line 28207) but no bare …/items/{number} GET. Same gap exists in #15004.
Body vs diff: the body's claims (ledger, badge, filter, followed[] trail, docs) all match the code I read. No security concerns: the GET route sits behind the same mux as the existing item routes, and the ledger is written atomically via tmp+rename.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
…er node fixture via stdin
cssRule() finds the first ".config-info {" so the badge override is
spelled .config-info.ham-acted; TestStageTrackerRows' lifted script
outgrew one argv entry (E2BIG) and now arrives on stdin.
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
1ff2e17 to
d7f4046
Compare
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
…elope citation drift - settle let-hive-decide records on the delegated no-op path (was left pending) - derive outcome=no-op with a plain-words detail from the shared RowActionResult (what hive had already decided, when, what still blocks it) - tooltip: 'nothing changed: …' plus the remaining enabled options from decision_needed - translate lane slugs embedded in sentences; add Go + node no-op tests - scale-envelope.md: drop stale AgeMinutes anchor (pre-existing drift breaking the docs job) Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 19b04ba. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
Follow-up from a live operator-eyes walkthrough of hive's own dashboard (12:11–16:59 ET, before/after the aa9b530 roll): #15096. Relevant to this PR's scope (decision badge / trail): G5 — no row on the board showed a decision badge at 16:59 even though |
Fixes #14991
Owner request (2026-10-28, verbatim)
This PR is part (c): the decision trail on the row. (a) options-from-PR-comments popover and (b) in-flight chevron progress / toasts / live event line land in sibling PRs; the three cues a row may carry — state pill, working spin, decision badge — are named in one shared legend paragraph in
dashboard-sections.md. Nothing here blinks; the badge is static and plain.What changed
Server —
src/pkg/dashboard/operator_actions.go/data/operator-actions.json(newest 20 per item), written byrecordOperatorAction(...)wrapped around the existing routes:hold,decision,decide-delegated,send-to-human,accept-triage. Rejected requests (4xx other than 409) are not recorded; 409 →no-op; aresult.action == noop-already-applied(sync or delegated) →no-opwith a plain-words detail (prior verdict, when, what still blocks it); 202 →pending, settled when the delegated job finishes — including on the no-op path.{action, actor, at, note, target, outcome: pending|applied|no-op|failed, detail, head_sha, stage}.last_operator_action+operator_action_count.last_operator_actionadds derivedstate(waiting|addressed|stuck|pending|failed),stage_at,stuck_after_seconds(HIVE_OPERATOR_ACTION_STUCK_AFTER, default 30m) andfollowed[]— the stage hops after the action, so the row can tell the owner's choice → the hive's moves, in order. A failed/no-op action whose item moved on anyway readsoutcome: superseded-by-state-change.GET /api/repos/{owner}/{repo}/items/{number}→{repo, number, stage, stage_slug, operator_actions[], operator_action_count, last_operator_action}.UI —
static/index.html(additive; notitleattrs for the rich tip; tokens only, style ratchet clean).ham-acted) in the cap cell before the state pills; green / amber (stuck) / red (failed) / dotted…(hive deciding). Tab-reachable; hover or focus opens the shared in-app.config-infotooltip portal.Copy (cue → text) — plain words, no stage codes, no slugs (
contributor-lane:changes-requested→ "a reviewer requested changes; needs a new commit"). Order everywhere: what it is waiting on → what you chose → what happened.At Merge gate — waiting on CI./You chose Approve · 15:55 (5 min ago) · done — released to the hive.Addressed — now at Merged./You chose Approve · 15:55 (5 min ago) · done./Then the hive moved it to Merged — a reviewer approved it · 1 min ago.Still at Merge gate 42 min after you asked — hive says: waiting on a reviewer./You chose Approve · 15:13 (42 min ago) · done.At Needs decision while the hive decides./You chose Let hive decide · 15:55 (5 min ago) · the hive is deciding….At Merge gate — waiting on your decision./You chose Let hive decide · 14:23 (5 min ago) · nothing changed: the hive had already decided 'supersede' at 13:01 UTC and it has not taken effect — still blocked: a reviewer requested changes; needs a new commit./Options: Merge as maintainer · Send back for a new commit.(options = the row'sdecision_needed.optionsthat are enabled, minus the one just taken)Still at Merge gate — try again, or act on GitHub./You chose Approve · 15:55 (5 min ago) · failed — github 502.Then the hive sent it back to PR in progress — a reviewer requested changes; needs a new commit · 1 min ago.@someone chose Hold · …Your note: …·2 earlier actions on this item.3-second pass: each tooltip opens with where the item is and what it waits on, then one line per fact; no codes, no hive-internal words.
Screenshots: the badge renders inside the existing cap cell (✓ pill next to the
hold/needs humanpills); before = no indicator after acting. A live board could not be captured from this environment — it shows on any row after Approve on the preview.Tests
operator_actions_test.go— store record/settle/cap/persist round-trip, request→action mapping, response→outcome, state transitions (waiting/stuck/addressed/failed/pending, hold/release/needs-human/accept-triage, superseded-by-state-change), followed trail, end-to-end recording throughPOST …/decision+GET …/items/{n}+ row payload.stage_tracker_acted.test.js— badge HTML/a11y, tooltip copy per state, trail, plain-words gloss, filter modes, toolbar wiring.Docs
dashboard-sections.md(badge paragraph, pill-table row, shared three-cue legend),api-reference.md(new GET row; citations re-fixed viacheck-api-reference-citations.sh --fix),changelog.d/added-operator-action-badge.md.Requested by @clubanderson.