2026-03-03T11-58-36_auto_memory/memories.db-wal, memory/memories.db-wal, me

This commit is contained in:
Nicholai Vogel 2026-03-03 04:58:36 -07:00
parent 0eb08469dd
commit e4a6323bf6
2 changed files with 16 additions and 0 deletions

View File

@ -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.

Binary file not shown.