Skip to content

fix(submit): refresh a stale overview row that has since merged - #273

Merged
lararosekelley merged 1 commit into
mainfrom
fix/271-refresh-stale-overview-rows
Jul 20, 2026
Merged

fix(submit): refresh a stale overview row that has since merged#273
lararosekelley merged 1 commit into
mainfrom
fix/271-refresh-stale-overview-rows

Conversation

@lararosekelley

@lararosekelley lararosekelley commented Jul 20, 2026

Copy link
Copy Markdown
Owner

fix(submit): refresh a stale overview row that has since merged

A carried-forward stack-overview row whose branch has left the local stack is now re-checked by id, so a PR that merged or closed after it was last recorded restyles accordingly instead of showing as open forever.

Closes #271


Stack managed by git-stk

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

Claude finished @lararosekelley's task in 3m 37s —— View job


Code Review - Confidence: 95/100

Adds a best-effort re-fetch of historical "open" ledger rows whose PR has since merged or closed, so the overview stops showing a stale green dot for branches that have already landed.

No actionable findings. The implementation is tight and the design choices are sound:

  • The entry.state != "open" guard correctly skips terminal states, and the if let Ok(Some(state)) pattern correctly treats provider errors as "leave it as-is" (best-effort semantics are documented in the trait default and in the call site).
  • parse_state lowercases before matching, so "MERGED" from gh --json state round-trips correctly to "merged" in the ledger's data line — verified by the test's assert!(bottom.contains(r#""state":"merged""#)).
  • The refreshed historical slice is used to build entries before both the live-review and historical-review body updates, so the corrected state propagates to every PR body in one pass.
  • GitLab/Gitea don't implement review_state — the trait default (Ok(None)) is an explicit, documented no-op, not a partial migration. Non-GitHub users keep the pre-PR behavior; the feature can be extended later.
  • The test correctly relies on rule-insertion order in FakeProvider: the "pr view 11 --json state" needle is more specific than "pr view 11" and registered first, so the state-query stub fires for --json state calls while the body stub fires for plain pr view calls.

CI is still in-progress at review time; no failures to report yet.

Base automatically changed from fix/270-reconcile-remote-only-commits to main July 20, 2026 19:21
@lararosekelley
lararosekelley force-pushed the fix/271-refresh-stale-overview-rows branch from 4295fce to 9c997ff Compare July 20, 2026 19:21
@lararosekelley
lararosekelley merged commit 4525d33 into main Jul 20, 2026
13 checks passed
@lararosekelley
lararosekelley deleted the fix/271-refresh-stale-overview-rows branch July 20, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stack overview never refreshes a carried-forward row that has since merged/closed

1 participant