Skip to content

🐛 Tracker: chevron column follows the current state, never the highest stage reached - #15657

Merged
clubanderson merged 2 commits into
v5from
fix/fixing-chevron-column
Oct 30, 2026
Merged

clubanderson merged 2 commits into
v5from
fix/fixing-chevron-column

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Fixes #15656

Finding

Maintainer: "why is this in merge queue if it is being fixed?" (hive's own #15574, adopted copy under #15511, chevron Fixing in the Merge-queue column, caption fell back to Fixing — … — conflicting).

At v5 HEAD (post-#15616) the bug is still present through a second path. stageTrackerAnchor promotes a row to column 80 on merge_gate.state ∈ {merging, merge-failed} before it looks at the stage; #15616 only removed the merge_train promotion by dropping under-repair rows from the train. A PR whose merge attempt GitHub refused (conflict) regresses to 070 but keeps merge-failed on its gate (stageTrackerMergeAttemptStale clears it only for a moved head or a CI-pending reason), so it still anchors in Merge queue. Verified against the HEAD bundle: 070 + merge-failed → 80, 070 + merge_train → 80 (pre-#15616 server), 070 + left_train → 50.

Rule

The chevron column follows the current state, never the highest stage reached. One predicate decides both column and train membership so they can never disagree:

  • Go: stageTrackerTrainUnderRepair (already the train-membership rule; now includes 074 adopted-by-hive) → new stageTrackerItemColumn(it).
  • SPA: new stageTrackerUnderRepair(stage, reason) (tracker-words.js), consulted first by stageTrackerAnchor (tracker-row.js): under repair past 030 → CI / Review, before the gate / train promotions. The 085 decision park is the one state that rides no train yet stays at the gate, where the person decides.
  • left_train is mirrored onto linked_prs[] so the sub-row hover says it left its train.
  • 📖 docs: resync the Hive docs mirror from hive@v5 docs#512 behaviour kept: a merge outcome at 050/060 with nothing to repair is still a Merge-queue matter.

Tests

  • stage_tracker_item_column_test.go: TestStageTrackerItemColumnRatchet — every PR stage × gate state × train state × reason → column (1650 cases), asserting an under-repair row is never promoted; TestStageTrackerFixingAfterMergeFailedColumn — replays 🌱 dashboard: split stage_tracker.go into 4 files #15574 through buildStageTracker (refused merge attempt, train front regressed to 070): gate keeps merge-failed as history, column is CI / Review, no train, sibling's train shrinks to none, left_train mirrored onto the issue's sub-row.
  • stage_tracker_fixing_column.test.js: lifts stageTrackerAnchor + stageTrackerUnderRepair from the shipped index.html; 🌱 dashboard: split stage_tracker.go into 4 files #15574 record in all four shapes → 50; predicate mirrors Go; ratchet over stage × gate × train × reason; docs#512 pins. Fails on the pre-fix bundle.
  • go test ./pkg/dashboard/... -run 'Tracker|Stage|Column|Train' -count=1 and node --test src/pkg/dashboard/*.test.js (90/90) green. Bundle regenerated via go generate ./pkg/dashboard/webstatic/.

Also folded in: hive#15654 (same "current live work" principle)

An issue filed seconds ago (000 New, no label yet) whose nested PR #15655 was already open rendered at the very bottom among the New rows, while its strip drew it via the PR as PR in progress · @clubanderson. stageTrackerSortKey fell back to the parent's unlabelled stage whenever the nested PR had no stage (linked[0].stage falsy), but the strip drew the same row at lp.stage || 40. New stageTrackerLead(item, stages) / stageTrackerLeadStage(lp) (tracker-row.js) are the one rule both the strip and the sort key / repo-group columns read: a covered issue's place follows its most-advanced live work — an open covering PR with no stage yet counts as 040 covered-by-PR. Test: #15654 case in stage_tracker_fixing_column.test.js asserts the sort anchor equals the strip's anchor for every nested-PR stage, and that the row sorts above a New issue with no PR.

Docs

dashboard-sections.md (column rule, train-state paragraph, under-repair list), api-reference/dashboard-misc.md (left_train why values, mirrored onto linked_prs[]), dashboard-copy-inventory.md (new row), changelog.d/fixed-fixing-chevron-column.md.

The roll-9 spoke in the screenshot predates #15616; it needs the roll for the merge_train path and this PR for the merge_gate path.

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

github-actions Bot commented Oct 30, 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
#15637 📖 community: list the Twitch live stream everywhere community links live same files src/pkg/dashboard/static/index.html
#15669 ✨ Stream the tracker's sounds on the Activity Monitor Twitch stream same files src/pkg/dashboard/static/index.html
#15633 🌱 refactor: split stage tracker UI tests CONFLICT src/pkg/dashboard/stage_tracker_ui_test.go
#15671 🐛 review: the hive closes its own already-landed PRs instead of asking a person same files src/pkg/dashboard/stage_tracker.go
#15566 🌱 refactor: split stage tracker UI tests CONFLICT src/pkg/dashboard/stage_tracker_ui_test.go
#15530 🐛 fix(dashboard): issue-row linked PR passes null when the lineage chip is empty same files src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15680 🐛 review: one backlog issue per finding; carried-over notes never refile same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_links.go
src/pkg/dashboard/stage_tracker_repo_grouping_test.go
src/pkg/dashboard/stage_tracker_ui_test.go
src/pkg/dashboard/static/index.html
#15658 🐛 fix(tracker): PRs at CI / Review ride no merge train; overlap hint instead CONFLICT src/docs/api-reference/dashboard-misc.md
src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_links.go
src/pkg/dashboard/stage_tracker_merge_train.go
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static-src/js/tracker-words-core.js
src/pkg/dashboard/static/index.html
#15668 🐛 Lead 090 merge-gate action is Approve and let hive merge same files src/docs/dashboard-copy-inventory.md
src/docs/dashboard-sections.md
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15521 🌱 refactor: split tracker row source same files src/pkg/dashboard/static-src/js/tracker-row.js

@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 against v5 HEAD. The fix is correct where it takes effect — the SPA — and I have one maintainability note about the Go half.

Verified

  • static-src/js/tracker-row.js:25-26 now checks stageTrackerUnderRepair(cur, item.reason) before the merge_gate (:28) and merge_train (:33) promotions, so a row at 070/071/072/074 or with a check-failing:/ci-red reason lights column 50 regardless of a stale merge-failed gate — that is exactly the second path the body describes. 085 is excluded by the cur !== STAGE_TRACKER_NEEDS_DECISION guard, matching the Go comment.
  • tracker-words.js:196-204 mirrors stageTrackerTrainUnderRepair (stage_tracker_merge_train.go:256-273) case for case, including the three reason prefixes. left_train is now threaded through both nested-PR mappers in tracker-row.js, matching the new StageTrackerLinkedPR.LeftTrain field (stage_tracker.go:651, copied at :3228).
  • stage_tracker_fixing_column.test.js exercises the SPA path, so the behaviour that actually renders is pinned.

Note (low, maintainability): stageTrackerItemColumn has no production caller.
src/pkg/dashboard/stage_tracker_vocabulary.go:68 is referenced only from stage_tracker_item_column_test.go; nothing in the response path calls it, and the API still ships no column field — the chevron is computed solely by stageTrackerAnchor in the SPA. The 1650-case Go ratchet therefore pins a mirror that cannot drift into the page, only away from it. Either wire it (emit the column on the item so the SPA reads it, which would also retire the duplicated predicate) or keep the rule in one place and lean on the JS test. Not blocking.

Scope note (info): adding 074 to stageTrackerTrainUnderRepair also changes merge-train membership (that function is the seating rule, per its own comment), not only the column. The body declares it ("now includes 074"), and dropping a superseded original from its train reads as intended, so I'm flagging it only so the reviewer merging this knows it is a behaviour change beyond the chevron.

— hive: agent=reviewer-2 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.

Read the diff against the v5 tree (merge-base 5380ab4), the anchor callers, and ran the new JS test. This looks correct to me.

What I verified

  • src/pkg/dashboard/static-src/js/tracker-row.js:26 — the under-repair check now runs before the merge_gate (:28) and merge_train (:33) promotions, which is exactly the second path the body describes: a 070 row with a stale merge-failed gate used to fall through to column 80. All five stageTrackerAnchor call sites (tracker-row.js:58,1126,1159,1312, tracker-motion.js:369) pass the item or pass 'pr' for linked sub-rows; :1312 passes no item, so repairing is simply false there — no regression.
  • tracker-words.js:195-201 stageTrackerUnderRepair mirrors stage_tracker_merge_train.go:255-273 branch for branch (070/071/072/074/085 + the required-check-failing: / check-failing: / ci-red reason prefixes). The 085 carve-out at tracker-row.js:26 matches stage_tracker_vocabulary.go:74.
  • stage_tracker.go:649-651,3228 — LeftTrain is mirrored onto linked_prs[] alongside MergeTrain, and the two SPA record builders (tracker-row.js:952,1307) carry left_train through.
  • node --test pkg/dashboard/stage_tracker_fixing_column.test.js: 4/4 pass on the head; with static/index.html reverted to the merge-base the file fails to load (stageTrackerUnderRepair absent) — so the test does fail without the change.

One note, not a defect

stageTrackerItemColumn (stage_tracker_vocabulary.go:68) has no production caller — stageTrackerColumn is still the only one wired into buildStageTracker, and the new function is exercised only by stage_tracker_item_column_test.go. That's fine as a Go-side oracle for the ratchet, but the user-visible fix is entirely the SPA change; worth a one-line comment on the function saying so, so the next reader doesn't go looking for the API field it feeds.

I could not run go test here (blocked on this host), so the two Go tests are unverified by me; the JS side is.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

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

stage 080-awaiting-merge-admission → 071-needs-author: conflicting

…t stage reached

A PR under repair (070 fixing, 071 needs-author, 072 returned-to-
contributor, 074 adopted-by-hive, or a red required check) lights
CI / Review even while a stale merge-failed gate or a planner-ordered
merge train still rides on its record. Hive's own #15574 read
"Fixing · conflicting" under Merge queue after a refused merge:
the merge_gate (merging / merge-failed) promotion still won.

One predicate now decides both the column and train membership:
stageTrackerTrainUnderRepair (Go; stageTrackerItemColumn) and its SPA
mirror stageTrackerUnderRepair (stageTrackerAnchor). left_train is
mirrored onto linked_prs[]. Ratchet tests pin every PR stage × gate
state × train state × reason to its column on both sides, and a
payload test replays #15574.

Fixes #15656

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
hive's own #15654 (000 New, filed seconds ago) nested the open #15655
drawn as "PR in progress", yet sorted at the bottom among the New rows:
stageTrackerSortKey fell back to the parent's unlabelled stage when the
nested PR had none, while the strip drew it at 040 covered-by-PR.
stageTrackerLead / stageTrackerLeadStage are now the one rule both read.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the fix/fixing-chevron-column branch from 85de7ef to 478c80a Compare October 30, 2026 04:27
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026
@clubanderson
clubanderson merged commit 21da71a into v5 Oct 30, 2026
77 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/fixing-chevron-column branch October 30, 2026 04:54
@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 Bot added a commit to Karibhou/hive that referenced this pull request Oct 30, 2026
Port the v5 tracker-row.js changes (hivecommons#15657, hivecommons#15664, hivecommons#15668, hivecommons#15680) into
the split files: stageTrackerAnchor under-repair column (tracker-row.js),
acted labels (tracker-row-strip.js), queue-merge pending copy
(tracker-row-acted.js), and stageTrackerLead / left_train / subRows /
review notes (tracker-row-layout.js). static/index.html regenerated and
matches the auto-merge byte for byte.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
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. 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.

Tracker: Fixing PR with a stale merge-failed gate still anchors in the Merge queue column (#15574)

1 participant