Skip to content

fix(web): surface fatal bootstrap snapshot failure#964

Draft
copypasteitworks wants to merge 1 commit intopingdotgg:mainfrom
copypasteitworks:pr/bootstrap-init-errors-v2
Draft

fix(web): surface fatal bootstrap snapshot failure#964
copypasteitworks wants to merge 1 commit intopingdotgg:mainfrom
copypasteitworks:pr/bootstrap-init-errors-v2

Conversation

@copypasteitworks
Copy link

@copypasteitworks copypasteitworks commented Mar 12, 2026

Refs #961

Summary

  • surface fatal initial orchestration.getSnapshot() bootstrap failure instead of swallowing it
  • render a blocking recovery view with Retry snapshot, Reload app, and expandable error details
  • keep later snapshot resync failures unchanged

Why

Today the first snapshot load can fail silently, which can leave the app unusable with no diagnosis or recovery path.

This PR keeps the fix tightly scoped to the initial web bootstrap path only.

Non-goals

  • no reset or clear-state UX
  • no provider runtime hardening
  • no Codex resume fallback widening
  • no server contract changes

UI Change

When the first snapshot load fails before any successful snapshot has loaded, the app now shows a blocking recovery view that mentions persisted state broadly (T3CODE_STATE_DIR, CODEX_HOME, or other saved app state), exposes the backend error details, and allows retrying without reload.

Validation

  • bun run test:browser src/routes/-__root.browser.tsx
  • bun fmt
  • bun lint
  • bun typecheck

Note

Show blocking recovery view when initial orchestration snapshot fails to load

  • EventRouter in __root.tsx now tracks whether the first getSnapshot call succeeded; on failure it sets an error state and defers bootstrap navigation until a successful retry.
  • A new InitialSnapshotRecoveryView component renders a blocking UI with the error details and buttons to retry the snapshot or reload the app.
  • Adds browser tests in -__root.browser.tsx using MSW WebSocket/HTTP mocks to verify the recovery view appears on failure and disappears after a successful retry.
  • Behavioral Change: before this change, a failed initial snapshot would leave the app in a broken/partial state; it now renders a dedicated recovery screen instead of the main UI.

Macroscope summarized b196590.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 857538e3-f4d4-4712-8f99-d404d68c752d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants