fix: keep restored mobile drawer closed

This commit is contained in:
Justin Skowyra
2026-09-02 23:26:04 +08:00
committed by Menghuan1918
parent 41da8cb101
commit 2d2e8534a5
4 changed files with 115 additions and 9 deletions
+2 -2
View File
@@ -306,8 +306,8 @@ describe('side card preferences', () => {
}
try {
const store = createSidebarStore()
// The narrow viewport keeps a fresh session collapsed for the FIRST
// seeding only (a later user expansion persists).
// The narrow viewport keeps a fresh session collapsed. Persisted
// sessions follow the same load-time visibility rule in state.spec.ts.
store.setSession('narrow-fresh')
expect(store.getSnapshot().state?.panelOpen).toBe(false)
// The width seeding still follows the window (clamped to the floor).