From 24b1823a5d74089020f7bd3f4d1e6bc9dc0645d2 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Thu, 4 Jun 2026 20:04:54 +0100 Subject: [PATCH] fix(routes): add pre-hydration auth redirects to all protected pages Replaced slow $effect-based auth checks with synchronous IIFE scripts in that run during HTML parsing, before Svelte hydration. Covers: /today, /admin, /admin/schedule, /manage, /notifications (admin-only), and /account (auth-required). All redirect via window.location.replace() with no page flash. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- frontend/src/routes/account/+page.svelte | 10 ++++++++++ frontend/src/routes/admin/+page.svelte | 14 ++++++++++++++ frontend/src/routes/admin/schedule/+page.svelte | 14 ++++++++++++++ frontend/src/routes/manage/+page.svelte | 14 ++++++++++++++ frontend/src/routes/notifications/+page.svelte | 14 ++++++++++++++ frontend/src/routes/today/+page.svelte | 14 ++++++++++++++ 6 files changed, 80 insertions(+) diff --git a/frontend/src/routes/account/+page.svelte b/frontend/src/routes/account/+page.svelte index 7ad6d92..0827b08 100644 --- a/frontend/src/routes/account/+page.svelte +++ b/frontend/src/routes/account/+page.svelte @@ -766,6 +766,16 @@ +