Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Closedcopypasteitworks(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/964/headopened View on GitHub

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.
    1. 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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Closing because this remains a conflicted draft and bootstrap recovery has been rewritten around incremental connection recovery.

      This was closed as part of a large repo-wide maintenance sweep. If you think it's still relevant, please reopen.

    4. juliusmarminge closed this

Sign in to join this conversation.