@devries-cameron20 / t3code-1 / commits / e628683936
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

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

shivam committed Sep 13, 2026 at 21:26 UTC e6286839369a29d829aee3c64dd64ce39c626d2f
1 file changed +4 -2
apps/web/src/routes/__root.tsx
+4 -2
@@ -9,6 +9,7 @@ import {
9 type ErrorComponentProps,
10 useLocation,
11 useNavigate,
12 + useRouter,
13 } from "@tanstack/react-router";
14 import { CheckIcon, CopyIcon } from "lucide-react";
15 import { useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
@@ -353,7 +354,8 @@ function HostedStaticEnvironmentBootstrap() {
354 return null;
355 }
356
356 -function RootRouteErrorView({ error, reset }: ErrorComponentProps) {
357 +function RootRouteErrorView({ error }: ErrorComponentProps) {
358 + const router = useRouter();
359 const message = errorMessage(error);
360 // Router pathname rather than window.location: desktop uses hash history, where the window path is always "/".
361 const pathname = useLocation({ select: (location) => location.pathname });
@@ -376,7 +378,7 @@ function RootRouteErrorView({ error, reset }: ErrorComponentProps) {
378 <p className="mt-2 text-sm leading-relaxed text-muted-foreground">{message}</p>
379
380 <div className="mt-5 flex flex-wrap gap-2">
379 - <Button size="sm" onClick={() => reset()}>
381 + <Button size="sm" onClick={() => void router.invalidate()}>
382 Try again
383 </Button>
384 <Button size="sm" variant="outline" onClick={() => window.location.reload()}>