diff --git a/apps/pwa/src/components/CalendarShell.tsx b/apps/pwa/src/components/CalendarShell.tsx index 3e92240..e6500fb 100644 --- a/apps/pwa/src/components/CalendarShell.tsx +++ b/apps/pwa/src/components/CalendarShell.tsx @@ -59,8 +59,12 @@ import { InstallPrompt } from './InstallPrompt.js' // ── Helpers ──────────────────────────────────────────────────────────────── /** - * D-05: phone (≤767px) defaults to 'month-agenda'; tablet/desktop to 'month-grid'. - * Called once at render time; Schedule-X persists selected view internally after that. + * IN-02: this does NOT compute the D-05 phone/desktop default — that lives in the + * store's readPersistedView() (calendarStore.ts), which seeds selectedView with the + * breakpoint-aware default. By the time this runs, `persistedView` already carries that + * resolved default. The ONLY job here is the SSR guard: return a stable 'month-grid' + * when `window` is undefined (no breakpoint to read), otherwise pass the already-resolved + * view through unchanged. Do not expect breakpoint logic here. */ function resolveDefaultView(persistedView: string): string { if (typeof window === 'undefined') return 'month-grid'