Repository navigation
Conversation
…n state After a header action succeeded (ready for review, convert to draft, close, reopen, auto-merge), the panel cleared its pending state and refetched without waiting, so the header redrew the pre-action detail until the refetch landed. The detail now applies each confirmed action outcome over the fetched data and drops it once the fetched detail agrees or after 60 seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The PR keeps confirmed action results visible while refreshed PR data catches up, preventing header flashes. The overrides are local, PR-scoped, and expire after 60 seconds; host actions and permissions are unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Patch mapping and settlement apps/web/src/components/pullRequest/pullRequestDetail.logic.ts, apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts |
New helpers map supported actions to detail patches, apply overrides, and settle fields against fetched values. Tests cover action mapping, scope behavior, expiration, and settlement. |
Scoped override lifecycle apps/web/src/components/pullRequest/pullRequestList.logic.ts, apps/web/src/components/pullRequest/usePullRequestDetail.ts |
The hook tracks scoped overrides, applies remaining fields to fetched details, and expires the current override after the exported 60-second trust duration. |
Successful action wiring apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx |
After an action succeeds, the panel records its patch when the action has a supported outcome. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Low
Sequence Diagram(s)
sequenceDiagram
participant PullRequestDetailPanel
participant usePullRequestDetail
participant pullRequestDetailLogic
PullRequestDetailPanel->>pullRequestDetailLogic: derive patch after successful action
PullRequestDetailPanel->>usePullRequestDetail: record supported action outcome
usePullRequestDetail->>pullRequestDetailLogic: record and apply scoped override
usePullRequestDetail->>pullRequestDetailLogic: settle override against fetched detail
Possibly related issues
- pingdotgg/t3code#29402 — The change records confirmed pull request action outcomes to prevent the detail view from continuing to display pre-action fields during refresh.
Suggested reviewers: juliusmarminge
Merge Risk: 
Minimal · up to d08a0
-
No merge-blocking risk was identified.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title names the main change: after a pull request header action succeeds, the header no longer briefly shows the pre-action controls. The changeset adds scoped optimistic overrides for state, isDraft and autoMergeEnabled, applied in usePullRequestDetail, and the header reads them. The title is a conventional commit with a plain-language description, and it is specific enough for a teammate scanning history.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope and approval, and Verification. The Problem section gives the symptom, the cause in finishAction, expected behavior and a repro. The Change section explains the override, its 60 s expiry, and why merge is excluded. The Scope section links issue
#29402and explains the bug-fix exception. The Verification section gives before and after recordings, names the new test cases and the commands run, and states what was not checked. The description has some gaps. It does not say the issue has maintainer approval. It also does not cover the expiry timer in the hook, which the author discloses as untested. These gaps are minor and do not block merge.
Full details: Linked Issues check
-
Explanation
Issue
#29402requires the confirmed result of each affected header action to remain visible during detail refresh.pullRequestDetailPatchAfterActionmapsready,draft,close,reopen,enable-auto-merge, anddisable-auto-mergeto the required fields.usePullRequestDetailapplies the override to the shared detail, retires fields when fetched data agrees, and expires fields after the existing 60-second trust period. The panel records the outcome only after success.mergeremains unchanged. Focused tests cover mappings, overlay behavior, accumulation, scope reset, settlement, and expiry.
Full details: Out of Scope Changes check
-
Explanation
The changes remain within issue
#29402. The exported trust-period constant, detail override helpers, hook integration, panel integration, and focused tests directly support the confirmed-action display fix. No unrelated product area, server code, client contract, or other client change is shown.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A second action within the trust window replaced the shared timestamp, so the first action's field outlived its own deadline. Each overridden field now carries its own timestamp and the timer expires only the fields it stamped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate d08a04d
Dismissing prior approval to re-evaluate d08a04d
|
Note Written by Verified in a real dev environmentverified as-is at
these captures focus on the header during the confirmed-action refresh. the screenshots show main re-enabling the stale action and the pr removing it while refreshed permissions arrive. the 7-second recording shows main above and the pr below; playback and seeking were checked after upload. Not verified
verification by codex harness, |



Note
🤖 This PR was prepared by Claude Code (Claude Opus 5.5) on behalf of @Brechard.
Problem
After an action from the pull request header succeeds (Ready for review, Convert to draft, Close, Reopen, Enable or Disable auto-merge), the header briefly shows the old controls again.
finishActioninPullRequestDetailPanel.tsxclears the pending state as soon as the host accepts the action, but the refetch it starts is not awaited. The header redraws from the pre-action detail until the new detail arrives, so on a draft that was just closed, Ready for review comes back enabled for about a second before Closed appears. Expected: once the host confirms the action, the header shows its result.Repro: open a draft PR in the Pull requests page, then pick ⋯ → Close pull request → Confirm close.
Change
When the host confirms one of those actions, the detail applies its known outcome (
state,isDraftorautoMergeEnabled) on top of the fetched detail. Each field is dropped once fetched data agrees with it, or after the same 60 s trust window the PR list already uses for its row overrides (PULL_REQUEST_OVERRIDE_TRUST_MS, now exported). A failed action changes nothing, andmergeis left alone because it can be queued rather than done. The override lives inusePullRequestDetail, so the header, actions menu and summary all read the same state.Scope and approval
Fixes #29402, which reports the bug and has not been triaged yet. This PR also fits the focused-bug-fix exception: a single obvious defect (the header shows controls for a state the host has already left) with a narrow fix in the web client. It reuses the list's existing settle-on-agree model rather than adding a new mechanism, and it changes no contracts, server code or other clients.
Verification
mainac8dce0(13 s): after Close succeeds, Ready for review comes back enabled while the refresh runs, then Closed appears. A DOM sampler logged the re-enabled button for about 1.1 s.efaf7f9(13 s): the header goes straight from the disabled button to Closed.pullRequestDetail.logic.test.tsunderconfirmed action outcome on the detailcover action-to-outcome mapping, applying over the fetched detail, accumulating within one PR and resetting for another, and retiring a field once fetched data agrees. They fail onmain, where the helpers do not exist.vp test runonpullRequestDetail.logic.test.tsandpullRequestList.logic.test.tspasses, and so doesvp run check:changed.expirePullRequestDetailOverrideis covered, but the hook's timer that calls it is not.Claude Opus 5.5 via Claude Code