Skip to content

desktop: Add project picker cannot enter nested subfolders of a directory #60735

Open

Description

@dimontchg

Summary

In the OpenCode Desktop app, the "Add project" / "Open project" picker does not
allow entering a nested subfolder of a selected directory. Clicking a subfolder
does not open it, so nested folders cannot be added as session locations.
Additionally, sessions created programmatically inside a subfolder were not
accessible from the Desktop UI either. The server-level location mechanism
works correctly, so this appears to be a desktop UI issue.

Environment

  • opencode version: 2.2.4 (Desktop GUI; CLI 2.2.4)
  • OS: Windows 10 (10.0.19045, x64)
  • Terminal: Unavailable (GUI desktop app, no terminal env vars set)
  • Shell: cmd.exe (COMSPEC)
  • Install/channel: latest
  • Active plugins: none found in config

Reproduction

  1. Open OpenCode Desktop on Windows.
  2. Click "Add project" / "Open project" and select a directory that contains
    subfolders (e.g. a workspace root with video, transcription folders).
  3. Try to enter one of the subfolders in the picker.

Expected Behavior

The picker opens the subfolder and a nested project location can be created.

Actual Behavior

The subfolder does not open; only the originally selected root level is usable.
Sessions created programmatically in a subfolder (via POST /api/session with a
location.directory body) were not accessible from the Desktop UI either: the
user could not open or add these two subfolder sessions while they existed,
even though the session list was refreshed.

Additional Context

  • Reproduces consistently on this setup.
  • The server API supports nested locations fine (verified via opencode api:
    GET /api/location?location[directory]=... resolves the subfolder correctly,
    and POST /api/session with a location.directory body creates a session
    with the right subpath), which points to the desktop picker / session list
    UI as the culprit.
  • Possibly related to open issue Open project picker is hard to use #38338 ("Open project picker is hard to use").

Activity

  1. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report. I couldn't reproduce this here: it needs OpenCode Desktop on Windows, and this sandbox only runs Linux.

    One thing that may help narrow it down: when Desktop uses its built-in local server, Add project opens Windows' own folder dialog, not OpenCode's in-app folder tree. Could you tell us:

    • Is the window where you can't open the subfolder the standard Windows "Select Folder" dialog, or OpenCode's own dialog with a search box and a folder tree? A screenshot would be ideal.
    • If you select the subfolder directly (e.g. type its full path into the dialog's folder field and confirm), what happens? Does nothing get added, or does it open the parent project instead?
    • Is the parent folder a git repository?

    A maintainer with a Windows setup will need to look at this. Possibly related:

  2. hellvyn commented on Oct 31, 2026

    @hellvyn

    Tried this on Windows 11 (build 26300), running OpenCode Desktop from source (dev @ 956e41f, v2.2.5) with the built-in local server.

    • "Add project" opens the standard Windows "Select Folder" dialog (titled "Open project"), not an in-app tree.
    • Double-clicking subfolders enters them as usual; I went four levels deep.
    • "Select Folder" on the nested folder adds a project. For a folder inside a git repo, it is listed under the repo name rather than the subfolder name. I did not create a session.

    I could not reproduce "subfolder does not open" on 2.2.5 / Windows 11. @dimontchg is yours the native Windows dialog, or an in-app folder tree (e.g. connected to a remote/WSL server)? The report was on 2.2.4 / Windows 10, so that may matter.

  3. dimontchg commented on Oct 31, 2026

    @dimontchg
    Author

    Answers to the questions above (@opencodejr, @hellvyn):

    1. Dialog type: It is the standard Windows "Select Folder" dialog
      (built-in local server, no remote/WSL connection).

    2. What actually fails: Navigating subfolders in the Windows dialog works
      fine. The failure happens after pressing "Select Folder": the selected
      subfolder never appears in OpenCode's project list. The sidebar keeps
      showing only the already-added parent project, and retrying "Add project"
      with the same subfolder changes nothing.

    3. Git: Yes, the parent folder is a git repository; the subfolders I want
      to add live inside it.

    So this looks closer to #51191 than to a picker-navigation problem: the
    native-dialog selection itself works, but the app seems to resolve the picked
    subfolder to the git repo root — and since the root is already an added
    project, nothing visibly changes in the UI.

    Extra data point (v2.2.4): via the CLI API, GET /api/location?location[directory]=...
    does resolve the subfolder correctly (project root + correct relative subpath),
    so server-side resolution looks fine; the collapse to the repo root seems to
    happen in the desktop "add project" flow.

    Note: the current stable desktop release available to us is still 2.2.4, so I
    could not re-check against the 2.2.5 build mentioned above.

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

Metadata

Metadata

Assignees

No one assigned

    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