diff --git a/scripts/smoke-test.mjs b/scripts/smoke-test.mjs index 6b3df11..aefe887 100755 --- a/scripts/smoke-test.mjs +++ b/scripts/smoke-test.mjs @@ -148,6 +148,10 @@ const ROUTES = [ '/card', '/card/npub1yrnuj56rnen08zp2h9h7p74ghgjx6ma39spmpj6w9hzxywutevsst7k5cx', '/verify/notarealnaddr', + '/shop/abc/def', + '/spot/abc/def', + '/event/abc/def', + '/crew/abc/def', '/messages/group/abc123', ]; const problems = []; diff --git a/src/components/RouteErrorBoundary.tsx b/src/components/RouteErrorBoundary.tsx index b145630..322ad0e 100644 --- a/src/components/RouteErrorBoundary.tsx +++ b/src/components/RouteErrorBoundary.tsx @@ -16,6 +16,15 @@ import { ErrorBoundary } from '@/components/ErrorBoundary'; export function RouteErrorBoundary({ children }: { children: React.ReactNode }) { const location = useLocation(); + // After a deploy an already-open tab can hold a stale module graph, so a lazy + // route import 404s. `lazyWithRetry` reloads once; if it still fails the + // boundary is shown — so give the user a real way out: clear the "already + // reloaded" flag and do a fresh reload (fetching the new index + chunks). + const hardReload = () => { + try { sessionStorage.removeItem('skatespots:chunk-reload'); } catch { /* ignore */ } + window.location.reload(); + }; + return (

Something on this screen tripped up. Your account and data are safe. - Head back and try again. + Usually a quick reload sorts it out.

- +
+ + +
}