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} to when={isDesktopV2()} on the <Show> component so the branch is evaluated reactively.
- V2 actions fix (required for full feature parity): Extend
SessionHeaderV2ActionsState and SessionHeaderV2Actions to render compact icon buttons for search/terminal/file-tree when their respective settings are true, and add terminal and file-tree icons to the V2 icon sprite (packages/ui/src/v2/components/icon.tsx).
Environment
Describe the bug
In the desktop app's new layout design (
newLayoutDesignsenabled), 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
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") changedisDesktopV2inpackages/app/src/components/session/session-header.tsxfrom a plain boolean constant to a reactivecreateMemo():The commit correctly updated the
search,tree,term, andstatusmemos to callisDesktopV2(), but missed updating the<Show>gate in the JSX: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
SessionHeaderV2Actionsitself 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
when={isDesktopV2}towhen={isDesktopV2()}on the<Show>component so the branch is evaluated reactively.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
e1581183f(PR feat(app): allow toggling tabs layout #29526 "feat(app): allow toggling tabs layout")