diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 7dc90cc..a35b3fc 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,6 +3,7 @@ import {cookies} from 'next/headers'; import {Sora, Inter} from 'next/font/google'; import './globals.css'; import {getServerSession} from '@/features/auth/services/serverSession'; +import {tabSessionScript} from '@/features/auth/services/tabSession'; import { htmlThemeAttr, parseThemeMode, @@ -105,6 +106,16 @@ export default async function RootLayout({ suppressHydrationWarning > + {/* + FIRST child of , and that position is the whole point: it runs + before the markup below it is parsed, so a tab that inherited the + cookies without owning the session never paints the workspace. An + effect inside Providers would run after the first paint instead. + See services/tabSession.ts for what it does and why it fails open. + */} +