Milestone v1.0: FamilySync MVP #1

Merged
luckberg merged 376 commits from gsd/v1.0-milestone into main 2026-06-10 17:39:19 -04:00
Showing only changes of commit 9f88068d77 - Show all commits
+8 -1
View File
@@ -28,7 +28,14 @@ import { useCalendarStore } from './store/calendarStore.js'
* Confirmed via Context7 /tanstack/query docs for v5.101.0.
*/
function onGlobalError(error: unknown): void {
if (error instanceof SessionExpiredError) {
// WR-05: instanceof can fail if client.ts is ever loaded through two module graphs
// (Vite SSR, duplicated chunk, or the tests' repeated `await import('./client.js')`),
// leaving the session-expiry interstitial unarmed. SessionExpiredError carries a fixed
// `name` for identity stability, so also check that defensively.
if (
error instanceof SessionExpiredError ||
(error as { name?: string } | null)?.name === 'SessionExpiredError'
) {
useCalendarStore.getState().setSessionExpired(true)
}
}