Skip to content

πŸ› Activity Monitor: render at most one hive note line per row - #16628

Merged
clubanderson merged 1 commit into
v5from
fix/single-hive-note
Nov 4, 2026
Merged

clubanderson merged 1 commit into
v5from
fix/single-hive-note

Conversation

@clubanderson

Copy link
Copy Markdown
Member

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: stageTrackerHumanContextEntries ranks 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 via stageTrackerNoteFoldText, which drops pure restatements: text already on the line, waiting on a person / decision under a Needs human line, and moved to <X> / fell back to <X> when <X> is the row's current stage name and no β€” why follows.
  • stageTrackerNoteTakenCtx strips the consumed event from the ctx handed to the preparation / event slot, so nothing renders twice.
  • tracker-row-render.js (issue rows) and tracker-row-layout.js (PR sub-rows) wire both in.
  • The surviving line keeps its ⬑ icon, View link and a single relative age (the merged line is a fresh human note, so its age is the newest).
  • No Go change: both texts are assembled client-side.

Fixtures (stage_tracker_single_note.test.js)

  • Screenshot case: needs-human ask + "moved to Needs human decision" under an 085 strip β†’ one line, no "moved to" restatement, View PR + one age kept.
  • Stage note that adds information (fell back to … β€” reviewers split) β†’ folded as a trailing clause.
  • Row with only a stage note β†’ still exactly one line (the hive note).
  • Remediation next move + needs a rebase note β†’ one line, move first, note folded.
  • PR sub-row under an issue follows the same rule.
  • Fold-rule unit cases; the existing human-attention row test now asserts one line with the note folded.

Verification

  • node --test src/pkg/dashboard/*.test.js β†’ 310 pass
  • cd src && go test ./pkg/dashboard/ -run 'StageTracker|Ratchet|SharedAsset' β†’ ok
  • make dashboard-gen + make dashboard-gen-check β†’ clean

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 4, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 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
#16621 πŸ› Activity Monitor: base-branch pill sits beside the repo chip same files src/pkg/dashboard/stage_tracker_human_attention.test.js
src/pkg/dashboard/static-src/js/tracker-row-layout.js
src/pkg/dashboard/static-src/js/tracker-row-render.js
src/pkg/dashboard/static/index.html
#16619 πŸ› fix(dashboard): preserve settled review verdicts and explain findings same files src/pkg/dashboard/static/index.html

@clubanderson
clubanderson merged commit 5e0e398 into v5 Nov 4, 2026
86 of 90 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/single-hive-note branch November 4, 2026 17:57
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

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

Failing checks:

  • mobile-shots

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 commented Nov 4, 2026

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

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):

  • stageTrackerHumanContextEntries is a faithful lift of the old stageTrackerHumanContextHtml body: every early-return path now yields [] instead of '', and every lines.push(...) becomes an entry(...) (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 prefixed PR #N β€” (:120), which the (^|β€” )Needs human: regex covers; Current blocker: (:97) and Optional delegation: (:204) match their regexes.
  • stageTrackerNoteTakenCtx copies ctx.events before deleting (:256-258), so the shared ctx handed to neighbouring rows is untouched. The event slot is only suppressed when humanNote is non-empty (tracker-row-render.js:166, tracker-row-layout.js:253), so rows without a human line still render the Hive: note exactly as before.
  • stageTrackerPreparationCommentHtml falls through to stageTrackerEventHtml(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

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: a row shows two hive note lines (needs-human ask + "moved to" stage note)

1 participant