Skip to content

🐛 Activity Monitor: base-branch pill sits beside the repo chip - #16621

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/version-pill-next-to-repo
Nov 4, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/version-pill-next-to-repo

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #16620

What

Moves the Activity Monitor's base-branch pill (v5, main) from the far-right of the PR column to the head of the row, immediately after the repo chip and before the issue number:

[hive][v5] #16603 … ↳ 🤖 #16615 …

  • New stageTrackerBasePillHtml(baseRef, prNumber) renders <span class="ham-base-pill" title="PR #N targets v5">v5</span>; stageTrackerPRPillsHtml no longer appends the base, so it is not duplicated.
  • Issue rows show the primary (first-sorted) linked PR's base; rows with no PR show nothing (no extra API calls). PR rows show their own base; sub-rows under a multi-PR issue carry each PR's base beside its repo chip.
  • .ham-base-pill reuses the repo chip's tokens (mono, --fs-2xs, --r-sm, same padding/line-height) with a --line-subtle border and --text-faint colour — no raw font-size or hex.

Tests

  • stage_tracker_ui_rows_test.go fixtures updated to assert the pill's new position/tooltip and its absence from the PR column; node suites load the new helper.
  • node --test src/pkg/dashboard/*.test.js (302 pass), go test ./pkg/dashboard/ -run 'StageTracker|Ratchet|SharedAsset', make dashboard-gen-check all green.

@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 kellyaa 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
clubanderson added a commit that referenced this pull request Nov 4, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@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
#16637 🐛 Stage tracker: say CI running (not activity unknown) when checks are still pending same files src/pkg/dashboard/stage_tracker_ui_rows_test.go
src/pkg/dashboard/static/index.html
#16634 🐛 fix(dashboard): preserve settled review verdicts and explain findings same files src/pkg/dashboard/static/index.html

@hivecommons-hive

hivecommons-hive Bot commented Nov 4, 2026 •

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:

  • runtime-tests

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.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

Read against v5 at merge-base c239bcbb. The move itself is correct; the red checks are one changelog fragment, and the other failures cascade from it.

Why CI is red: changed-activity-monitor-base-pill-by-repo-chip.md is not a bullet

changelog-fragment-guard (job 126706653906) fails with "a fragment must start with a - entry bullet (or a <!-- release: … --> marker)". changelog.d/changed-activity-monitor-base-pill-by-repo-chip.md:1 begins Activity Monitor rows now draw … with no leading - . native-queue-policy (job 126706666177) then fails only because it waits on that check: "Error: changelog-fragment-guard: failure".

The PR also carries a second fragment, changelog.d/fixed-16621.md, whose one line cites the PR number itself ((#16621)) rather than the issue. The two describe the same change; suggest keeping the longer changed-… one (it already references #16620), prefixing it with - , and dropping fixed-16621.md so the compiled changelog does not list the move twice under two categories.

Verified correct

  • tracker-row-layout.js:223-233: stageTrackerPRPillsHtml drops its third argument and every caller (tracker-row-layout.js:247, tracker-row-render.js:108) is updated to the two-arg form, so no base pill is left in the right-hand cluster. stageTrackerBasePillHtml returns '' for a missing base_ref, so issue rows without a PR render nothing — matching the fragment's claim.
  • tracker-row-render.js:98-100, 136-137: for an issue the pill comes from stageTrackerLinkedSorted(item, stages)[0] (the same ordering the existing single-PR branch uses for lp), for a PR row from item.base_ref; it is concatenated after the repo chip so it renders whether or not ctx.repoChips is on.
  • stageTrackerBasePillHtml is in the same compiled scope as its callers (one definition in static/index.html), and the Go/node harnesses were extended to inject it (stage_tracker_motion_test.go:457, 592; the three *.test.js injection lists). static/index.html is in sync (webstatic/gen … -check passes on f001b9a).
  • .ham-base-pill (tracker.css:182) copies .ham-repo-chip's type (font-size: var(--fs-2xs), tracker.css:171). Note that at merge-base --fs-2xs is undefined outside .config-modal, so both currently inherit the row size; 🐛 dashboard: keep Overview KPI tiles inside the phone viewport after a restart #16613 defines it at :root, after which both shrink to .6rem together — they stay matched either way.

Open question I could not settle from the logs: the test and coverage jobs on run 41867830411 ended in 3–4 s with no step output in the log, which looks like a setup failure rather than a test failure; a re-run after the fragment fix should tell.

Review findings from reviewer (folded here because this head already carries its hive review):

The render change is correct and matches #16620, but the head 0f56a75 fails the runtime-tests CI step. One-line fix.

Finding (medium): stage_tracker_single_note.test.js does not load the new helper

  • node --test src/pkg/dashboard/*.test.js on 0f56a75 → 4 failures, all ReferenceError: stageTrackerBasePillHtml is not defined, raised from stageTrackerRowHtml/stageTrackerSubRowHtml at stage_tracker_single_note.test.js:85,101,126,141. v5 HEAD passes the same file 6/6.
  • Mechanism: tracker-row-layout.js:231 and tracker-row-render.js:100,136 now call stageTrackerBasePillHtml, and this PR adds that name to the harness lists in stage_tracker_header_spans.test.js:45, stage_tracker_human_attention.test.js and stage_tracker_preparation_visual.test.js — but not to stage_tracker_single_note.test.js:56, which landed with 🐛 Activity Monitor: render at most one hive note line per row #16628 (merged 12:57 today, after this branch's harness edits).
  • Fix: append 'stageTrackerBasePillHtml' to the tracker-row-layout name list at stage_tracker_single_note.test.js:56. I applied that locally on your head and the full suite goes to 310 pass / 0 fail.

Verified otherwise

  • make dashboard-gen-check equivalent (go run ./pkg/dashboard/webstatic/gen … -check) passes on the head: index.html is in sync with static-src/.
  • chip in tracker-row-render.js:137 is only interpolated into the three ham-head-main templates, so concatenating the pill onto it is safe; the sub-row path (tracker-row-layout.js:245-246) still wraps in ham-pr-line only when the string is non-empty.
  • stageTrackerPRPillsHtml drops its third argument and every caller (layout.js:247, render.js:108) was updated, so the base is not drawn twice.
  • Intent: issue rows use stageTrackerLinkedSorted(...)[0], PR rows their own base_ref, bare issues none — each matches the three bullets in Activity Monitor: version pill should sit next to the repo chip, not in the right-hand cluster #16620.

Review findings from adjudicator (folded here because this head already carries its hive review):

Correctness — delta re-review (merges of v5 at 0f56a75)

The two Merge branch 'v5' commits brought in #16628's new src/pkg/dashboard/stage_tracker_single_note.test.js, whose vm harness predates this PR's stageTrackerBasePillHtml. At this head stageTrackerRowHtml (tracker-row-render.js:138) and stageTrackerSubRowHtml (tracker-row-layout.js:245) call that helper, but the harness at stage_tracker_single_note.test.js:56 never loads it, so 4 of its 6 tests fail with ReferenceError: stageTrackerBasePillHtml is not defined (reproduced locally with node --test src/pkg/dashboard/*.test.js; these are the only failures in the suite, and runtime-tests is red on the PR). The other harnesses were already patched the same way (stage_tracker_human_attention.test.js:41, stage_tracker_preparation_visual.test.js:55).

Fix (src/pkg/dashboard/stage_tracker_single_note.test.js:56):

  for (const name of ['stageTrackerLinkedPRItem', 'stageTrackerLinkedPROpen', 'stageTrackerLinkedDrawnHere', 'stageTrackerLinkedSorted', 'stageTrackerHeadColsHtml', 'stageTrackerSubRowHtml', 'stageTrackerBasePillHtml']) vm.runInContext(fn('tracker-row-layout', name), c);

Everything else in the delta is already-landed v5 work; the PR's own net diff against v5 is unchanged from the previously approved head, and go run ./pkg/dashboard/webstatic/gen … -check passes (generated index.html is in sync).

Evidence bundle `#1662174a0204` sha256:e3407968a51bb32a74ac8d893dc0a721894284b5d0114c547b534fc19e95e29c — download from the dashboard or `hivectl review evidence #16621`.

@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 code change looks correct to me; the only thing holding this back is the changelog fragment, which is why changelog-fragment-guard (and, downstream of it, native-queue-policy) are red.

src/scripts/check-changelog-fragment.sh output at f001b9a:

a fragment must start with a '- ' entry bullet (or a '' marker) — it IS the entry; the compiler owns the ### headings

changelog.d/changed-activity-monitor-base-pill-by-repo-chip.md:1 starts with Activity Monitor rows now draw… with no leading - . The second fragment, changelog.d/fixed-16621.md, is bulleted but is just the PR title — two fragments for one change will produce two entries. Suggest: prefix the changed-… fragment with - and drop fixed-16621.md (the descriptive one is the entry a reader wants). native-queue-policy fails only because it reads the guard's conclusion (.github/scripts/native-queue-policy.cjs:97), so it will clear on the same push.

What I checked on the code, at this head:

  • stageTrackerPRPillsHtml lost its third parameter (tracker-row-layout.js:224). Every caller in static-src/js and every test stub/jsFunc loader (tracker-row-render.js:108, tracker-row-layout.js:247, the five *_test.go and three *.test.js files) was updated — nothing still passes baseRef.
  • item.base_ref / lp.base_ref are real fields on both the PR item (stage_tracker.go:298) and the linked-PR record (stage_tracker.go:703), so stageTrackerBasePillHtml(item.base_ref, item.number) at tracker-row-render.js:136 and the sub-row call at tracker-row-layout.js:245 read populated data; tracker-integration-execution.js:13 already relies on the same field.
  • stageTrackerBasePillHtml escapes both the tooltip and the label (tracker-row-layout.js:232-233).
  • node --test src/pkg/dashboard/*.test.js → 302/302 pass; go run ./pkg/dashboard/webstatic/gen … -check → clean, so the committed static/index.html matches static-src.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Scanner triage at f001b9a (comment-only; the hive does not push to this branch): the red test (dashboard 1/4), test (dashboard shuffle 2/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 the dashboard shards clear. The only PR-local fix still needed is the changelog fragment already called out above (prefix changed-activity-monitor-base-pill-by-repo-chip.md with - , drop fixed-16621.md); native-queue-policy turns green once changelog-fragment-guard does.


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

Looks correct to me.

Verified against the v5 tree at 0f56a75:

  • stageTrackerPRPillsHtml has exactly two callers in static-src/js (tracker-row-layout.js:238, tracker-row-render.js:106 on v5) and both are updated to the two-argument form, so no caller still passes lp.base_ref into the right-hand cluster and the pill cannot render twice.
  • The new PR-row pill reads item.base_ref, which the Go side populates for PR items (stage_tracker.go:298, json:"base_ref,omitempty"), and stageTrackerBasePillHtml returns '' on an empty base — so the three ${chip} sites in tracker-row-render.js:141/152/158 degrade to the bare repo chip, as before, when a base is unknown.
  • Sub-rows use lp.base_ref + pr.number (tracker-row-layout.js:245), matching the per-PR tooltip the body describes.

One coordination note, not a defect: #16628 also edits tracker-row-layout.js, tracker-row-render.js and the generated static/index.html. Whichever lands second will need a rebase and make dashboard-gen rerun before dashboard-gen-check passes.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Quality triage at 0f56a75 (comment-only; the hive does not push to this branch): the red runtime-tests → build-and-test is PR-local (FIX_DIFF), distinct from the earlier MERGE_BASE finding at f001b9a.

Failing: Dashboard helper tests — 4 subtests in src/pkg/dashboard/stage_tracker_single_note.test.js (lines 83, 98, 120, 134):

ReferenceError: stageTrackerBasePillHtml is not defined

Cause: stageTrackerSubRowHtml / stageTrackerHeadColsHtml now call the new stageTrackerBasePillHtml, but this harness lifts tracker-row-layout functions by name and its list was not extended. Every other .test.js that lifts those two helpers already includes the new name — this is the only one missed.

Fix (one line, line 56):

-  for (const name of ['stageTrackerLinkedPRItem', 'stageTrackerLinkedPROpen', 'stageTrackerLinkedDrawnHere', 'stageTrackerLinkedSorted', 'stageTrackerHeadColsHtml', 'stageTrackerSubRowHtml']) vm.runInContext(fn('tracker-row-layout', name), c);
+  for (const name of ['stageTrackerLinkedPRItem', 'stageTrackerLinkedPROpen', 'stageTrackerLinkedDrawnHere', 'stageTrackerLinkedSorted', 'stageTrackerHeadColsHtml', 'stageTrackerSubRowHtml', 'stageTrackerBasePillHtml']) vm.runInContext(fn('tracker-row-layout', name), c);

Verified locally on a checkout of 0f56a75: node --test stage_tracker_single_note.test.js goes 2/6 → 6/6 with only that change.


Quality agent (ACMM L4/L6 — full mode)


🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

The Activity Monitor's base pill (v5, main) moves from the PR column's
trailing cluster to the row head, right after the repo chip and before
the issue #N, styled as a muted sibling of that chip. Issue rows show
the primary linked PR's base, PR rows and sub-rows their own; rows with
no PR show nothing. The pill tooltip names the PR it describes.

Fixes #16620

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the fix/version-pill-next-to-repo branch from 0f56a75 to 74a0204 Compare November 4, 2026 18:38
@hivecommons-hive
hivecommons-hive Bot merged commit 09c6d46 into v5 Nov 4, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/version-pill-next-to-repo branch November 4, 2026 18:45
@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

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

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: version pill should sit next to the repo chip, not in the right-hand cluster

1 participant