Repository navigation
fix(ui): keep dialog content through close animation - #4285
Merged
Merged
Conversation
Signed-off-by: Bruney <[email protected]>
dam-code-guardian
approved these changes
Oct 1, 2026
dam-code-guardian
left a comment
Contributor
There was a problem hiding this comment.
🛡️ Code Guardian 🛡️ — ✅ Code Review @ c01f680
PR #4285: fix(ui): keep dialog content through close animation
Author: BrUn3y | Branch: fix/dialog-close-flash → main | Changes: +60 −17 (5 files)
Summary
The PR keeps the dialog state in the store with open: false until the close animation ends. Then clearClosedDialog removes it, so the content does not flash empty.
Findings
- ✅ Looks good: A second close is safe.
closeDialogreturns early whenopenis false, so the action click plusonOpenChange(false)resolves the promise once. Radix Presence 1.1.10 does not useflushSync, so React still sendsonAnimationEndbefore the content unmounts.
Documentation Check (doc-drift)
✅ No findings.
Issue Fit
✅ No findings.
TypeScript Engineering Review
✅ No findings.
React UI Engineering Review
- 🟢 Suggestion: Only the content's
animationendevent callsclearClosedDialog. If no close animation runs, the store keeps the closed entry until the next dialog opens. The UI stays correct. A close signal that Radix always sends, for exampleonCloseAutoFocus, removes this dependency on CSS (packages/ui/src/components/ui/confirm-dialog.tsx:64)
Verdict
APPROVE — No blocking finding. The store test covers the new close lifecycle.
Review by Code Guardian 🛡️ · automated code guardian
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, here is my small first contribution to DAM
Summary
Testing
mise run checkmise run //packages/ui:checkmise run //packages/ui:test— 568 tests passed across 66 filesCloses #4264