Skip to content

fix(modal): Contain render errors within the dialog - #129199

Merged
TkDodo merged 6 commits into
masterfrom
tkdodo/fix/modal-error-boundary
Nov 3, 2026
Merged

TkDodo merged 6 commits into
masterfrom
tkdodo/fix/modal-error-boundary

Conversation

@TkDodo

@TkDodo TkDodo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

When an error occurs in a Modal Dialog, the whole page crashed. Now, errors are contained within a dialog at least:

Screenshot 2026-10-30 at 11 37 49

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-3sfry3m8k.sentry.dev

@TkDodo
TkDodo marked this pull request as ready for review October 30, 2026 10:38
@TkDodo
TkDodo requested a review from a team as a code owner October 30, 2026 10:38
@TkDodo
TkDodo merged commit a976243 into master Nov 3, 2026
86 checks passed
@TkDodo
TkDodo deleted the tkdodo/fix/modal-error-boundary branch November 3, 2026 12:09
TkDodo added a commit that referenced this pull request Nov 3, 2026
Repeated calls to open an already visible sudo modal can cause an
endless loop of organization requests that return 403. The modal's
changing React key remounts its query subscriptions, and each new error
opens the modal again.

Replace the React key with an ErrorBoundary `resetKey` prop. A changed
token clears the stored error while preserving healthy modal children.
This keeps the error recovery from #129199 without restarting the
authentication flow on every open call.

The existing same-renderer recovery test passes unchanged. A new test
confirms that repeated open calls preserve typed input; it failed before
this fix. Both relevant suites pass all 27 tests.

This branch was successfully deployed

1 active deployment
Preview — f999a69f Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants