Skip to content

✨ Activity monitor: decision badge shows what you chose and what hive did next - #14992

Merged
hivecommons-hive[bot] merged 5 commits into
v5from
feat/operator-action-badge
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
v5from
feat/operator-action-badge

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Fixes #14991

Owner request (2026-10-28, verbatim)

I need a way to see if I selected an action on an item so I can keep track of whether or not I addressed it. Hovering over the indicator should show me what action I requested.

Once I take an action, I need to see something that indicates I took action and then see what that action was. […] we need visual cues to let people know (a) what the current state is, (b) if work is happening in the current state, (c) what decisions were made by the human and hive to affect the state.

Hive is doing the right things mostly; we now need to keep the user informed of it — like a video game they can watch and see what happens easily.

This has to be exceedingly clear, easy to read, and concise.

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

  • Ledger /data/operator-actions.json (newest 20 per item), written by recordOperatorAction(...) 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; a result.action == noop-already-applied (sync or delegated) → no-op with 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.
  • Record: {action, actor, at, note, target, outcome: pending|applied|no-op|failed, detail, head_sha, stage}.
  • Tracker rows and linked PRs gain last_operator_action + operator_action_count. last_operator_action adds derived state (waiting|addressed|stuck|pending|failed), stage_at, stuck_after_seconds (HIVE_OPERATOR_ACTION_STUCK_AFTER, default 30m) and followed[] — 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 reads outcome: superseded-by-state-change.
  • New 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; no title attrs for the rich tip; tokens only, style ratchet clean)

  • ✓ badge (.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-info tooltip portal.
  • Decisions select in the toolbar: Any / Awaiting my decision / I acted / Acted, still stuck.
  • Issue rows drawn over a single covering PR borrow that PR's badge.

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.

cue text
✓ green, same stage At Merge gate — waiting on CI. / You chose Approve · 15:55 (5 min ago) · done — released to the hive.
✓ green, moved on 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.
✓ amber (stuck) Still at Merge gate 42 min after you asked — hive says: waiting on a reviewer. / You chose Approve · 15:13 (42 min ago) · done.
… dotted (pending) At Needs decision while the hive decides. / You chose Let hive decide · 15:55 (5 min ago) · the hive is deciding….
✓ green, no-op (owner's #14822 case) 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's decision_needed.options that are enabled, minus the one just taken)
✗ red (failed) Still at Merge gate — try again, or act on GitHub. / You chose Approve · 15:55 (5 min ago) · failed — github 502.
set back Then the hive sent it back to PR in progress — a reviewer requested changes; needs a new commit · 1 min ago.
someone else @someone chose Hold · …
extra lines Your note: … · 2 earlier actions on this item.
filter Decisions: Any · Awaiting my decision · I acted · Acted, still stuck

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 human pills); 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

  • Go: 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 through POST …/decision + GET …/items/{n} + row payload.
  • Node: 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 via check-api-reference-citations.sh --fix), changelog.d/added-operator-action-badge.md.

Requested by @clubanderson.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#14989 ✨ feat: let a sandboxed reviewer post reviews through a workspace spool CONFLICT src/docs/scale-envelope.md
#15049 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/docs/api-reference.md
#14524 ✨ feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/docs/api-reference.md
#15044 📖 docs: clarify per-repo DCO routing at level 6 CONFLICT src/docs/scale-envelope.md
#15039 🐛 fix(inference): reject requests without a configured model CONFLICT src/docs/scale-envelope.md
#15003 ✨ feature: show Activity Monitor operator decision trails CONFLICT src/pkg/dashboard/static/index.html
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/docs/api-reference.md
src/pkg/dashboard/server.go
src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@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.

@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • test (dashboard 1/4)
  • test (dashboard 2/4)
  • test (dashboard 3/4)
  • test (dashboard 4/4)
  • test (dashboard shuffle 2/3)
  • test (dashboard shuffle 3/3)

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.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Triage of the red checks at d0355f7 (all PR-local; base v5 is green):

  1. test (dashboard 1/4–4/4, shuffle 1/3–3/3) — every node fixture failure (TestStageTrackerGutterOnEveryRowAfterReconcile, TestStageTrackerMotionPreviewSample, TestStageTrackerFilterSortPage, …) is the same ReferenceError:

    ${stageTrackerHeadColsHtml(prRefs, leadHtml, stageTrackerActedBadgeHtml(item, nowMs) + stageTrackerChipsHtml(shown))}
    ReferenceError: stageTrackerActedBadgeHtml is not defined   at stageTrackerRowHtml ([eval]:729:46)
    

    The Go tests extract the stage-tracker script slice (stageTrackerRowHtml and its callees) and eval it in node; the new stageTrackerActedBadgeHtml helper is defined outside the slice those fixtures load. Fix: define stageTrackerActedBadgeHtml next to stageTrackerChipsHtml inside the extracted region (or extend the fixture's extraction markers to include it) so the harness sees it.

  2. test (dashboard 1/4) TestOpenAPISpecCoversEveryRegisteredRoute — GET /api/repos/{owner}/{repo}/items/{number} is registered but missing from src/pkg/dashboard/openapi.json (495 registered, 485 documented). Add the path entry (or a routeParityException with a reason).

  3. coverage / test — aggregates of the above; they go green once the shards do.

Also carries conflicts-with-open-pr; see the overlap report above before rebasing.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 outcome is a closed vocabulary (pending|applied|no-op|failed|superseded-by-state-change, operator_actions.go consts) with detail, target, head_sha and a derived state/followed[]. #15004 stores free-text outcome with "ok" on success and head; #15003's UI hard-codes outcome !== 'ok' ⇒ failed, so it cannot sit on this server.
  • operator_action_count is omitempty here, 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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
…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>
@clubanderson
clubanderson force-pushed the feat/operator-action-badge branch from 1ff2e17 to d7f4046 Compare October 28, 2026 18:19
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • relative links and anchors resolve

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.

@hivecommons-hive hivecommons-hive Bot added stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • relative links and anchors resolve

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>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 28, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 9be2fee into v5 Oct 28, 2026
81 of 83 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#1499219b04ba` sha256:c913f6f0dd0871893c2213faff726430eb9eb3f661b445330b2403419d9265ef — download from the dashboard or `hivectl review evidence #14992`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 19b04ba.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@kubestellar-prow
kubestellar-prow Bot deleted the feat/operator-action-badge branch October 28, 2026 18:48
@clubanderson

Copy link
Copy Markdown
Member Author

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 Merged today listed operator-driven merges minutes earlier, and the trail still has no actor/time/reason; G7 — post-action acknowledgement could not be observed; N2 — the needs-human chevron lost its hover text (title="", text now in unrendered data-ham-tip). Also note N1 (needs-human popover does not open on stage-085 rows) which blocks reaching the decision actions this badge records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves conflicts-with-open-pr Open PR has a merge conflict with another open PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity monitor: show that I acted on an item, what I chose, and what hive did next

1 participant