Repository navigation
π fix(dashboard): keep stale review verdicts known and name the failing perspective - #16622
clubanderson wants to merge 1 commit into
Conversation
β¦ perspective
A verified review bundle on the current head was re-captioned
"Review activity unknown Β· last observed <state>" by the tooltip
builder as soon as its observation aged past the two-minute freshness
window, while the chevron colour still followed the state β so a red
chevron claimed not to know anything. Only motion goes stale; a
settled verdict keeps its words and shows "observed Nm ago".
review_activity now carries perspectives[] {name, verdict, summary}
from the bundle's latest verdicts, the caption names the first
non-approving perspective ("correctness β: β¦"), and the tooltip
lists every perspective on its own line before head/source/observed.
Fixes #16617
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
|
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether #16622 or #16619 (same fix for #16617, same struct/JSON field/hunks β they conflict, both cannot merge) is the one that lands.
Read against the v5 tree at merge-base c239bcbb. The Go side is correct; the headline tooltip change does not render as described in production, and this PR conflicts with #16619.
1. Per-perspective lines never render one-per-line (medium)
static-src/js/tracker-row-strip.js:198-199 joins the perspectives with \n and relies on white-space: pre-line (static-src/css/tracker.css:454) to break them. But the only esc() in the built page β static-src/js/debug-logs.js:483 (static/index.html:46935-46945) β does .replace(/\n/g, ' ') before the text reaches the title, aria-label and the .ham-chevron-tip span, so pre-line never sees a newline. Because the code also drops the Β· before head β¦ whenever perspectiveLines is non-empty, the production tooltip reads β¦ awaiting author Β· correctness β: β¦ plan-match β quality β security β style β head b5c1f96c Β· verified-review-bundle Β· β¦ β one line, perspectives separated from each other and from head by bare spaces.
The node test asserts the \n layout (stage_tracker_activity.test.js:38) and passes only because the harness stubs esc without the newline rule (stage_tracker_activity.test.js:16). Suggest either joining the perspective lines (and head β¦) with Β· like the rest of the tip, or splitting on \n after esc() for the tooltip span only (attributes cannot carry <br>), and giving the test stub the real esc's \n β ' ' behaviour so it fails without the fix.
2. Conflicts with #16619 (same issue, same hunks)
#16619 (opened 4 min earlier, fork thatguywob/hive, head 4cf563d) also fixes #16617 and adds the same StageTrackerPerspective type, the same review_activity.perspectives[] JSON field, the same per-perspective fold (dissent beats approval, else newest), the same Β· <perspective> β: <summary> caption suffix, and the same "settled verdict does not age into unknown" change in stageTrackerActivityTrackHtml. They differ in details β summary omitempty here vs always-present there; ? vs requires human for requires_human; where the caption suffix is appended; pre-line here vs <br> after esc there (which has the identical flattening problem, flagged on that PR) β so these are a conflict, not a clean duplicate: whichever merges second will not apply. I have not closed anything; the question above is for the owner.
Verified correct
stageTrackerBundlePerspectives(stage_tracker_activity.go:66-96): precedence!set || (approveβnon-approve) || (same class && newer)is what the comment says; a later approval cannot displace an earlier dissent. Inputs come fromtrackerLatestBundleVerdicts(:440-459), already deduped per perspective/backend/model.stageTrackerBlockerRepeats(:131-142) only clearsout.Blockerwhen the 40-rune probe of the perspective summary is contained in the aggregate blocker β no false drop when the aggregate carries a different sentence.- JS:
settledVerdictkeepsknownfor the listed states whileactivestill requires!stale, so the pulse ages out and the colour does not.index.htmlis in sync (go run ./pkg/dashboard/webstatic/gen β¦ -checkpasses on this head).
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
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. |
|
Scanner triage at ed1fe5c (comment-only; the hive does not push to this branch): the red Failing test (3/3 reruns, deterministic): This PR branched at Verdict: MERGE_BASE β merge/rebase onto current π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
Closed as superseded by #16619 by @clubanderson from the Hive dashboard. |
Fixes #16617
Root cause
The spoke's
/api/stage-trackerpayload for #16607 (headb5c1f96cβ¦) was correct:review_activity.state = changes_requested,source = verified-review-bundle,5/5perspectives, blocker naming the finding. The contradiction was produced bystageTrackerActivityTrackHtmlinstatic-src/js/tracker-row-strip.js: it treated every observation older than the two-minute freshness window as "not known" and prefixed the caption withReview activity unknown Β· last observed changes_requested, while the chevron colour still derived fromstate. The freshness gate exists for the pulse (motion), not for a settled verdict.Secondly, the backend never exposed the bundle's per-perspective verdicts, so the tooltip could not say which perspective failed.
Fix
tracker-row-strip.js): a settled verdict on the current head (approved/changes_requested/human_decision,passing/failing/skipped/missing) stays known however old its observation; staleness is a suffix (observed 36m ago Β· <iso>).activity unknown Β· last observed β¦is reserved for states that imply motion (reviewing / running). The track word is not repeated when the caption already starts with it. Per-perspective lines (correctness β: β¦,security β) are listed one per line before head / source / observed / since (.ham-chevron-tipgetswhite-space: pre-line).stage_tracker_activity.go):review_activity.perspectives[] {name, verdict, summary}from the latest bundle verdicts on the current head (one per perspective; a dissenting model wins over an approving one). Thechanges_requestedcaption names the first non-approving perspective βReview findings Β· awaiting author Β· correctness β: <first line>β and an aggregate blocker that merely restates that finding is dropped so the tooltip says it once.unknownremains only for heads with no bundle.TestStageTrackerActivityStaleBundleKeepsVerdictAndPerspectives) β stale-but-current-head bundle keeps state, perspectives populated, blocker de-duplication, split-model dissent; node test for tooltip composition on the β¨ feat(github): enforce pin-only exception in merge-request relayΒ #16607 shape (red, no "unknown"/"stale"/"last observed", perspectives listed, motion still ages into unknown, other-head bundle is unknown).Validation
cd src && go test ./pkg/dashboard/ -run 'StageTracker|Activity|Ratchet|SharedAsset'βnode --test src/pkg/dashboard/*.test.jsβ (303/303)make dashboard-gen && make dashboard-gen-checkβgofmt -lclean on touched filesNote
#16600 also touches
stage_tracker_activity.go(icon-only / ring spec). This diff is kept to the review-derivation block and the tooltip builder to minimise conflicts.