Skip to content

πŸ› fix(dashboard): keep stale review verdicts known and name the failing perspective - #16622

Closed
clubanderson wants to merge 1 commit into
v5from
fix/review-activity-unknown
Closed

clubanderson wants to merge 1 commit into
v5from
fix/review-activity-unknown

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #16617

Root cause

The spoke's /api/stage-tracker payload for #16607 (head b5c1f96c…) was correct: review_activity.state = changes_requested, source = verified-review-bundle, 5/5 perspectives, blocker naming the finding. The contradiction was produced by stageTrackerActivityTrackHtml in static-src/js/tracker-row-strip.js: it treated every observation older than the two-minute freshness window as "not known" and prefixed the caption with Review activity unknown Β· last observed changes_requested, while the chevron colour still derived from state. 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

  • Frontend (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-tip gets white-space: pre-line).
  • Backend (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). The changes_requested caption 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. unknown remains only for heads with no bundle.
  • Tests: Go table test (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 -l clean on touched files

Note

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

… 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>
@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 hanthor 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

@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/static-src/css/tracker.css
src/pkg/dashboard/static/index.html
#16615 ✨ feat(ci): approve gated workflows for trusted PR heads same files src/pkg/dashboard/stage_tracker_activity.go
#16625 πŸ› Keep a not-yet-run current-phase CI/Review chevron visibly filled same files src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static/index.html
#16619 πŸ› fix(dashboard): preserve settled review verdicts and explain findings CONFLICT src/pkg/dashboard/stage_tracker_activity.go
src/pkg/dashboard/stage_tracker_activity.test.js
src/pkg/dashboard/stage_tracker_activity_test.go
src/pkg/dashboard/static-src/js/tracker-row-strip.js
src/pkg/dashboard/static/index.html

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

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

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 from trackerLatestBundleVerdicts (:440-459), already deduped per perspective/backend/model.
  • stageTrackerBlockerRepeats (:131-142) only clears out.Blocker when 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: settledVerdict keeps known for the listed states while active still requires !stale, so the pulse ages out and the colour does not. index.html is in sync (go run ./pkg/dashboard/webstatic/gen … -check passes on this head).

β€” hive: agent=reviewer-2 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 Nov 4, 2026
@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:

  • coverage
  • test
  • test (dashboard 2/4)
  • test (dashboard shuffle 3/3)

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.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Scanner triage at ed1fe5c (comment-only; the hive does not push to this branch): the red test (dashboard 2/4), test (dashboard shuffle 3/3), test and coverage jobs are not caused by this diff β€” they are the branch being behind v5.

Failing test (3/3 reruns, deterministic):

stage_tracker_motion_test.go:700: node motion preview sample fixture failed: fork/exec .../node: argument list too long
--- FAIL: TestStageTrackerMotionPreviewSample

This PR branched at c239bcb. v5 has since landed ff4b0be (#16600), which rewrote that fixture to write the script to a temp file instead of passing it via node -e ("The lifted strip exceeds Linux's single-argument limit"). v5 head 352163f is green on every dashboard shard at 17:21Z.

Verdict: MERGE_BASE β€” merge/rebase onto current v5 and CI should go fully green; nothing PR-local to fix for these checks.


🐝 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closed as superseded by #16619 by @clubanderson from the Hive dashboard.

@hivecommons-hive hivecommons-hive Bot added the hive/superseded Closed by Hive: a different merged PR already landed this change label Nov 4, 2026
@hivecommons-hive hivecommons-hive Bot closed this Nov 4, 2026
@clubanderson
clubanderson deleted the fix/review-activity-unknown branch November 4, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. hive/superseded Closed by Hive: a different merged PR already landed this change 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: red Review chevron says "Review activity unknown Β· last observed changes_requested"

1 participant