Skip to content

[dialog] Wrap the finalFocus frame wait in act - #5640

Merged
michaldudak merged 2 commits into
mui:masterfrom
leonidaz:fix/dialog-final-focus-frame-act
Sep 9, 2026
Merged

michaldudak merged 2 commits into
mui:masterfrom
leonidaz:fix/dialog-final-focus-frame-act

Conversation

@leonidaz

@leonidaz leonidaz commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Wrap the explicit animation-frame wait in the Dialog.Popup final-focus/close-type test with act. 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 typescript
  • pnpm eslint
  • pnpm stylelint
  • pnpm prettier
  • git diff --check

Prepared with Codex.

@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@5640
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@5640
    

commit: ab82f39

@code-infra-dashboard

code-infra-dashboard Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 997.72 ms ▼-298.36 ms(-23.0%) | Renders: 76 (+0) | Paint: 1,628.84 ms ▼-454.52 ms(-21.8%)

Test Duration Renders
Tabs mount (200 instances) 192.10 ms ▼-57.66 ms(-23.1%) 3 (+0)
Select mount (200 instances) 127.80 ms ▼-43.94 ms(-25.6%) 3 (+0)
Mixed surface mount (app-like density) 70.10 ms ▼-24.47 ms(-25.9%) 5 (+0)
Checkbox mount (500 instances) 60.73 ms ▼-22.47 ms(-27.0%) 1 (+0)
Menu mount (300 instances) 76.11 ms ▼-20.94 ms(-21.6%) 1 (+0)

…and 7 more (+3 within noise) — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ab82f39
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6aa02cd933872d000888b1af
😎 Deploy Preview https://deploy-preview-5640--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@zannager zannager added the component: dialog Changes related to the dialog component. label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: dialog Changes related to the dialog component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants