Skip to content

πŸ› Name the Activity Monitor trail's hops instead of printing undefined - #14930

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/tracker-trail-undefined
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/tracker-trail-undefined

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #14928

Root cause: stageTrackerTooltip built the trail with String(h.stage).padStart(3, '0'), but the /api/stage-tracker history entries (StageTrackerHop) emit {number, slug, at, reason, from, regressed} β€” no stage field β€” so the live hover for #14787 read "Trail: undefined β†’ undefined β†’ undefined β†’ undefined". The Go UI fixtures used history: [{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 from number via the loaded stage table's short word (000 β†’ "Open"), falls back to the slug before the table loads, returns '' when it cannot name the hop.
  • stageTrackerTrailText(item): last STAGE_TRACKER_TRAIL_HOPS hops, unnamed ones dropped, '' (clause omitted) when fewer than two remain.
  • Live πŸ› dco: re-home unsigned commits on adopted PRs so the gate can clearΒ #14787 now renders Trail: CI / Review β†’ Needs author β†’ CI / Review β†’ Needs human decision.

Tests:

  • stage_tracker_trail_test.go: drives a stagelabels.Store through 050 β†’ 071 β†’ 050 β†’ 085, marshals stageTrackerHistory, asserts the wire carries number/slug/at and no stage, and that the SPA reader reads exactly those fields.
  • stage_tracker_trail.test.js (node:test, runs in the existing node --test src/pkg/dashboard/*.test.js lane): live-shape fixture, skip/omit behaviour, slug fallback.
  • UI fixtures in stage_tracker_ui_test.go switched to the wire shape; the other tooltip harnesses include the two new helpers.

Checked the other β†’ joiner in index.html (w.backoff ladder, line ~48345) β€” it joins strings from the payload directly, not a field lookup, so it is not affected.

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 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 nicholasjackson 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 Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

@github-actions

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
#14821 πŸ› fix: preserve supersession decisions across stage reconciliation same files src/pkg/dashboard/static/index.html
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html

@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 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.

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 β€” StageTrackerHop serialises number/slug/at/reason/from/regressed; there is no stage key, so the old String(h.stage) in stageTrackerTooltip could only ever print undefined. The root-cause claim in the body matches the code.
  • src/pkg/dashboard/static/index.html:13881,15589 β€” _stageTracker is the raw /api/stage-tracker payload, and stage_tracker.go:54 emits stages on it, so stageTrackerHopName's _stageTracker.stages lookup reads a real field (same lookup already used at index.html:16959,17129). The slug fallback covers the window before the first fetch.
  • New stageTrackerTrailText filters unnamed hops before the length > 1 check, 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.js passes locally (4/4). The Go side (stage_tracker_trail_test.go) marshals stageTrackerHistory and asserts the wire shape, which is the test that would have caught this originally. I could not run go test on 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

@hivecommons-hive
hivecommons-hive Bot merged commit fe3791f into v5 Oct 28, 2026
84 of 88 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#1493099cd281` sha256:0ea3f082be998572283cee695427fbff46304ce11378ee559d2117f61ae37c88 β€” download from the dashboard or `hivectl review evidence #14930`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 99cd281.

@github-actions

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 removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@kubestellar-prow
kubestellar-prow Bot deleted the fix/tracker-trail-undefined branch October 28, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves dco All commits are DCO signed-off 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 hover shows "Trail: undefined β†’ undefined β†’ undefined β†’ undefined"

1 participant