Repository navigation
Description
Describe the bug
In the desktop app's new layout design (newLayoutDesigns enabled), the advanced settings toggles for File tree, Command palette, Terminal, and Server status (Settings → General → Advanced) have no visible effect. Enabling them does not make the corresponding buttons appear in the titlebar.
Steps to reproduce
- Open the OpenCode desktop app
- Open Settings → General
- Enable New layout designs (if not already on)
- Scroll to the Advanced section
- Toggle on File tree, Command palette, Terminal, or Server status
Expected: The corresponding icon buttons appear in the titlebar's right-hand area.
Actual: Nothing changes — no buttons appear regardless of toggle state.
Root cause
Commit e1581183f ("feat(app): allow toggling tabs layout") changed isDesktopV2 in packages/app/src/components/session/session-header.tsx from a plain boolean constant to a reactive createMemo():
// Before (boolean constant — using it directly in JSX was correct)
const isDesktopV2 = platform.platform === "desktop" && USE_V2_TITLEBAR
// After (reactive memo — must be called as isDesktopV2() in JSX)
const isDesktopV2 = createMemo(() => platform.platform === "desktop" && settings.general.newLayoutDesigns())The commit correctly updated the search, tree, term, and status memos to call isDesktopV2(), but missed updating the <Show> gate in the JSX:
// Bug: passes the memo function reference (always truthy!) instead of its value
<Show when={isDesktopV2} fallback={<OldLayoutButtons />}>
<SessionHeaderV2Actions />
</Show>Because a non-null function reference is always truthy in JavaScript, \<SessionHeaderV2Actions\> is rendered unconditionally — the fallback containing the old layout buttons (which the settings control) is never shown.
A secondary issue is that SessionHeaderV2Actions itself had no code to render search, file-tree, or terminal buttons even when their settings are enabled, so those toggles were wired up to memos that were never consumed in the V2 path.
Possible fixes
- JSX fix (required): Change
when={isDesktopV2}towhen={isDesktopV2()}on the<Show>component so the branch is evaluated reactively. - V2 actions fix (required for full feature parity): Extend
SessionHeaderV2ActionsStateandSessionHeaderV2Actionsto render compact icon buttons for search/terminal/file-tree when their respective settings aretrue, and addterminalandfile-treeicons to the V2 icon sprite (packages/ui/src/v2/components/icon.tsx).
Environment
- Desktop app (new layout designs active)
- Regression introduced in commit
e1581183f(PR feat(app): allow toggling tabs layout #29526 "feat(app): allow toggling tabs layout")
Activity
criticalcognition commentedon May 30, 2026
CC @Brendonovich
ldiebold commentedon May 30, 2026
I'm experiencing the same bug on the "old" layout for 1.15.12.
Also missing the "open in editor" button.
Eric-Guo commentedon May 30, 2026
Confirm same on windows side, I'm missing the "open in editor" button.
sspilleman commentedon May 30, 2026
Confirm same on macOS side, I'm missing the "open in editor" button.
glz0514 commentedon Jun 5, 2026
I reproduced this on Windows Desktop and found the old-layout regression root cause:
isDesktopV2was converted tocreateMemo(...), but the JSX gate inSessionHeaderstill useswhen={isDesktopV2}instead ofwhen={isDesktopV2()}.Because a function reference is always truthy, the legacy fallback branch never renders, which hides the old-layout right-side toolbar buttons (including the open-folder / open-in-file-manager control).
Minimal fix:
I verified this locally in a desktop build and it restores the old-layout buttons.
This looks separate from the V2 parity issue tracked in #29875.
github-actions commentedon Aug 5, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.