a16c41e739
Root cause: useDashboardLayout initialised React state with createDefaultDashboardLayout() (1 widget), so the wrong default rendered during the ~100–500ms window while React Query fetched the user session and DB layout after login. On reload within staleTime the cache hit resolved instantly, masking the bug. Fix: add isHydrated boolean state that becomes true only once localStorage OR DB hydration has settled; DashboardClient renders a GridLayoutSkeleton until then. Also adds router.refresh() in the sign-in handler to bust the Next.js Router Cache so the post-login navigation always lands on a fresh server component tree. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>