fix(desktop): preserve workspace activity visibility across reloads
What & why
Switching layouts reloads the renderer, which discarded the in-memory workspace activity visibility choices and reopened hidden panels in every workspace. Reloading or restarting the app had the same effect.
Store activityPanelHidden on the existing workspace UI state row and remove the transient store's visibility map. Hidden panels stay hidden and shown panels stay shown across layout changes and app restarts. The preference follows the existing workspace row's persistence and deletion lifecycle; no new storage key is added. Responsive panel sizing remains unchanged.
How I tested it
- Reproduced the original layout-switch reset in the running desktop app via CDP.
- Verified two workspaces with opposite choices across layout switches and a full Electron restart: hidden stays hidden, shown stays shown.
- Verified sidebar width changes do not reopen an explicitly hidden panel.
- Added a regression test for saving/reopening both choices and deleting a workspace row.
- 71 focused tests passed, including collection persistence, schema, activity store, and persisted-key checks.
- Desktop
bun run typecheck, Biome checks for changed files, andgit diff --checkpassed.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (desktop typecheck and targeted Biome checks passed; full repository checks left to CI) - "Allow edits from maintainers" is checked on fork PRs (same-repository PR)
- I have signed the CLA (the bot asks on your first PR)
Summary by cubic
Fixes workspace activity panel visibility being forgotten on layout switch, reload, or app restart by persisting it in the workspace's local UI state row instead of a transient in-memory store.
Hidden and shown panels now keep their state across renderer reloads. The preference lives on the existing workspace row, so it follows the row's persistence and deletion lifecycle with no new storage key.
- Removed the
hiddenmap andsetHiddenaction fromactivityPanelStore. - Added
activityPanelHiddento the workspace local state schema. - Moved reads/writes behind a new
useActivityPanelVisibilityhook.
Summary by CodeRabbit
- New Features
- Activity panel visibility is now saved per workspace and restored when you reopen it.