diff --git a/memory/2026-03-03-dashboard-tab-state-persistence-fix.md b/memory/2026-03-03-dashboard-tab-state-persistence-fix.md new file mode 100644 index 000000000..e25270e78 --- /dev/null +++ b/memory/2026-03-03-dashboard-tab-state-persistence-fix.md @@ -0,0 +1,16 @@ +# 2026-03-03 Session Notes + +## Dashboard Tab State Persistence Fix + +Implemented persistent tab state for the Signet dashboard by syncing the active tab to `location.hash`. Previously, refreshing the page would always drop the user back to the config tab because navigation state was purely in-memory. + +The implementation added hash-based persistence with three key changes: +1. Modified `navigation.svelte.ts` to read initial tab from `location.hash` on module init (browser only) +2. Updated `setTab()` to call `history.replaceState()` after state changes, updating the hash without polluting browser history +3. Exported `initNavFromHash()` function that sets up a `hashchange` event listener for back/forward navigation + +The solution uses `replaceState` instead of `pushState` to avoid creating history entries for tab switches—this prevents the annoying behavior of clicking through tabs then hitting back repeatedly. + +Validation is handled via a `VALID_TABS` set containing all valid tab IDs. Invalid hashes fall back to the default config tab. + +Implementation was verified with manual testing: tab state persists on refresh, direct hash navigation works, and unsaved changes warnings still fire when switching tabs. \ No newline at end of file diff --git a/memory/memories.db b/memory/memories.db index 20d523873..8aa448b1f 100644 Binary files a/memory/memories.db and b/memory/memories.db differ