You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(desktop): preserve workspace activity visibility across reloads - #10036
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, and git diff --check passed.
Checklist
PR title follows conventional commits (type(scope): subject)
bun run lint and bun run typecheck pass (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 hidden map and setHidden action from activityPanelStore.
Added activityPanelHidden to the workspace local state schema.
Moved reads/writes behind a new useActivityPanelVisibility hook.
Written for commit 7308ebb. Summary will update on new commits.
Summary by CodeRabbit
New Features
Activity panel visibility is now saved per workspace and restored when you reopen it.
The docked activity panel’s per-workspace visibility now uses activityPanelHidden in workspace-local collection state. A new hook reads and updates that value, and the menu and aside use the hook. The activity panel store retains fit state but no longer owns hidden state.
Changes: Workspace Activity Panel Visibility
Layer / File(s)
Summary
Workspace-local visibility state apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/..., apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/components/WorkspaceActivityMenu/hooks/useActivityPanelVisibility/*
The workspace-local schema adds the optional activityPanelHidden field. The hook reads the field with fallbacks and updates it; if no local-state entry exists, it first ensures the workspace is in the sidebar. A persistence test checks values after reopening and after deleting a workspace row.
Use the hook in activity panel components apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/components/WorkspaceActivityMenu/...
The menu and aside use the hook for visibility state. The activity panel store no longer holds hidden state or provides setHidden; the corresponding store test is removed.
Issue 9417 reports that the activity panel reopens in new workspaces and after restart because its hidden state is held in memory. This PR persists the per-workspace visibility value; it does not add a global setting or an automatic-show option.
Possibly related PRs
ParadevAI/Paradev#9771: This PR addresses the same visibility-persistence behavior, using a separate persisted hidden value instead of the workspace-local state field used here.
ParadevAI/Paradev#8975: This PR adds the docked activity-panel toggle and ActivityPanelAside path that this change updates to use persisted visibility state.
Suggested reviewers:harshithmullapudi
Merge Risk: Minimal · up to 7308e
The activity panel's hidden or shown choice is now saved per workspace and survives reloads and restarts. No concrete defect was found in the change. The persistence test covers reopening both choices and deleting a workspace row.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
activityPanelHiddenon 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
bun run typecheck, Biome checks for changed files, andgit diff --checkpassed.Checklist
type(scope): subject)bun run lintandbun run typecheckpass (desktop typecheck and targeted Biome checks passed; full repository checks left to CI)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.
hiddenmap andsetHiddenaction fromactivityPanelStore.activityPanelHiddento the workspace local state schema.useActivityPanelVisibilityhook.Written for commit 7308ebb. Summary will update on new commits.
Summary by CodeRabbit