Hydration mismatch on /login (lazy route SSR) in apps/backoffice #27
Labels
No labels
bug
enhancement
pr-split
question
security
transaction-matcher
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
momsse/octant#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
React hydration mismatch on the backoffice
/loginroute: the server-rendered HTML does not match the client tree, so React discards and regenerates the subtree on the client.Observed in
apps/backofficerunningpnpm dev(Vite + TanStack Start SSR, React 19), when loadinghttp://localhost:3000/login.Console error
The diff points at the
LoginPageboundary: the client renders<main>while the server emitted a<Suspense>placeholder — i.e. the lazy route component is resolved on the client but was still suspended/fallback during SSR.Steps to reproduce
pnpm --filter @octant/backoffice devhttp://localhost:3000/loginSuspected cause
TanStack Start SSR renders the lazy-loaded route component inside a
<Suspense>boundary; the server emits the fallback while the client resolves the real component, producing a structural mismatch on hydration. Likely affects other lazy routes too, not just/login.Scope / notes
split/13-backoffice) branch.routes/(auth)/login.tsxandroutes/__root.tsxare unchanged by recent review fixes, so this appears to be a scaffold-level SSR/lazy-route issue rather than a regression from those fixes.Environment
apps/backoffice— TanStack Start (SSR), React 19, Vite 7 (vite dev)