Skip to content

✨ tracker: PR in progress names who is working it, like Claimed - #15554

Merged
clubanderson merged 1 commit into
v5from
feat/tracker-pr-in-progress-actor
Oct 29, 2026
Merged

clubanderson merged 1 commit into
v5from
feat/tracker-pr-in-progress-actor

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15541

Problem

The tracker's PR in progress chevron was a bare label on every PR row (#15312, #15324, #15343, #15410, #15433, #15482, #15487, #15489, docs#514, crux#53, …), while Claimed already names its holder: Claimed · scanner ⬡, Claimed · @odttlnt's clanker 🤖. Root cause: stageTrackerClaimantStage("pr", …) only populated claimant from review (050) up to the merge gate, so an unclassified or 030/040 PR — exactly the one drawn under its issue at PR in progress — carried no holder; and the SPA drew no identity icon when stage_actor.kind was none, which is what such a PR reports.

Change

  • Server (stage_tracker_claimant.go, one resolver, no second one): stageTrackerPRClaimant now checks a live worker-ledger claim on the PR first (reusing the issue-path ledger switch → claim-comment), then the author by kind — hive PR: busy agent (kick-history) → — hive: attribution trailer agent (new HiveAgent input, fed from github.PullRequest.HiveAgent) → agent/<lane> label → login; clanker owner login; human login — else nil. stageTrackerClaimantStage("pr", stage) is true for every stage below the 080 merge gate. The addPR call site passes Ledger and HiveAgent.
  • SPA (tracker-row.js, tracker.css): when a holder is known and the next mover is nobody, the chevron draws the holder's own kind icon (⬡ hive agent / 🤖 clanker / 👤 person, ham-ico ham-actor-ico) with the same Held by: … (source) hover as Claimed. The word carries ham-has-holder so the holder token ellipsizes (flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis) before the one-line sub-row from 🐛 tracker: one-line PR sub-row header #15444 ever wraps. A detour word that already names the holder (Returned to @bob's clanker) no longer repeats them after the dot. No holder → plain PR in progress.
  • Tests: TestStageTrackerPRClaimant (trailer agent, ledger beats author, cross-hive ledger agent, unknown kind → nil), TestStageTrackerClaimantStage (pr 0/030/040 → true), TestStageTrackerClaimantChevronJS (PR-in-progress sub-row word + distinct icon for hive/clanker/person, bare word and no icon/class for an unknown holder, Returned-to names the holder once). No time.Sleep.
  • Docs: dashboard-sections.md, dashboard-copy-inventory.md; changelog.d/added-tracker-pr-in-progress-actor.md; regenerated static/index.html.

Measured (headless Chromium 1400 px, generated index.html, the #15444 sub-row harness)

Every sub-row stays 40 px / 1 line before and after — including a holder @a-contributor-with-a-very-long-github-login's clanker, which ellipsizes instead of wrapping. Lit words: before PR in progress ×3; after PR in progress · @clubanderson, PR in progress · scanner, PR in progress · @a-contributor-…'s clanker.

Before:

before: every PR in progress chevron is a bare label

After:

after: PR in progress · @clubanderson 👤, PR in progress · scanner ⬡, PR in progress · @a… 🤖, and a dependabot PR with no holder keeps the bare word

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 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 clubanderson 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the branch conflicts with the base and needs a rebase

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

PR rows at the PR-in-progress column carry the same claimant structure as
Claimed: a live worker-ledger claim on the PR, else the author by kind (a
hive PR names its attribution-trailer agent, else its agent/<lane> label;
clanker owner login; human login), else nothing. The chevron reads
"PR in progress · <holder> <icon>" with the holder's kind icon when the
next mover is nobody, ellipsizes the name before the one-line sub-row
wraps, and a detour word that already names the holder does not repeat
them.

Fixes #15541

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/tracker-pr-in-progress-actor branch from 58873ab to 7bbaf76 Compare October 29, 2026 22:53
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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
#15537 🐛 fix: scope tracker link memo to the excluded PR same files src/pkg/dashboard/stage_tracker.go
#15550 🐛 Activity monitor: an adoption pair never asks a human to pick a PR CONFLICT src/docs/dashboard-copy-inventory.md
#15553 🐛 tracker: merge-train header counts its rows; human-merge PRs ride no train same files src/docs/dashboard-sections.md
src/pkg/dashboard/static/index.html
#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
#15529 🐛 fix(dashboard): omit empty lineage separator same files src/pkg/dashboard/stage_tracker_ui_test.go
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15547 🐛 fix(dashboard): stalled merge-queue chevrons read their words (ochre on amber was invisible) same files src/docs/dashboard-copy-inventory.md
src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker_merge_gate_test.go
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static/index.html
#15556 ✨ dashboard: toast countdown progress bar same files src/docs/dashboard-sections.md
src/pkg/dashboard/static/index.html
#15526 🌱 dashboard: split stage_tracker.go into 4 files CONFLICT src/pkg/dashboard/stage_tracker.go
#15521 🌱 refactor: split tracker row source CONFLICT 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.

Conclusion: read the server and SPA halves against the tree at 7bbaf76; the change does what the body says and I found no defect.

Server

  • stage_tracker.go:2338 passes Ledger: s.stageTrackerLedgerClaim(repoName, pr.Number) — the same helper the issue path already uses at :2235 (stage_tracker_claimant.go:230, Lookup(repo, number)). Issue and PR numbers share one sequence per repo, so keying the ledger by PR number cannot alias an issue's claim.
  • stageTrackerPRClaimant (stage_tracker_claimant.go:131-133) delegates a live ledger claim to stageTrackerIssueClaimant with only Ledger/Since/HiveID set, so it can only take the ledger branch (:84-99), never fall into the marker/assignee/worker branches. Good: one resolver, as the body promises.
  • Fallback order for a hive PR is now busy worker → pr.HiveAgent (github.PullRequest.HiveAgent, client.go:903) → agent/<lane> label → author login; the TrimSpace guard keeps an empty trailer from short-circuiting the label.
  • stageTrackerClaimantStage("pr", stage) widening to stage < trackerNumberAwaitingMerge is the actual fix for #15541; the merge gate is still excluded.

SPA (tracker-row.js)

  • STAGE_TRACKER_CLAIMANT_ICON keys (hive-agent/clanker/person, :202) match the Go constants (stage_tracker_claimant.go:31-33), and the icon names map onto existing STAGE_TRACKER_ICONS entries (hive/clanker/human, :112-128), so stageTrackerIcon never returns '' for a known kind. stageTrackerClaimantLine exists at :214.
  • holderIco only renders when !actorIco, so a row with a server stage_actor keeps its actor icon and does not get two.

Minor, not a defect: detourHolder suppresses the · holder suffix via indexOf(holderShort), a substring match. A detour text that happened to contain the short form for another reason would also drop it — unlikely with current detour wordings, just noting the mechanism.

— hive: agent=reviewer 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 resolver and its callers; this looks correct to me.

  • stageTrackerPRClaimant now consults s.stageTrackerLedgerClaim(repoName, pr.Number) (stage_tracker.go:2338 in this diff). claims.Ledger.Lookup keys on owner/repo#N (src/pkg/claims/claims.go:748-752), and GitHub numbers are one sequence per repo, so a PR's lookup can never collide with an issue claim — no cross-match risk. One note, not a defect: today the only claims.Ledger writers are the contributor claim API (src/pkg/dashboard/claims_api.go:125, :306), so the "ledger beats author" branch is reachable only when a client claims a PR's own number; the tree's existing ledger caller (stage_tracker.go:2235) is issue-only. The new unit test exercises the branch directly, which is fine.
  • HiveAgent is a real field on the enumerated PR (src/pkg/github/client.go:903), and the fallback order (busy worker → trailer agent → agent/<lane> label → login) matches the body.
  • stageTrackerClaimantStage("pr", …) widening to stage < trackerNumberAwaitingMerge is the only behaviour change on existing rows; the merge-gate rows (≥ 080) keep their own live detail as before.
  • SPA: detourHolder suppresses the duplicate name only when sg.detour.text already contains holderShort (both unescaped, compared before esc), and holderIco is drawn only when actorIco is empty, so rows that already had an actor icon are unchanged.

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

@clubanderson
clubanderson merged commit f226663 into v5 Oct 29, 2026
78 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/tracker-pr-in-progress-actor branch October 29, 2026 23:16
@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

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

tracker: "PR in progress" chevron does not say who is working the PR

1 participant