Repository navigation
[dialog] Wrap the finalFocus frame wait in act - #5640
Merged
michaldudak merged 2 commits intoSep 9, 2026
Merged
Conversation
leonidaz
marked this pull request as ready for review
September 7, 2026 03:42
leonidaz
requested review from
atomiks,
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
September 7, 2026 03:42
8 of 9 tasks
commit: |
Bundle size
PerformanceTotal duration: 997.72 ms ▼-298.36 ms(-23.0%) | Renders: 76 (+0) | Paint: 1,628.84 ms ▼-454.52 ms(-21.8%)
…and 7 more (+3 within noise) — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
michaldudak
approved these changes
Sep 9, 2026
14 of 21 tasks
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.
Summary
Wrap the explicit animation-frame wait in the
Dialog.Popupfinal-focus/close-type test withact. Opening the dialog schedules transition state updates on that frame; the test should finish those updates before sending Escape and checking the final focus target.This was prompted by an intermittent
DialogRoot/DialogBackdrop“not wrapped in act” failure while running the adapted upstream test in Octane CI. The unmodified React test passed locally in both jsdom and Chromium, so I have not reproduced a failure in Base UI's React runner. This is a small test-synchronization improvement motivated by that downstream failure.The component implementation, frame wait, interaction sequence, and focus assertions are unchanged.
Validation
pnpm test:jsdom DialogPopup --no-watch: 40 passed, 6 existing skips, before and after.pnpm test:chromium DialogPopup --no-watch: 46 passed, before and after.pnpm typescriptpnpm eslintpnpm stylelintpnpm prettiergit diff --checkPrepared with Codex.