2026-03-03T11-58-36_auto_memory/memories.db-wal, memory/memories.db-wal, me
This commit is contained in:
parent
0eb08469dd
commit
e4a6323bf6
16
memory/2026-03-03-dashboard-tab-state-persistence-fix.md
Normal file
16
memory/2026-03-03-dashboard-tab-state-persistence-fix.md
Normal 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.
Loading…
x
Reference in New Issue
Block a user