Skip to content

fix(desktop): preserve workspace activity visibility across reloads - #10036

Merged
Kitenite merged 1 commit into
mainfrom
fix-workspace-activity-7e2aa5ab
Nov 20, 2026
Merged

Kitenite merged 1 commit into
mainfrom
fix-workspace-activity-7e2aa5ab

Conversation

@Kitenite

@Kitenite Kitenite commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

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, 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.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • New Features
    • Activity panel visibility is now saved per workspace and restored when you reopen it.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • 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.

Share

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@Kitenite
Kitenite merged commit 1cd2225 into main Nov 20, 2026
18 of 19 checks passed

This branch was previously deployed

1 inactive deployment
preview — 7308ebb2 Deployed Nov 20, 2026 by Kitenite via Cleanup Preview Resources #5838
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant