fix(web): keep PR merge confirmation stable while closing - #6234
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved 6be0ea3 This PR fixes a UI animation glitch by separating dialog visibility state from action state, ensuring the confirmation content stays stable during the close animation. The helper function extraction is a clean refactor with no behavior changes to merge/close operations. You can customize Macroscope's approvability policy. Learn more. |
a16f141 to
fdadc64
Compare
Dismissing prior approval to re-evaluate fdadc64
fdadc64 to
6be0ea3
Compare
Dismissing prior approval to re-evaluate 6be0ea3
|
Closing: main now fixes this same bug the same way via #7381 (separate open state, action cleared in |
What Changed
The PR action dialog now keeps its confirmation action alive until the exit animation completes. Dialog visibility is tracked separately, and the action is cleared through
onOpenChangeCompleteafter the popup has closed.Confirmation copy also returns nothing when no action is pending.
Why
Confirming a merge immediately cleared the pending action. The existing copy logic treated every non-merge value, including the cleared state, as a close action while the dialog remained mounted for its exit animation. That briefly changed the dialog to “Close pull request?” before it disappeared.
Keeping the action until the close animation finishes preserves the original merge copy for the dialog’s entire visible lifetime.
UI Changes
Before
After
Checklist
Made with GPT-5.6 Sol using the Codex harness in T3 Code.
Note
Fix PR merge confirmation dialog to retain content during close animation
Separates
confirmOpen(visibility) fromconfirmAction(selected action) in PullRequestDetailPanel so the dialog content is not cleared until after the exit animation completes. Extracts confirmation copy (title, description, submit label, destructive flag) into a newdescribePullRequestConfirmationhelper in pullRequestDetail.logic.ts, providing a single source of truth for dialog content across merge, auto-merge, and close actions.Macroscope summarized f01d140.