From 4e3b141d6d39ee76401862155ee30ae00240e98a Mon Sep 17 00:00:00 2001 From: debont80 Date: Tue, 30 Jun 2026 14:04:30 -0400 Subject: [PATCH] M19: Move sidebarCollapsed from localStorage to electron-store Sidebar collapsed state was an orphan in localStorage -- not backed up, lost on portable installs, and inconsistent with every other preference. Added sidebarCollapsed: boolean to the Settings type and DEFAULT_SETTINGS, wired it through applySettings' boolean branch, and updated the renderer store / main.tsx mock defaults. App.tsx now drives the toggle via updateSettings({ sidebarCollapsed }) instead of localStorage. typecheck + 242 tests + eslint green. Co-Authored-By: Claude Opus 4.8 --- CODE-AUDIT.md | 2 +- src/main/settings.ts | 2 ++ src/renderer/src/App.tsx | 11 ++--------- src/renderer/src/main.tsx | 1 + src/renderer/src/store/settings.ts | 1 + src/shared/ipc.ts | 2 ++ 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index 35588d9..937e288 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -277,7 +277,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n - [ ] **M18 — Audio "quality" presets hard-code MP3.** `QUALITY_OPTIONS.audio` labels ("Best (MP3)", "320 kbps") are shown even when `downloadOptions.audioFormat` is opus/flac/wav, so the label contradicts the actual output format; `--audio-quality` is also meaningless for lossless. -- [ ] **M19 — Sidebar-collapsed pref uses `localStorage`** while every other preference uses +- [x] **M19 — Sidebar-collapsed pref uses `localStorage`** while every other preference uses electron-store — won't back up/restore and is lost in the portable build across machines. - [ ] **M20 — ProgressBar / native `