From 49f94f9ee158ce5214f89adafef36a424588dd6d Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 11 Aug 2026 21:46:50 -0400 Subject: [PATCH] fix: mount ModeWatcher and Toaster at the root layout The reader and login pages use +layout@ breakouts to escape the (root) shell, so anything mounted in (root)/+layout.svelte never reaches them. ModeWatcher was mounted there and duplicated in login/+layout@.svelte, which left the reader's theme toggle inert: it flipped the store but nothing wrote .dark onto . Mount both once at the top-level +layout.svelte instead, which every route inherits regardless of breakouts. --- frontend/src/routes/(root)/+layout.svelte | 4 ---- frontend/src/routes/+layout.svelte | 10 ++++++++++ frontend/src/routes/login/+layout@.svelte | 4 ---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/routes/(root)/+layout.svelte b/frontend/src/routes/(root)/+layout.svelte index 6e7a831..dd34fd2 100644 --- a/frontend/src/routes/(root)/+layout.svelte +++ b/frontend/src/routes/(root)/+layout.svelte @@ -11,9 +11,7 @@ import { setThemeState } from '$lib/theme/theme.svelte'; import type { ThemeConfig } from '$lib/theme/presets'; - import { ModeWatcher } from 'mode-watcher'; import { untrack, type Snippet } from 'svelte'; - import { Toaster } from 'svelte-sonner'; let { data, @@ -40,8 +38,6 @@ }); - -
diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 1cbf3fe..4e5d13d 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -1,6 +1,8 @@ @@ -9,6 +11,14 @@ + + + +
diff --git a/frontend/src/routes/login/+layout@.svelte b/frontend/src/routes/login/+layout@.svelte index 376b8d7..5d2becf 100644 --- a/frontend/src/routes/login/+layout@.svelte +++ b/frontend/src/routes/login/+layout@.svelte @@ -1,8 +1,6 @@