Skip to content

πŸ› tracker: row actions show progress, surface failures, and advisory Close really closes - #15445

Merged
clubanderson merged 2 commits into
v5from
fix/advisory-close-progress
Oct 29, 2026
Merged

clubanderson merged 2 commits into
v5from
fix/advisory-close-progress

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15436

Root cause

runRowAction (tracker-actions.js) maps every decide:* id through stageTrackerDecisionTarget(it), which only yields a target for a parked PR or a needs-decision issue. An advisory row is stage 0 with no modifiers, so Close (read) on #15381 produced an empty target list and the function returned {toasts: [], pending: []} β€” no confirm dialog, no request, no toast, no busy state.

Evidence (live spoke e0f8bd901): /api/stage-tracker row for 15381 β†’ "history": []; /api/audit has no decision/close entry; pod logs (6h) have no 15381 / close-read line. The server's close-read branch is correct and unit-tested (#15418) β€” it was never reached.

Fix

  • decide:close-read acts on the advisory row itself; any decide:* click with an empty target list now toasts a warning instead of returning silently.
  • Progress, consistent with the tracker: every mutating row action (close-read, close-superseded, won't-fix, hold, approve, merge, decide) puts the chevron into the existing striped busy state with the verb caption (Closing…) from the moment the request is sent; when the server reports the item closed/merged the caption turns terminal (Closed Β· leaving list / Merged Β· leaving list) and holds until the next tracker payload drops the row. One helper path in stageTrackerRunActions, no per-action code.
  • Server-side no-resurrect: stageTrackerDropOperatorClosed drops items whose newest ledger action is an applied close-* for HIVE_OPERATOR_CLOSED_GRACE (default 15m), and open counts are recomputed, so a stale GitHub list cannot bring the row back.
  • Paused repos: a close on an operator-paused repo returns 200 status: refused with Close refused: repo paused β€” … and writes nothing.
  • Failures never silent: refused / GitHub 4xx-5xx / network errors restore the chevron, toast the reason, and note it on the row's history badge (red; hover's first line is the reason) until a newer server record replaces it. The operator ledger records refused answers as failed with the one-line why.

Tests

  • Go: TestRepoItemDecisionCloseReadAdvisoryFixtureAndPausedRefusal (real triage: duplicate and overlapping open issues/PRs to consolidateΒ #15381 labels/title/body fixture: closes via comment + state; paused repo β†’ structured refusal, no writes), TestStageTrackerDropOperatorClosed, new TestOperatorActionOutcome cases.
  • Node harness: TestStageTrackerAdvisoryCloseReadProgress β€” click β†’ busy Closing… β†’ terminal Closed Β· leaving list β†’ row removed from the next payload; refused and 403 paths restore the label and surface the reason.
  • go test -race ./pkg/dashboard/ -run 'StageTracker|Decision|Advisory|Operator|IndexHTML', full ./pkg/dashboard/, ./pkg/writeback/ all green.

Docs: docs/dashboard-sections.md row-actions section; changelog changelog.d/fixed-tracker-advisory-close-progress.md.

…Close really closes

Close (read) on an advisory row did nothing: runRowAction mapped every
decide:* id through stageTrackerDecisionTarget, which only yields a
target for a parked PR or a needs-decision issue, so the advisory's
empty target list returned silently - no request, no dialog, no toast
(tracker row history: [], no audit entry, no pod log line for 15381).

- close-read acts on the advisory row itself; an empty decide target
  list now toasts a warning instead of returning silently
- every mutating row action shows the striped busy chevron with the
  verb caption, then a terminal 'Closed/Merged Β· leaving list' caption
  until the next tracker payload drops the row
- server drops operator-closed items from the tracker for
  HIVE_OPERATOR_CLOSED_GRACE (default 15m) so a stale GitHub list
  cannot resurrect the row
- close on an operator-paused repo is refused (200 status: refused)
  with the reason and writes nothing; refused/failed/errored actions
  restore the chevron, toast the reason and note it on the history
  badge; the ledger records refused answers as failed
- Go handler/tracker tests and Node harness progress/failure tests

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@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 hanthor 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

@github-actions

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible β€” a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking β€”
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly β€” that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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
#15450 ✨ writeback: content-aware duplicate and burst suppression at the gate same files src/pkg/dashboard/static/index.html
#15444 πŸ› tracker: one-line PR sub-row header same files src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15449 πŸ› tracker: merge queue ordinals, one column, readable train icon, no conflicting riders same files src/docs/dashboard-sections.md
src/pkg/dashboard/api_repo_item_decision.go
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_row_actions_test.go
src/pkg/dashboard/static-src/js/tracker-actions.js
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15425 πŸ› fix: identify tracker claims from the local ledger same files src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15400 πŸ› fix: keep merge queue position visible during sweeps same files src/pkg/dashboard/static/index.html
#15307 πŸ› fix: refuse workflow-changing fork rebase follow-through same files src/pkg/dashboard/api_repo_item_decision_test.go

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 050-review-pending: required-check-pending:Sign-off survives the squash

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

One concrete blocker, otherwise the change reads correctly to me.

Blocker β€” changelog fragment is in the wrong directory (src/changelog.d/fixed-tracker-advisory-close-progress.md). src/scripts/check-changelog-fragment.sh:51 rejects any fragment under src/changelog.d/ ("fragments live in changelog.d/ at the repo root"), and that is why changelog-fragment-guard is red on d86117a. The body says the fragment is at changelog.d/…, so this looks like a mis-placed git add. Fix: git mv src/changelog.d/fixed-tracker-advisory-close-progress.md changelog.d/. (Your sibling PRs #15442 and #15444 have theirs at the root.)

Verified against the tree

  • runRowAction (tracker-actions.js:1857): rows is declared at :1821 before the new stageTrackerNothingToActOn(id, rows) calls, so no scope issue; the decide:close-read branch sits before the generic decide:* mapping, so advisory rows are no longer sent through stageTrackerDecisionTarget.
  • stageTrackerDropOperatorClosed keys on Detail == "closed"; the close branch in api_repo_item_decision.go:483 does answer Status: "closed" and operatorActionOutcome records detail = str("status"), so the ledger match holds for all three of operatorClosedActions.
  • stage_tracker.go:2336-2337 recomputes OpenIssues/OpenPRs after the drop; stageTrackerOpenCounts was already the counter at :2331, so the header numbers stay consistent.
  • Paused-repo refusal is placed before CreateIssueComment, so nothing is written; writebackGateRef, RepoPausedDetail, RepoPauseFor all exist. go build ./pkg/dashboard/ passes at this head.

Not run: go test (disabled in this pod); relying on your stated green run.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 050-review-pending: required-check-pending:build-and-test

@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

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: Close (read) on an advisory does nothing visible β€” no progress, item stays, issue stays open

1 participant