From 9d257c995004a970c89cb75eed2751acda12dbd6 Mon Sep 17 00:00:00 2001 From: jay Date: Sun, 31 May 2026 17:08:58 +0000 Subject: [PATCH] Make dismissed reactive ($state) to clear the Svelte build warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dismissed.size is read in the template (the History 'Clear' control), so the Set must be $state for Svelte 5 to track .add()/reassignment. Build is warning-clean again. Frontend only — rebuild + refresh. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/routes/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 190fb36..9db47db 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -26,8 +26,8 @@ const BRIEF_VIEW_KEY = 'goodnews:brief_view'; // {date, items} — the reader's curated brief const HISTORY_CAP = 200; - let seenIds = new Set(); - let dismissed = new Set(); + let seenIds = new Set(); // handler-only, not rendered — no reactivity needed + let dismissed = $state(new Set()); // read in the template (Clear button) — must be reactive let history = $state([]); function persistSession() {