diff --git a/client/src/App.tsx b/client/src/App.tsx index 1eeeaefe8..1eaeedbcb 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -402,13 +402,18 @@ export default function App() { || location.pathname.startsWith('/register') || location.pathname.startsWith('/forgot-password') || location.pathname.startsWith('/reset-password') + // Anonymous visitor routes: no session, so authenticated-only widgets (system + // notices, background tasks, save-to-collection) have nothing to do here and + // would otherwise fire a doomed authenticated request on mount. + const isPublicVisitorPage = isSharedPage || location.pathname.startsWith('/public/journey/') + const hideAuthedWidgets = isAuthPage || isPublicVisitorPage return ( - {!isAuthPage && } + {!hideAuthedWidgets && } - {!isAuthPage && } - {!isAuthPage && (isPhone ? : )} + {!hideAuthedWidgets && } + {!hideAuthedWidgets && (isPhone ? : )} {/* One boundary for all route chunks, above so it stays mounted across navigations. react-router runs location updates inside a transition,