Skip to content

✨ Activity Monitor: live row feedback — confirm opt-out, result toasts, working cue, event line, merge celebration - #15014

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
feat/let-hive-decide-skip-confirm
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
feat/let-hive-decide-skip-confirm

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15012. Requested by @clubanderson.

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.

Once I take an action, I need to see something that indicates I took action and then see what that action was. And I need to see that some action is in progress.

This is piece (b) of the Activity Monitor feedback work — siblings: #14995 (needs-human options from PR comments, piece a) and #14992 (decision badge / trail, piece c). Enterprise-calm, plain words, not a game theme.

What changes

Server (additive). New pkg/dashboard/row_action_result.go: RowActionResult{action, target{repo,kind,number,url}, outcome, next, rule?, applied_at?} with action ∈ adopted | approved | recommended | closed | directed | refused | held | released | rescanned | triage-accepted | needs-human | noop-already-applied. Returned as result by the decision, delegated-decision (job payload), accept-triage, hold, send-to-human and rescan endpoints; existing fields untouched. The delegated path detects a repeat of the same rule and answers noop-already-applied with the prior applied_at. Tracker payload gains merged_24h (same detector as recently_merged, 24 h window) to seed the counter after a reload.

SPA (static/index.html).

  • runRowAction(action, row): one path for every context-menu / selection-bar action → marks the row (and nested PR sub-row) acting, posts, renders a persistent result toast (✕, link to target, stays until the target row's stage/caption/chips change; up to 5 stack; errors plain and sticky; legacy fallback when result is absent).
  • Don't ask again for this action on every row-action confirm (incl. sentinel-flagged Approve) → hive.tracker.confirm.<action>=skip; ⚙ → Confirmations → Reset confirmations. The ⚠ sentinel line is per head and is carried into the toast, so skipping the dialog never hides it.
  • tracker-cues block: cue-working (chevron icon turns only while an agent's current lastAction is on this item; tooltip leads Working now: …), cue-acting (stripes + caption + spinner), cue-event (one-line event from the poll/SSE diff, 2-min life, fades), cue-setback (red lead), cue-merged. Shared colour tokens --cue-state/--cue-work/--cue-decision on .ham-row, declared identically to ✨ Activity Monitor: needs-human popover says what to decide and offers the actions #14995 so either lands first.
  • Merged today: N toolbar chip (hex glyph, tooltip with last 5 and times, local-midnight reset, seeded from merged_24h). On merge: row pinned 2.5 s, ✓ cell glows, amber hex token flies ~520 ms to the chip, chip ticks +1 with a pop, zap on arrival (🔊 only), row exits. 200 ms stagger, max 3 flights, off-board merges still count, reduced motion = tick + glow, ⚙ → Merges → Celebrate merges (default on, hive.tracker.celebrate). Reusable celebrateRow(rowEl, {kind:'merged'|'closed-by-merge'}).

Docs docs/dashboard-sections.md: new What a row tells you without a click, Result toasts, Confirmations and "Don't ask again", Merged today paragraphs + legend (working / waiting on X / set back by Y / merged); Let hive decide "How it runs" updated. Changelog fragment added.

Cue → text table

Cue Where Text
State pill lit chevron existing stage words (Needs human decision, CI / Review …)
Working chevron icon turns; tooltip Working now: scout commented · 2m ago — <stage words>
Waiting still chevron; tooltip existing <stage> · Next move: human
Acting stripes on lit chevron + caption Approving… / Hive is deciding… / Holding… / Releasing hold… / Closing… / Sending… / Accepting triage… / Re-evaluating… / Marking needs-human…
Event line under strip Hive: moved to CI / Review · 12s ago · Hive: fell back to Claimed — a reviewer requested changes · Hive: waiting on a person · Hive: hold released · You: approved · Hive: merged #14947 · by hive
Result toast toast stack Hive decided on acme/console#14938 → PR #14947: adopted (contributor offline) / Adopted … in supersede mode as #14977. / The hive rebases and merges it unattended. / Open PR #14947 ↗
Result toast (no-op) toast No change — hive already recorded this decision at 12:01Z; still blocked by needs-human
Result toast (error) toast Hold failed on acme/console#7 — write permission required
Sentinel line confirm dialog and toast ⚠ Sentinel flagged security-relevant changes at 40a959b …
Confirm opt-out every row-action confirm Don't ask again for this action
Reset ⚙ → Confirmations Reset confirmations
Merge counter toolbar Merged today: 3 (tooltip: #14947 · 12:04, …)
Celebrate toggle ⚙ → Merges Celebrate merges

Three cue types per row (pill, working/acting, decision badge from #14992); the event line and merge glow do not blink; all motion 150–520 ms; prefers-reduced-motion stops every animation.

Screenshots

I could not drive a browser from this environment, so no before/after captures are attached; the celebration and acting states are exercised by the renderer tests below and can be previewed on a running dashboard via ⚙ → Merges and any row action. Happy to add a GIF if someone with a browser session can capture one.

Tests

  • stage_tracker_cues_test.go (new): wiring, working/waiting/event-line node tests, celebration (pin ≥2.5 s then release, token flight, count tick, zap on arrival, 200 ms stagger, cap 3, muted, reduced motion, off-board merge counts, toggle off, closed-by-merge).
  • stage_tracker_row_actions_test.go: runRowAction, acting indicator, result toasts (persist → dismiss on state change, stack, no-op, error), confirm skip → no dialog → toast carries ⚠, reset.
  • Go: TestDelegatedDecisionRepeatIsNoop, result assertions in delegated decision / hold / accept-triage tests.
  • Style ratchet and native-dialog ratchet pass (go test ./pkg/dashboard/webstatic, ./pkg/dashboard -run 'StageTracker|Native|Style|HivePrompt|Ham').

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

@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
#15016 ✨ Adoption: maintainer_policy adopt|ask|never (default adopt); 072 row says why and offers Adopt same files src/docs/dashboard-sections.md
src/pkg/dashboard/api_repo_item_decision.go
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static/index.html
#15011 🐛 Close superseded hive PRs automatically and re-stage adopted originals out of the merge gate same files src/pkg/dashboard/static/index.html
#14992 ✨ Activity monitor: decision badge shows what you chose and what hive did next CONFLICT src/pkg/dashboard/api_repo_item_decision.go
src/pkg/dashboard/stage_tracker_ui_test.go
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html
#14987 ✨ review: gate PR reviews on an approval label (review.require_labels) same files src/docs/dashboard-sections.md
src/pkg/dashboard/static/index.html
#15003 ✨ feature: show Activity Monitor operator decision trails same files src/pkg/dashboard/stage_tracker_ui_test.go
src/pkg/dashboard/static/index.html

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

Why:

  • the branch conflicts with the base and needs a rebase

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.

@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
@clubanderson
clubanderson force-pushed the feat/let-hive-decide-skip-confirm branch from de2b9ac to b008523 Compare October 28, 2026 17:07
@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 stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act 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.

Why:

  • the branch conflicts with the base and needs a rebase

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.

@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
…s, working cue, event line, merge celebration

Every row action now goes through one SPA helper (runRowAction) that marks
the row acting, posts the request and renders a persistent result toast
from a shared result payload (action, target, outcome, next, rule,
applied_at) that the decision, delegated-decision, accept-triage, hold,
send-to-human and rescan endpoints all return additively. Each confirm
dialog carries a "Don't ask again for this action" box persisted per
action id (hive.tracker.confirm.<action>=skip) with one Reset
confirmations button in ⚙; the sentinel ⚠ line travels into the toast so
skipping never hides it. The lit chevron turns only while a hive agent is
on the item (tooltip: Working now), a one-line event line says what just
happened, and a merge pins the row while an amber hex token rises into a
new "Merged today: N" counter (seeded from merged_24h; toggle Celebrate
merges; reduced-motion and 🔇 honoured).

Requested by @clubanderson.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…e fixtures over stdin

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
… cue tokens, popover test with runRowAction present)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/let-hive-decide-skip-confirm branch from b008523 to 1eb938d Compare October 28, 2026 17:23
@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
hivecommons-hive Bot merged commit 11bad72 into v5 Oct 28, 2026
80 of 82 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/let-hive-decide-skip-confirm branch October 28, 2026 17:33
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#150141eb938d` sha256:d30eae5d3ae501ec78ffdaab274fd7709523d2eef7d7551506319f39a483abeb — download from the dashboard or `hivectl review evidence #15014`.

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

@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

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

1 participant