Repository navigation
π tracker: keep a closed linked issue as the row head instead of promoting the PR - #15241
Conversation
β¦oting the PR stageTrackerClosedIssueAnchor (#14655) re-anchored a standalone PR row on the PR when every closing-keyword link named a closed issue, and the SPA drew the PR at full width in the issue slot with a 'closes #N Β· closed' chip. A soft-linked (Refs #N) closed issue went through stageTrackerPRIssueSlot instead and kept the issue on the left, struck through β so the row head depended on how the PR linked the issue. The SPA now always draws the linked issue in the issue slot, open or closed, and keeps the PR in the PR column. The server names, from the merged ledger, the other merged PR recorded under the issue (StageTrackerLinkedIssue.ClosedBy), and the chip reads 'closed by #N' linking to it so a duplicate fix reads as one. closed_issue still sinks the row in its column. Fixes #15232 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@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. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Conclusion: reads correct to me; one low-severity naming gap worth a look before merge.
What I verified
src/pkg/dashboard/stage_tracker.go(stageTrackerMarkClosedBy): runs afterstageTrackerResolveLinkedPRsinbuildStageTracker, only touchesKind == "pr"rows, only closed links withClosedBy == 0, and passespr.Numberasexclude, so a PR is never shown as closing its own issue.MergedLedger.ClosedByis nil-receiver safe, so a server without a ledger yields 0 and the chip falls back to plainclosed.- Linked issues are same-repo by construction (
stage_tracker.go:2497-2501, "Same-repo references only"), so looking the issue up underpr.Repois sound. - Tests cover closer / no closer / self / other-repo-same-number.
Low: short-name rows never match the ledger. MergedLedger.ClosedBy compares strings.EqualFold(e.Repo, repo). Ledger entries are written org-qualified (merged_ledger_server.go:107, qualify(snap.Repo) via mergedRepoQualifier, which prefixes Project.Org when the name has no /). The tracker row's Repo comes from overviewRepoName (overview_export.go:381-386), which returns repo.Full when set and otherwise the short repo.Name. Your own comment at stage_tracker.go:2508-2510 notes pr.Repo "may be the config's short name ("hive")". In that configuration ClosedBy returns 0 for every row and the closed by #N chip never appears β a silent degradation rather than a break. Running pr.Repo through the same stageTrackerRepoQualifier(status) (or s.mergedRepoQualifier()) before the lookup in buildStageTracker would close it; a table case with a short-name row against a qualified ledger entry would pin it.
I have not changed anything.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 095-pre-merge-soak β 060-reviewed: required-check-pending:Sign-off survives the squash |
|
Merged by hive contributor-lane auto-merge: CI green for β₯30m, reviewer verdict approve, @clubanderson was auto-promoted after 5 clean merged PRs in this hive's repositories. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15232
Root cause
stageTrackerClosedIssueAnchor(#14655) re-anchors a standalone PR row on the PR when every closing-keyword link names a closed issue (closed_issueset), and the SPA'sstageTrackerRowHtmlthen drew the PR at full width in the issue slot with a secondarycloses #N Β· closedchip. A PR whose link is soft (Refs #N, title/mention) skipped that anchor and went throughstageTrackerPRIssueSlot, which keeps the closed issue on the left, struck through under aclosedchip. So the row head depended on how the PR linked the issue (dibs #496/#500 vs. #15191/#15173), and the operator saw an empty issue column.Fix
closed_issuespecial branch is gone; a PR row always puts its linked issue in the issue slot (open or closed, same strikethrough +closedchip) and itself in the PR column.closed_issuestill sinks the row in its column and still drives the not-planned "may be moot" chip.StageTrackerLinkedIssue.ClosedBy(closed_by) names the merged PR the merged ledger recorded under the issue (MergedLedger.ClosedBy, excluding the row's own PR);stageTrackerMarkClosedByfills it after link resolution. The chip then readsclosed by #Nand links to that PR so a duplicate fix reads as one.stageTrackerMarkClosedBy;MergedLedger.ClosedBy) and node row assertions inTestStageTrackerRows.