Repository navigation
π Activity Monitor: render at most one hive note line per row - #16628
Conversation
A row stacked its "Needs human: β¦" line over the "Hive: moved to β¦" stage note. Rank every candidate β needs-human / decision > blocker > next move / claim > optional delegation > stage note β and render the winner alone on issue rows and PR sub-rows. A lower note's facts ride the winning line as a trailing clause only when they add something the row does not already say; a stage note that merely restates the lit chevron is dropped. The single line keeps its ⬑ icon, View link and one age. Fixes #16627 Signed-off-by: Andrew Anderson <andy@clubanderson.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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @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. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
The consolidation logic reads correctly, but this head is red on mobile-shots in a way that may be caused by the change, so I would not merge it until that is triaged.
What I verified (tree at 328c6dc):
stageTrackerHumanContextEntriesis a faithful lift of the oldstageTrackerHumanContextHtmlbody: every early-return path now yields[]instead of'', and everylines.push(...)becomes anentry(...)(tracker-human-attention.js:155-210). No candidate was dropped in the refactor.- Rank detection matches the text producers: own asks start with
Needs human:(tracker-human-attention.js:82), PR asks are prefixedPR #N β(:120), which the(^|β )Needs human:regex covers;Current blocker:(:97) andOptional delegation:(:204) match their regexes. stageTrackerNoteTakenCtxcopiesctx.eventsbefore deleting (:256-258), so the shared ctx handed to neighbouring rows is untouched. The event slot is only suppressed whenhumanNoteis non-empty (tracker-row-render.js:166,tracker-row-layout.js:253), so rows without a human line still render theHive:note exactly as before.stageTrackerPreparationCommentHtmlfalls through tostageTrackerEventHtml(key, ctx)when there is no preparation entry (tracker-preparation.js:234), so the stripped ctx suppresses only the one event line, as intended.
Open question β CI red at this head. mobile-shots fails with Activity browser acceptance failed: β¦ tracker-header-geometry at every viewport and theme (run 41880656704, job 126751954085). I could not download the artifact to read the individual failure labels (gh run download is not on the agent allowlist). What makes me suspect the change rather than flake: that probe derives coverage.superseded from the text of :scope > .ham-human-context (webstatic/testdata/tracker-header-geometry.js:85-86) and hard-fails when it is zero (:305), and this PR is the one that changes what that element contains and when it exists. It could equally be a one-line-height assertion. Either way the geometry probe should pass before merge; please check the overflow-report.json artifact and, if the probe's expectations are now wrong rather than the DOM, update the fixture in the same PR.
Coordination note: #16621 edits the same three files (tracker-row-layout.js, tracker-row-render.js, generated static/index.html); the second to land needs a rebase and make dashboard-gen rerun.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Fixes #16627
Problem
An Activity Monitor row could carry two hive note lines under its chevron strip: the needs-human ask (
human_attention/decision_needed) and the "Hive: moved to Needs human decision" stage note β the latter restating the chevron that is already lit.Change
tracker-human-attention.js:stageTrackerHumanContextEntriesranks every candidate line (needs-human / decision 0 > blocker 1 > next move / claim 2 > optional delegation 3);stageTrackerHumanContextHtml(item, stages, nowMs, subRows, ctx, key)renders one line β same-rank asks (issue + PR) share itΒ·-separated with their own View links, "Optional delegation" only earns the line when nothing else wants it. The row's stage note (ctx.events[key]) is folded in as a trailing clause viastageTrackerNoteFoldText, which drops pure restatements: text already on the line,waiting on a person / decisionunder a Needs human line, andmoved to <X>/fell back to <X>when<X>is the row's current stage name and noβ whyfollows.stageTrackerNoteTakenCtxstrips the consumed event from the ctx handed to the preparation / event slot, so nothing renders twice.tracker-row-render.js(issue rows) andtracker-row-layout.js(PR sub-rows) wire both in.Fixtures (
stage_tracker_single_note.test.js)fell back to β¦ β reviewers split) β folded as a trailing clause.needs a rebasenote β one line, move first, note folded.Verification
node --test src/pkg/dashboard/*.test.jsβ 310 passcd src && go test ./pkg/dashboard/ -run 'StageTracker|Ratchet|SharedAsset'β okmake dashboard-gen+make dashboard-gen-checkβ clean