Skip to content

fix(app): clear the traffic lights and gate sidebar toggling behind a beta setting - #56930

Open
opencode-agent[bot] wants to merge 1 commit into
devfrom
sidebar-toggle-beta-flag
Open

opencode-agent[bot] wants to merge 1 commit into
devfrom
sidebar-toggle-beta-flag

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Two follow-ups to #55646 on beta.

Traffic light spacing. With the vertical tabs sidebar collapsed on macOS, the floating toggle started exactly at the 68px base width of the traffic lights. Newer macOS draws them wider (about 74px), so the toggle sat right against the green light. The collapsed toggle now lays out as if the traffic lights were the header's first control: it starts 16px past them, which is where the horizontal titlebar puts its first control. The header contents shift with it through CollapsedSidebarToggleSpace.

Beta-only setting, off by default. Sidebar toggling now sits behind Settings → Experimental → Sidebar toggle:

  • The row appears (and is searchable) in every build except prod, which hides it and ignores any stored value.
  • When it's off, the sidebar is always open, even if sidebarOpen: false was stored earlier. The titlebar/sidebar/collapsed toggle buttons are hidden and sidebar.toggle (mod+shift+b, View menu) is not registered.
  • A new useSidebar() hook in shell/sidebar-toggle.tsx owns that gating, so shell, titlebar and toggle all read the same effective open().

Tests

  • tabs.spec.ts: the collapsed-sidebar cases now enable the setting, and a new case checks that a stored closed sidebar stays open with no toggle or shortcut while the setting is off. The new case fails on the current beta.
  • tsc -b and src/settings unit tests pass.
  • I haven't checked the macOS pixel spacing in the native app. The offset change comes from the numbers above.

Requested by: @Brendonovich (Brendan via Slack)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant