TanStack Query errored queries (staleTime: Infinity) are always stale — each new observer subscription triggers a refetch regardless of retry:false. RouteGuard mounting children on 401 caused continuous re-subscribe churn (616+ requests in 15s confirmed by design-loop repro 2026-05-31). Fix: on 401 in production, render NoAccessScreen variant="session" instead of mounting the app subtree. Dev without Caddy keeps the passthrough (process.env.NODE_ENV !== "production") so local next dev still works. Also adds NoAccessScreen "session" variant (title: Сессия истекла, subtitle: Обновите страницу, чтобы войти снова). |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .dockerignore | ||
| Dockerfile | ||
| next.config.ts | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||