A self-throwing global error component renders no last-resort UI If the global error…
- User
A self-throwing global error component renders no last-resort UI
If the global error component itself fails, return the built-in valid HTML fallback with the expected successful fallback status while preserving response headers and cookies. Local error boundaries and framework navigation/control-flow signals must retain their existing semantics, and the original boundary exception must not be exposed.
Interface
No new public interfaces are introduced.
- Assistant
Now let me look at the SSR handler and the default global error module:
- Assistant
Let me look at the control-flow signal helper in navigation.ts:
- Assistant
Now I have the full picture. Let me check how
CLAUDE.mddescribes conventions and tests before writing code: - Assistant
Now I'll implement. First, the new fallback module:
- Assistant
Now wire it into
renderAppPageErrorBoundary: - Assistant
Now add unit tests to
tests/app-page-boundary-render.test.ts: - Assistant
Now the integration fixture. First check whether the root
node_modulesexposesvinextfor resolution: - Assistant
The plugin resolves
vinext/*internally, so a minimal fixture withoutnode_modulesworks. Create the fixture: - Assistant
Dev path works end-to-end. Let me also cover the production build path (where digests get sanitized), mirroring the compat test's preview pattern:
- Assistant
All 5 pass. Now run the related suites for regressions:
- Assistant
Now format, lint, and type checks:
- Assistant
Knip's remaining hints are pre-existing (identical on the clean tree). Re-verify everything after the change:
- Assistant
The lockfile diff just registers the new fixture as a dependency-less workspace importer (
tests/fixtures/*is a workspace glob) — expected. Final check pass: - Assistant
Done. A self-throwing global-error component now serves a last-resort UI instead of a raw failure.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.