Skip to content

fix(web): retry startup after the server recovers - #11291

Merged
maria-rcks merged 1 commit into
mainfrom
fix/web-startup-retry
Sep 13, 2026
Merged

fix(web): retry startup after the server recovers#11291
maria-rcks merged 1 commit into
mainfrom
fix/web-startup-retry

Conversation

@shivamhwp

@shivamhwp shivamhwp commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

A failed startup session probe leaves the root error screen visible after the server recovers. "Try again" only resets the error boundary, so it never retries the failed route loader. The button now calls router.invalidate() to rerun the startup probe and open the app when it succeeds.

Refs #3513. This covers manual retry; the reported session-store write failure and automatic recovery remain open. It follows the request in #3520 for a current reproduction.

Reproduction and validation

Reproduced on main 7bd7f99e6cab940892ff9240549c507bfd066aee in a real Chromium client against disposable T3 state. Intercept /api/auth/session with the DevTools Fetch domain and return HTTP 500, load the app, then allow the request through and click "Try again". Before this change, the error remains and the request count stays unchanged. Afterward, one fresh request succeeds and the app opens. Retrying while the endpoint still returns 500 retains the error screen, and a later retry recovers.

18 auth bootstrap tests and web typecheck pass. Scoped lint reports two existing React warnings. Web and desktop share this error screen; native desktop boot and remote/relay recovery were not separately exercised. Mobile uses separate navigation.

Before, after clicking "Try again" with a recovered endpoint:

Retry remains on the error screen

After:

Retry opens the app

Recovery recording:

startup-retry-recovery.mp4

Model: GPT-6. Harness: Codex in T3 Code.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the “Try again” action on error pages so it refreshes the current route and retries loading more reliably.

Rebased on main 20363c32c9bfdbf49c2716ef11d1f18483fcc01b. Scoped validation rerun after rebasing; existing native and human review limits remain.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 11, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 00e2e5e

Macroscope's review found this PR approvable — This single-file fix makes the existing Try again action rerun the failed startup loader, allowing the web app to recover after the server returns. Its effect is limited to explicit interaction with the existing error screen, with no default, schema, infrastructure, or security changes.

No code changes detected at e330a61. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.5 KiB −66 B (−0.5%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB +6 B (+0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.5 KiB −72 B (−1.1%) 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 57.0 KiB −88 B (−0.2%) 66.4 KiB
Codex Live turn messages 10 8 −2 (−20.0%) 21
Claude Total thread wire 13.6 KiB 13.6 KiB −38 B (−0.3%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +1 B (+0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.5 KiB −39 B (−0.6%) 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 57.8 KiB −88 B (−0.1%) 66.4 KiB
Claude Live turn messages 10 8 −2 (−20.0%) 21

Baseline: 20363c3 · PR result: e330a61 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 52c62d92-a378-457c-ae92-4b2ddb0ffcd1

📥 Commits

Reviewing files that changed from the base of the PR and between 00e2e5e and e330a61.

📒 Files selected for processing (1)
  • apps/web/src/routes/__root.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The root route error view now obtains the router and uses router.invalidate() when the user selects “Try again” instead of calling the error boundary reset function.

Changes

Root route retry flow

Layer / File(s) Summary
Router invalidation retry
apps/web/src/routes/__root.tsx
RootRouteErrorView now obtains the router with useRouter(). The “Try again” button calls void router.invalidate().

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to e330a

The retry flow recovers when the server returns, while repeated failures leave the existing error screen available.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: enabling startup recovery after the server recovers.
Description check ✅ Passed The description explains what changed, why it changed, the reproduction steps, validation results, scope limits, and UI behavior. It includes screenshots and a recovery recording. The template Checkli…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/web-startup-retry

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

@shivamhwp
shivamhwp force-pushed the fix/web-startup-retry branch from 00e2e5e to e330a61 Compare September 13, 2026 15:34
@maria-rcks
maria-rcks merged commit e628683 into main Sep 13, 2026
32 of 43 checks passed
@maria-rcks
maria-rcks deleted the fix/web-startup-retry branch September 13, 2026 15:56
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 13, 2026
## What's Changed
* fix(web): offer recovery from missing pages by @shivamhwp in pingdotgg/t3code#11314
* fix(web): retry startup after the server recovers by @shivamhwp in pingdotgg/t3code#11291
* feat(web): add optional compact sidebar rail by @maria-rcks in pingdotgg/t3code#11525
* feat(web): add opt-in in-app thread notifications by @Bil0000 in pingdotgg/t3code#11570
* feat(web): organize connections by environment by @maria-rcks in pingdotgg/t3code#11542
* fix(web): keep sparse sidebar shelves at the bottom by @maria-rcks in pingdotgg/t3code#11595
* fix(cursor): preserve internal agent errors without transport labels by @shivamhwp in pingdotgg/t3code#11365
* fix(server): fall back when new worktrees are unavailable by @tris203 in pingdotgg/t3code#6208
* feat: badge background thread notifications on desktop and web by @Bil0000 in pingdotgg/t3code#11569
* feat(web): add compact thread list mode by @saphid in pingdotgg/t3code#9417


**Full Changelog**: pingdotgg/t3code@v0.0.41-nightly.20260913.1658...v0.0.41-nightly.20260913.1675

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.41-nightly.20260913.1675
faw01 pushed a commit to faw01/t3code that referenced this pull request Sep 14, 2026
AIdoesmyjob pushed a commit to AIdoesmyjob/t3code that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants