Repository navigation
π Name the Activity Monitor trail's hops instead of printing undefined - #14930
Conversation
The hover's Trail clause read h.stage from the stage-tracker history entries, but StageTrackerHop emits number/slug β so every hop stringified to "undefined" (#14787 hovered as "Trail: undefined β undefined β undefined β undefined"). The renderer now names hops by the stage table's short word (slug before the table loads), skips hops it cannot name, and omits the clause when fewer than two remain. Go and node tests pin the wire shape on both sides; the UI fixtures use the live shape. Fixes #14928 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 |
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Read the tree at the PR head, not just the diff. This looks correct to me.
What I verified
src/pkg/dashboard/stage_tracker.go:203-212βStageTrackerHopserialisesnumber/slug/at/reason/from/regressed; there is nostagekey, so the oldString(h.stage)instageTrackerTooltipcould only ever printundefined. The root-cause claim in the body matches the code.src/pkg/dashboard/static/index.html:13881,15589β_stageTrackeris the raw/api/stage-trackerpayload, andstage_tracker.go:54emitsstageson it, sostageTrackerHopName's_stageTracker.stageslookup reads a real field (same lookup already used atindex.html:16959,17129). The slug fallback covers the window before the first fetch.- New
stageTrackerTrailTextfilters unnamed hops before thelength > 1check, so the "fewer than two nameable hops β no clause" behaviour in the changelog is what the code does. node --test src/pkg/dashboard/stage_tracker_trail.test.jspasses locally (4/4). The Go side (stage_tracker_trail_test.go) marshalsstageTrackerHistoryand asserts the wire shape, which is the test that would have caught this originally. I could not rungo teston this host; CI is still pending at the time of writing.
No findings. One optional note: stageTrackerHopName still falls back to h.stage when number is absent β harmless, and it keeps any older fixture working, but nothing on the wire sets it.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 99cd281. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #14928
Root cause:
stageTrackerTooltipbuilt the trail withString(h.stage).padStart(3, '0'), but the/api/stage-trackerhistory entries (StageTrackerHop) emit{number, slug, at, reason, from, regressed}β nostagefield β so the live hover for #14787 read "Trail: undefined β undefined β undefined β undefined". The Go UI fixtures usedhistory: [{stage:50}], mirroring the SPA rather than the wire, so nothing caught it.Fix (
src/pkg/dashboard/static/index.html):stageTrackerHopName(h): names a hop fromnumbervia the loaded stage table's short word (000β "Open"), falls back to theslugbefore the table loads, returns''when it cannot name the hop.stageTrackerTrailText(item): lastSTAGE_TRACKER_TRAIL_HOPShops, unnamed ones dropped,''(clause omitted) when fewer than two remain.Trail: CI / Review β Needs author β CI / Review β Needs human decision.Tests:
stage_tracker_trail_test.go: drives astagelabels.Storethrough 050 β 071 β 050 β 085, marshalsstageTrackerHistory, asserts the wire carriesnumber/slug/atand nostage, and that the SPA reader reads exactly those fields.stage_tracker_trail.test.js(node:test, runs in the existingnode --test src/pkg/dashboard/*.test.jslane): live-shape fixture, skip/omit behaviour, slug fallback.stage_tracker_ui_test.goswitched to the wire shape; the other tooltip harnesses include the two new helpers.Checked the other
βjoiner in index.html (w.backoffladder, line ~48345) β it joins strings from the payload directly, not a field lookup, so it is not affected.