Skip to content

feat(app): add setting to keep the side panel across sessions - #64950

Merged
neriousy merged 7 commits into
devfrom
shared-side-panel
Nov 19, 2026
Merged

neriousy merged 7 commits into
devfrom
shared-side-panel

Conversation

@neriousy

@neriousy neriousy commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

No issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a "Keep side panel open across sessions" setting under Settings > Preferences > General. It's off by default.

Today each session tab remembers whether its own side panel is open, and a tab with nothing saved opens with the panel closed. So when you switch to another session, the panel often closes. With the setting on, all session tabs share one open/closed state: opening or closing the panel in one session does the same in every other session. The panel width and the bottom pane stay per tab.

The change is in tabs.region / setRegion in shell/tabs/tabs.tsx. Every reader and writer of the side region goes through these: the session screen, the plugin host's side APIs and the close-tab guard. With the setting on, the side region reads and writes one shared flag, persisted under tabs.panes.shared, instead of the tab's own entry. With the setting off, nothing changes.

No feature flag: the setting itself is opt-in and off by default.

How did you verify your code works?

  • bun typecheck and bun run test:unit in packages/app pass.
  • Ran the app against a dev server with the setting on. Opened the side panel in one session, switched to another session (the panel stayed open), then switched back (still open).

Screenshots / recordings

The new setting:

Keep side panel open across sessions setting

With the setting on, open the side panel in one session:

Side panel open in the first session

Switch to another session and the panel is still open:

Side panel still open after switching sessions

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #62876

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks sound. All side-region reads and writes go through the four tabs accessors, so the shared entry applies to the session screen, the plugin host and the close-tab guard alike. The bottom pane and split ratio stay per tab, and with the setting off nothing changes. I couldn't run the app here (no browser in this environment), so I checked by reading every caller and running type checks (tsc -b passes) and the src/shell/tabs and src/settings unit tests (255 pass). A throwaway round-trip test also confirmed the shared entry is still saved with side as review.

Public API: unchanged. The PR adds only a local app setting (general.sharedSidePanel) and a new window storage key (tabs.panes.shared).

One behaviour to confirm is intended: the plugin host closes the side region when the last panel tab in a session is closed (host-apis.tsx, the closeAt close and the panel.closed effect of transitionSideRegion). With the setting on, closing the last panel tab in one session hides the side panel in every other session too, including sessions that still have panel tabs open.

Since I couldn't run the UI, could you attach before/after screenshots or a short recording of the setting in Settings > General and of the side panel staying open when you switch sessions?

Related: #62876

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit only adds blank lines for lint, so behaviour is unchanged. The before/after screenshots I asked for are now in the description. Public API is still unchanged. Nothing new to raise.

@neriousy
neriousy merged commit 83f9021 into dev Nov 19, 2026
10 checks passed
@neriousy
neriousy deleted the shared-side-panel branch November 19, 2026 19:05
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
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