Repository navigation
π stage tracker: Let hive decide shows it is working, covered issues drop the PR's chip, π€ says why - #15783
hivecommons-hive[bot] wants to merge 4 commits into
Conversation
β¦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>
|
[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 |
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
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>
|
stage 080-awaiting-merge-admission β 070-fixing: required-check-failing:build-and-test |
There was a problem hiding this comment.
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) withServer-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) andtracker-row.js~L1176; #15793 already carriesconflicts-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
There was a problem hiding this comment.
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.cssand the regeneratedstatic/index.html:- Busy lead button β both add an
aria-busy"Asking the hiveβ¦" button with thetoast-spinner cue-acting-spinglyph and ignore a second click while a plan is in flight (here:stageTrackerBeginAsking/stageTrackerAskingSyncand thearia-busyguard in the lead-button click handler; #15793: same label/guard plus a skeleton preview dialog). - Covered issue chip β both return
nullfromstageTrackerLeadActionOnRowwhen the PR isdrawn_underanother issue and render a passive "decision pending on #N" chip (stageTrackerDecisionPendingChipHtmlexists under that exact name in both PRs). - π€ reason β this PR builds it client-side (
stageTrackerHumanReasonintracker-row.js); #15793 builds it server-side (stage_tracker_human_reason.go, +237) and renders the field intracker-row.js.
- Busy lead button β both add an
- 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 passess.deps.Ctxrather 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 infinish; keys include head andmergerRole. Nothing wrong found there. - Because both edit the same regions of
tracker-actions.js(the lead-button click handler,stageTrackerLeadActionHtml,stageTrackerDelegatePreview) and both regenerateindex.html, they cannot both merge β whichever lands second will conflict. #15793 already carriesconflicts-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
|
/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. Decided by the hive at @clubanderson's request as the owner's delegate under the owner-delegate policy (rule |
|
Decision recorded by @clubanderson for head Recorded from the hive dashboard. |
|
stage 080-awaiting-merge-admission β 070-fixing: human-changes-requested |
Why
Owner report on the stage tracker (#15773):
POST β¦/decide-delegated/plan(2β6 s) and nothing on the row or button changes until the preview opens. The owner wanted feedback "consistent with the rest of the activity tracker".What changes (client only;
static-srcedited,index.htmlregenerated by concatenating the parts listed inmanifest.txt)A. Busy state (tracker-actions.js, tracker.css)
disabledandaria-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).stageTrackerSetPending) for that time.finally, so a failed fetch brings the button back.C. Covered issues (tracker-actions.js, tracker-row.js)
drawn_under) no longer carries that PR's lead button. Only the PR's row does.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.questionandstage_actor.why.Tests:
src/pkg/dashboard/stage_tracker_let_hive_decide.test.js(node:test, lifts the helpers fromstatic/index.html). Docs:src/docs/dashboard-sections/activity-monitor.md. Changelog:changelog.d/fixed-tracker-let-hive-decide-feedback.md.Overlap
static-src/js/tracker-row.js, which open PR π± refactor: split tracker row sourceΒ #15771 (hive/adopt-15521) splits mechanically into tracker-row / -acted / -layout / -strip. The edits are small and local: the human-reason helper next tostageTrackerActorTip, one line instageTrackerStripItems, the covered-PR helpers next tostageTrackerLinkedElsewhere, and two lines instageTrackerRowHtml. That keeps the re-split easy.tracker-filter.js(π± refactor: split static-src/js/tracker-filter.js into 4 filesΒ #15706) is not touched.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-Timingand a duration log line on the plan route; and from D, a server-sidehuman_reasonfield. 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