You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ui): ScaffaldLogo uses Math.random() for its gradient id, breaking hydration on every SSR page #582
ScaffaldLogo derives its SVG gradient id from Math.random(), so the server-rendered id never equals the client-rendered one. React discards the tree and re-renders the whole page on every load.
Uncaught Error: Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. packages/scf-core/assets/ScaffaldLogo.tsx (53:5) — <Svg …>, <Defs>, <LinearGradient id={gradientId}
The logo is in the app shell, so this fires on every SSR route, not just Profile.
Note
Likely related to #450 (public pages non-interactive on first load) — a discarded hydration tree loses the server-attached handlers until the client re-render completes.
Acceptance
gradientId uses React's useId() (stable across server and client).
/profile loads with no hydration error in the console.
Repo-wide check: no Math.random() or Date.now() in a render path of an SSR'd component.
Activity
thinkclay commentedon Aug 12, 2026
Part of the profile-building audit rollup: #594
fix(ui): repair hydration and the frozen experience total (#582, #590) (
fix(ssr): the logo's gradient id named its tree position, not its gra…