Skip to content

Old layout v1 missing open-folder button in SessionHeader due to isDesktopV2 gate regression and projectDirectory missing SDK fallback #32006

Closed as not planned

Description

@glz0514

Bug Description

The "open folder" / "open in file manager" button in the session header right-side controls is completely missing in the old layout (v1).

Root Cause 1 - JSX gate regression in SessionHeader

isDesktopV2 was converted to createMemo(...), but the JSX <Show> component still references it as when={isDesktopV2} (a function reference, always truthy) instead of calling it as when={isDesktopV2()}.

Buggy code:

<Show when={isDesktopV2} fallback={...old layout...}>

Fix:

<Show when={isDesktopV2()} fallback={...old layout...}>

Because the function reference is always truthy, the legacy fallback branch never renders.

Root Cause 2 - projectDirectory lacks SDK fallback

The projectDirectory memo only reads from params.dir:

const projectDirectory = createMemo(() => decode64(params.dir) ?? "");

When a local session does not have a dir route parameter, this returns empty and the button is hidden.

Fix:

const projectDirectory = createMemo(() => decode64(params.dir) ?? "");
const resolvedProjectDirectory = createMemo(() => projectDirectory() || sdk.directory || "");

Then use resolvedProjectDirectory() instead of projectDirectory() in:

  • project() lookup
  • name() display
  • openDir() function
  • copyPath() function
  • The Show condition for the button group

Environment

  • OpenCode Desktop v1.17.3 (also verified on v1.16.x)
  • Windows 11
  • Search box, file-tree, review buttons all render correctly - only the open-folder button is missing

Additional Context

This is separate from issue #29875 (V2 missing open-folder). The old layout has the button in its code but two regressions prevent it from rendering.

Both fixes were verified locally by patching the installed app.asar session bundle and confirmed working after restart.

Activity

  1. github-actions commented on Aug 12, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions