Skip to content

✨ Activity Monitor: shared-PR issues group under their primary row - #17333

Merged
clubanderson merged 3 commits into
v5from
shared-pr-group
Nov 9, 2026
Merged

clubanderson merged 3 commits into
v5from
shared-pr-group

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17332

What

Shared-PR grouping in the Activity Monitor — the issues one PR closes together (#17292 primary, #17302 secondary, PR #17308) are one unit of the list.

  • Ordering — stageTrackerSharedPRContiguous runs last in renderStageTracker: every secondary issue row sits right after its primary, whatever the lead sort / train / preparation ordering put between them; the group takes the primary's place; several secondaries keep their lead order. A secondary whose primary is not a row of the list (filtered out, other page) stays standalone as before (stageTrackerAdoptOrphanPRs path untouched).
  • Same snapshot — the secondary's copy of the PR listing is replaced by the primary's own entry (drawn_under kept, also_closes dropped) before rows render, so both chevron strips light from one object of one payload tick. The server payload is not mutated (row copies).
  • Visual — ham-shared-head / ham-shared-child / ham-shared-last row classes + data-ham-shared-under; a thin token-only rail from the primary's pill to the last child's elbow (reuses --line-strong, --sp-*).
  • Fold — the existing also closes #N pill on the primary gains a caret button (hamSharedToggle, same caret class as the repo group header), default expanded, persisted under hive.tracker.shared.collapsed; folded rows leave the list but still count in the total. Pill markup without a group is byte-identical to before.
  • Tests: stage_tracker_shared_pr_group_test.go (adjacency with an unrelated row between, group sorts by primary, several secondaries, same-snapshot lit chevron, child/head classes, fold + persistence, primary-filtered-out fallback, cross-repo same number, unchanged pill) + a wiring/tokens-only check. Doc paragraph in activity-monitor.md; changelog fragment.

Kept out of tracker-row-layout.js except for the pill's optional group argument (another PR edits that file for one-lit-chevron-per-row).

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 9, 2026
@clubanderson

Copy link
Copy Markdown
Member Author

/lgtm

@clubanderson

Copy link
Copy Markdown
Member Author

/approve

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 9, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clubanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 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
#17337 🐛 Activity Monitor: exactly one lit stage chevron per row same files src/docs/dashboard-sections/activity-monitor.md
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static/index.html

@hivecommons-hive

hivecommons-hive Bot commented Nov 9, 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:

  • test (dashboard 2/4)

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

test (dashboard 2/4) / test (dashboard shuffle 3/3) are red for two PR-local reasons (read from run 42549511549; coverage and test are just the aggregators). Both are one-line fixes; author's branch, so posting rather than pushing.

1. TestStageTrackerCuesWiring — tracker-cues CSS must use tokens only, found "#1"
stage_tracker_cues_test.go:125 scans the tracker-cues CSS block for #0…#f as a hex-colour guard. The new comment in static-src/css/tracker.css reads /* Shared-PR group (hivecommons/hive#17324 follow-up): … — the #17324 matches #1. Drop the issue number from the CSS comment (e.g. /* Shared-PR group: the secondary issues a PR also closes …); cite the issue in the PR body instead.

2. TestStageTrackerGroupByRepo — ReferenceError: stageTrackerLoadSharedCollapsed is not defined
stageTrackerRepoGroupingHarness in stage_tracker_repo_grouping_test.go slices stageTrackerLoadGrouping (line ~240), which now calls stageTrackerLoadSharedCollapsed(), but the harness never slices that helper. Add next to the existing stageTrackerLoadCollapsed entries:

		jsFunc(t, html, "stageTrackerLoadSharedCollapsed"),
		jsConstLine(t, html, "STAGE_TRACKER_SHARED_COLLAPSED_KEY"),

(and a var _stageTrackerSharedCollapsed = {}; line if the harness declares the other _stageTracker* state explicitly).

Baseline: v5 is green on these shards and the sibling PRs (#17334, #17337) don't fail them, so this is the diff, not a shared incident.


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

Two red checks on f5ae2e4 (v2 Tests → test (dashboard 2/4), test (dashboard shuffle 3/3), and coverage downstream) are both caused by this diff and each has a one-line fix. I read the failing job log and the tree at f5ae2e4.

1. TestStageTrackerCuesWiring — stage_tracker_cues_test.go:125: tracker-cues CSS must use tokens only, found "#1"

The guard scans the tracker-cues block (tracker.css lines 512–842 at this head) for #0…#f as a proxy for hex colours. The new comment at tracker.css:614 reads /* Shared-PR group (hivecommons/hive#17324 follow-up): … — the #17324 issue reference inside the block trips it. No colour literal was actually added; the ruleset uses tokens. Fix: cite the issue without the hash (e.g. hivecommons/hive 17324 or gh-17324), or move the comment above the block's start marker.

2. TestStageTrackerGroupByRepo ×4 — ReferenceError: stageTrackerLoadSharedCollapsed is not defined at stageTrackerLoadGrouping

tracker-filter-state.js:192 now calls stageTrackerLoadSharedCollapsed() from stageTrackerLoadGrouping(). stage_tracker_repo_grouping_test.go:240 lifts stageTrackerLoadGrouping into its Node harness but does not lift the new function (the new stage_tracker_shared_pr_group_test.go:23 does, which is why that test passes). Fix: add jsFunc(t, html, "stageTrackerLoadSharedCollapsed") and the STAGE_TRACKER_SHARED_COLLAPSED_KEY const to the harness in stage_tracker_repo_grouping_test.go — or guard the call with the file's existing typeof … === 'function' idiom.

I did not find anything wrong with the grouping logic itself on this pass; the review is limited to the CI failures. Not a duplicate of #17334 / #17337 — the three Activity Monitor PRs share tracker.css/activity-monitor.md/index.html but make distinct changes and git merge-tree shows no textual conflicts.

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

The issues one PR closes together are one group of the list: a
secondary issue's row always follows its primary (whatever the lead
sort or a train put between them; the group takes the primary's place),
draws as an indented child on a rail, and is rebound to the primary's
own listing of the PR so both chevron strips light from the same
snapshot. The primary's "also closes" pill carries a caret that folds
the secondaries, remembered in localStorage under
hive.tracker.shared.collapsed. A secondary whose primary is not a row
of the list stays standalone as before.

Fixes #17332

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…cker alone

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson merged commit a94ef95 into v5 Nov 9, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the shared-pr-group branch November 9, 2026 02:30
@github-actions

github-actions Bot commented Nov 9, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: issues sharing one PR are scattered across the list

1 participant