Skip to content

feat(app): add a sidebar toggle for vertical tabs - #55646

Merged
opencode-agent[bot] merged 2 commits into
betafrom
sidebar-toggle
Oct 17, 2026
Merged

opencode-agent[bot] merged 2 commits into
betafrom
sidebar-toggle

Conversation

@Brendonovich

@Brendonovich Brendonovich commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

In vertical tabs mode, the sidebar can now be collapsed and reopened.

  • A new sidebar.toggle command (mod+shift+b) and toggle button open and close the vertical tabs sidebar. The state is saved as appearance.sidebarOpen and defaults to open.
  • The sidebar animates its width only on open and close. Drag-resizing still follows the pointer, and the resize handle is hidden while the sidebar is collapsed.
  • On macOS and Linux, the toggle sits at the end of the sidebar's header row. When the sidebar is closed, it slides in at the top start of the content area on every screen (Home, new session, settings, and sessions), leaving room for the macOS traffic lights at the current zoom. Headers that start at that edge (the session header, Home's Projects row below lg, and the narrow settings nav) reserve its space and slide their contents along with it.
  • On Windows, the titlebar stays visible in vertical tabs mode, so the toggle goes in the titlebar instead.
  • When there are no traffic lights or channel badge, the sidebar's header row holds Home, so the row is never left empty.

Before / After

Desktop web, 1280×720, vertical tabs.

Before After
Sidebar open Vertical tabs sidebar without a toggle Vertical tabs sidebar with a toggle in its header
Sidebar collapsed New state Collapsed sidebar with the toggle in the session header

Testing

  • packages/app: bun typecheck
  • packages/app: e2e/regression/tabs.spec.ts (new case: the collapsed sidebar reopens from Home, new session, settings, and a session), plus the home, settings, session-header, and new-session suites

Added by the opencode bot (AI-generated).

Related: #55536

@Brendonovich
Brendonovich requested a review from Hona as a code owner October 15, 2026 07:50

@opencode-agent opencode-agent 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.

I've only reviewed the code and type-checked it. bun typecheck passes in packages/app, but I couldn't run the app here (no browser or desktop build), so before/after screenshots or a short video of open and close on macOS and Windows would help.

Public API: unchanged. The change adds an app-local persisted setting, appearance.sidebarOpen (optional, defaults to open), and a sidebar.toggle command (mod+shift+b). Neither touches the SDK, the server, the plugin API or the CLI.

Concerns:

  • No way to reopen the sidebar outside sessions (macOS, Linux, web). The only on-screen toggle for a closed sidebar is the session header slot. Home, the new-session draft screen, Settings and session views without a header have none, so mouse users are left with only the shortcut or the command palette. On macOS the traffic lights also land on those screens' content. See the inline comment.
  • The View → Toggle Sidebar menu item (desktop-menu.ts, #55536) now works in vertical tabs mode. In the default horizontal layout it still does nothing, because the command is only registered when verticalTabs() is true.

Related: #55536

mac() ? macTrafficLightsBaseWidth / (platform.webviewZoom?.() ?? 1) - sessionHeaderStart + slotWidth : slotWidth

return (
<Show when={desktop() && !windows() && settings.appearance.tabLayout() === "vertical"}>

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.

This slot only renders through SessionTitleHeader, so it only shows on session views that have a header. On /, /settings and /new-session, and on session views with hideHeader or no title, a closed sidebar has no visible toggle on macOS, Linux or web; only mod+shift+b or the command palette brings it back. On macOS, closing the sidebar also takes away the traffic-light clearance on those screens. Could the closed-state toggle (and the traffic-light inset) live somewhere route-independent, e.g. the shell's main pane, rather than in the session header?

@opencode-agent
opencode-agent Bot changed the base branch from dev to beta October 17, 2026 01:36
@opencode-agent
opencode-agent Bot merged commit 7a636bb into beta Oct 17, 2026
23 checks passed
@opencode-agent
opencode-agent Bot deleted the sidebar-toggle branch October 17, 2026 01:39
@amrkmn amrkmn mentioned this pull request Oct 27, 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