fix(onboarding): isolate cached routing state per request (#459)

This commit is contained in:
Ben Senescu 2026-08-06 12:24:31 -04:00 committed by GitHub
parent 8a728563d4
commit 189d5bfa1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,10 @@ const clampStep = (step: number) =>
Math.min(Math.max(0, Math.trunc(step)), ONBOARDING_LAST_STEP); Math.min(Math.max(0, Math.trunc(step)), ONBOARDING_LAST_STEP);
export const Route = createFileRoute("/_authenticated/onboarding/")({ export const Route = createFileRoute("/_authenticated/onboarding/")({
// The app renders inside ClientOnly, and this guard reads account-scoped data
// through a module-scoped query client. Keep it out of server requests so one
// worker isolate cannot reuse another account's cached onboarding state.
ssr: false,
// Step lives in the URL so it survives refresh and works with back/forward. // Step lives in the URL so it survives refresh and works with back/forward.
validateSearch: (search: Record<string, unknown>): { step: number } => { validateSearch: (search: Record<string, unknown>): { step: number } => {
const raw = Number(search.step); const raw = Number(search.step);