Skip to content

πŸ› stage tracker: Let hive decide shows it is working, covered issues drop the PR's chip, πŸ‘€ says why - #15783

Closed
hivecommons-hive[bot] wants to merge 4 commits into
v5from
scanner/fix-15773
Closed

hivecommons-hive[bot] wants to merge 4 commits into
v5from
scanner/fix-15773

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why

Owner report on the stage tracker (#15773):

What changes (client only; static-src edited, index.html regenerated by concatenating the parts listed in manifest.txt)

A. Busy state (tracker-actions.js, tracker.css)

  • From the click until the preview opens, the lead button is disabled and aria-busy. It reads Asking the hive… next to the existing acting glyph (toast-spinner cue-acting-spin, static, so it is safe with reduced motion).
  • The clicked row and the PR it decides get the existing acting wash and caption (stageTrackerSetPending) for that time.
  • A re-render during the fetch keeps the busy button.
  • A second click is ignored (no double-fire). The busy state is cleared in a finally, so a failed fetch brings the button back.

C. Covered issues (tracker-actions.js, tracker-row.js)

  • An issue whose parked PR is drawn under another issue (drawn_under) no longer carries that PR's lead button. Only the PR's row does.
  • The covered issue shows a passive decision pending on #N chip that scrolls to the PR's row.
  • Its caption and next-move line read Covered by PR #N β€” waiting for a decision on the PR.

D. πŸ‘€ says why (tracker-row.js)

  • stageTrackerHumanReason(item) builds the reason only from fields the payload already has: the covered issue's parked PR, human_merge_reason, decision_needed.question and stage_actor.why.
  • A short reason (40 characters or fewer) goes after the πŸ‘€, with the full reason as its hover, e.g. "PR in progress πŸ‘€ Β· 🌱 deploy: dedicated metrics Secret for the monitoring component and CI render of kustomize overlaysΒ #15759 needs a decision", "Ready for human merge πŸ‘€ Β· workflow files", "Fixing πŸ‘€ Β· @sam must push a fix".
  • When the chevron word already states the ask (Needs human decision, Triage needed), the short reason is left out.
  • The test checks that every human mover has a non-empty reason. No server or payload change was needed.

Tests: src/pkg/dashboard/stage_tracker_let_hive_decide.test.js (node:test, lifts the helpers from static/index.html). Docs: src/docs/dashboard-sections/activity-monitor.md. Changelog: changelog.d/fixed-tracker-let-hive-decide-feedback.md.

Overlap

Refs #15773 (remaining: from A, the preview opening at once as a skeleton (Cancel enabled, Confirm disabled) with inline errors and Retry; all of B, the latency cut: a short-TTL plan cache keyed by (repo, number, type, head, request) shared by a prefetch, plus Server-Timing and a duration log line on the plan route; and from D, a server-side human_reason field. This PR derives the reason on the client from existing fields.)

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson

…PR row, say why a human is wanted

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 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

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

github-actions Bot commented Oct 30, 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
#15774 ✨ dashboard: onboarding and GitHub App errors point to the Getting Started guide same files src/pkg/dashboard/static/index.html
#15771 🌱 refactor: split tracker row source CONFLICT src/pkg/dashboard/static-src/js/tracker-row.js
#15804 ✨ Show the upgrade animation for every roll (announce + SIGTERM fallback) same files src/pkg/dashboard/static/index.html
#15812 πŸ› automerge: hold same-issue PRs across lanes until a decision is recorded same files src/pkg/dashboard/static/index.html
#15830 ✨ dashboard: pop out the Hive activity monitor into its own window and a full-screen toggle same files src/docs/dashboard-sections/activity-monitor.md
src/pkg/dashboard/static/index.html
#15817 πŸ› activity monitor: 'merging now' lingers, silent merges, closed rows vanish same files src/pkg/dashboard/static/index.html
#15831 πŸ› Merge train seats only PRs green and reviewed on their current head; regressed members are ejected same files src/pkg/dashboard/static/index.html
#15834 ✨ stage tracker: PR sub-row names the other issues it also closes same files src/docs/dashboard-sections/activity-monitor.md
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15824 ✨ Activity Monitor settings: configurable toast durations and pre-merge soak same files src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static-src/js/tracker-actions.js
src/pkg/dashboard/static/index.html

@github-actions github-actions Bot added conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added the role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) label Oct 30, 2026
TestStageTrackerRowActionsWiring scans the row-actions CSS block for literal
colours with a crude substring check ('#f', '#0', '#1', 'rgb('). The new
busy-state comment cited #15773, which trips '#1'. Reword the
comment so the citation carries no hash; regenerate index.html.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 080-awaiting-merge-admission β†’ 070-fixing: required-check-failing:build-and-test

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot removed the stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it label Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed β€” no findings from this perspective.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

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 this client-only fix for #15773 should be closed in favour of #15793, which carries the same busy state, covered-issue chip and πŸ‘€ reason plus the server-side plan cache/prefetch β€” or whether this one lands first and #15793 is rebased onto it.

This appears to overlap #15793, which makes the same change for #15773 to the same files, and the two conflict β€” both cannot merge.

Read both diffs in full. Both PRs implement every part of #15773 on the same four client files (static-src/js/tracker-actions.js, static-src/js/tracker-row.js, static-src/css/tracker.css, regenerated static/index.html):

#15773 ask this PR (#15783) #15793
A. button shows it is working stageTrackerLeadBusyHtml / stageTrackerBeginAsking β€” disabled, aria-busy, "Asking the hive…" with toast-spinner cue-acting-spin; aria-busy click guard stageTrackerDelegateButtonBusy β€” same attributes, same caption, same glyph; _stageTrackerDelegateOpen guard
C. covered issue drops the PR's chip stageTrackerLinkedDrawnElsewhere + stageTrackerCoveredDecisionPR derived client-side from linked_prs[].drawn_under; passive .ham-decision-pending chip β†’ stageTrackerGotoRow new server field decision_pending_on (stage_tracker.go, stage_tracker_human_reason.go) + stageTrackerDecisionPendingOn; passive .ham-chip-passive chip β†’ hamBannerShowRow
D. πŸ‘€ says why stageTrackerHumanReason computed client-side in tracker-row.js human_reason computed in Go (stage_tracker_human_reason.go, 237 lines) and rendered by the SPA

The differences that matter:

  • #15793 is a strict superset. It additionally opens the preview dialog immediately as a skeleton with inline error + Retry (stageTrackerDelegatePlanSkeletonHtml / …ErrorHtml), adds a server-side single-flight plan cache (delegated_plan_cache.go) with Server-Timing, prefetches on hover/focus, and parallelises the handler's GitHub reads. This PR is client-only (604 additions vs 1769).
  • Different data contract for C/D. This PR derives "covered" and the πŸ‘€ reason from fields already in the payload; #15793 adds two server fields (decision_pending_on, human_reason) and a test that every human-actor item has a non-empty reason. Whichever lands, the other's client logic is dead on arrival β€” not just a textual conflict.
  • Both edit the same region of stageTrackerLeadActionOnRow / stageTrackerLeadActionHtml (tracker-actions.js ~L492–520) and tracker-row.js ~L1176; #15793 already carries conflicts-with-open-pr.

On this PR's own code I found nothing wrong: the typeof … === 'function' guards cover the part-concatenation order, the busy state is cleared in finally, and stageTrackerCoveredDecisionPR correctly returns null when the issue draws an open PR itself. CI was still running at review time (head e04062a).

Flagging for a maintainer: if #15793 is the intended fix for #15773, this one could be closed in favour of it (broader scope, owner-authored, Closes #15773). If the client-only change should land first, #15793 needs a rebase onto it and its client half mostly disappears. I have not closed anything.

β€” 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 Author

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 #15783 should be closed in favour of your #15793, which carries the same three #15773 fixes plus the server-side plan cache, and conflicts with this one on the same client files.

This appears to duplicate #15793, which makes the same change for #15773 and conflicts with it on the same files.

What I verified by reading both diffs in full:

  • Both PRs implement the same three fixes from #15773 in src/pkg/dashboard/static-src/js/tracker-actions.js, tracker-row.js, css/tracker.css and the regenerated static/index.html:
    • Busy lead button β€” both add an aria-busy "Asking the hive…" button with the toast-spinner cue-acting-spin glyph and ignore a second click while a plan is in flight (here: stageTrackerBeginAsking/stageTrackerAskingSync and the aria-busy guard in the lead-button click handler; #15793: same label/guard plus a skeleton preview dialog).
    • Covered issue chip β€” both return null from stageTrackerLeadActionOnRow when the PR is drawn_under another issue and render a passive "decision pending on #N" chip (stageTrackerDecisionPendingChipHtml exists under that exact name in both PRs).
    • πŸ‘€ reason β€” this PR builds it client-side (stageTrackerHumanReason in tracker-row.js); #15793 builds it server-side (stage_tracker_human_reason.go, +237) and renders the field in tracker-row.js.
  • The two are not identical: #15793 is a superset. It also adds a single-flight, TTL plan cache (delegated_plan_cache.go) with invalidation on decision (api_repo_item_decide_delegated.go), hover/focus prefetch, and parallel GitHub reads in the ladder. I read the cache against the v5 tree: the handler passes s.deps.Ctx rather than the request context (api_repo_item_decide_delegated_plan.go:106-109), so a cancelled prefetch does not poison waiters; failed gathers are evicted in finish; keys include head and mergerRole. Nothing wrong found there.
  • Because both edit the same regions of tracker-actions.js (the lead-button click handler, stageTrackerLeadActionHtml, stageTrackerDelegatePreview) and both regenerate index.html, they cannot both merge β€” whichever lands second will conflict. #15793 already carries conflicts-with-open-pr.

Which should survive: #15793 β€” it is the owner's own fix for the owner's report, it states Closes #15773, and it addresses the latency itself (cache + prefetch) rather than only showing a spinner over the 2–6 s wait. This PR's client-only approach is sound, but everything it does is covered there.

Flagging for a maintainer: if you agree, this one could be closed in favour of #15793. I have not closed anything.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/hive decision make CI green without widening scope; keep the smallest reversible change, then it merges

Rationale: the head is not mergeable yet; the direction names the fix and nothing else.

Hive decided: Told the author agent what to change.
Why: The branch isn't mergeable yet.
What happens next: The author agent pushes a new commit with that change β€” expected within 30 min.
If it doesn't happen: Re-run the decision, give different direction, or close it.

Decided by the hive at @clubanderson's request as the owner's delegate under the owner-delegate policy (rule fix-then-merge).

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Decision recorded by @clubanderson for head ce6376f. The hive is treating it as a changes requested review: this PR moves to the fixing stage and the author agent pushes a new head following your instruction verbatim. The review swarm then re-reviews that head; if it approves, the PR comes back for your merge approval.

Recorded from the hive dashboard.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 080-awaiting-merge-admission β†’ 070-fixing: human-changes-requested

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

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants