Skip to content

desktop: file tree toggle is disabled and the tree can't be opened from the UI #59047

Closed as duplicate

Description

@rodrigoborquez

Summary

The desktop/web file tree cannot be opened from the UI. Its toggle button
(Mostrar u ocultar árbol de archivos / Toggle File Tree) renders with
disabled: true, and no command for it appears in the command palette, so the
tree is unreachable even though it renders correctly when the persisted layout
state is set manually.

Environment

  • opencode version: 2.1.4 (desktop app and CLI both report v2.1.4)
  • OS: Windows_NT 10.0.26200 (win32 x64)
  • Terminal: Unavailable: desktop app, no terminal context
  • Shell: C:\WINDOWS\system32\cmd.exe
  • Install/channel: OpenCode Desktop for Windows x64, channel: latest (updater
    source https://opencode.ai/update/api/latest/desktop/opencode/)
  • Active plugins: none ("plugins": [] in ~/.config/opencode/opencode.json)

Reproduction

  1. Open OpenCode Desktop 2.1.4 on Windows x64 and open any session (reproduced
    with both a git repository and a non-git project directory).
  2. Make sure the Revisión / Review dock panel is open.
  3. Look at the panel's sidebar toggle:
    button.session-review-v2-sidebar-toggle with
    aria-label="Mostrar u ocultar árbol de archivos".
  4. Open the command palette and search for árbol / file tree.
  5. Check [data-component="file-tree-v2"].

Expected Behavior

The toggle button is enabled, clicking it reveals the project file tree
(Todos los archivos / All files tab), and the same action is available from
the command palette (the command.fileTree.toggle string and the
desktop.menu.toggleFileTree menu item both exist in the bundle).

Actual Behavior

  • The toggle button is rendered disabled === true, so it cannot be clicked.
  • Search in the command palette for árbol / file tree returns nothing.
  • [data-component="file-tree-v2"] exists in the DOM but has
    height === 0 and empty text, i.e. the tree never renders.
  • The persisted layout stays at
    "fileTree":{"opened":false,"width":200,"tab":"changes"} with no way to flip
    it from the UI.

Additional Context

The tree itself works: writing the state directly makes it render with the full
project listing.

Before (persisted layout, %APPDATA%\ai.opencode.desktop\drafts.sqlite,
state table, opencode.global.dat / layout):

"fileTree": { "opened": false, "width": 200, "tab": "changes" }

After setting opened: true and tab: "all":

"fileTree": { "opened": true, "width": 220, "tab": "all" }

resulting DOM on the same build:

[data-component="file-tree-v2"]    223x508   (was 223x0)
text: .cursor .git .github .vscode backend bruno deploy docs
      frontend postman scripts .editorconfig .gitignore AGENTS.md README.md

This was verified against the web UI served by the same 2.1.4 server, which
loads the same bundle (index-Bi2TUU9V.js), so the desktop app and the web UI
are both affected.

Notes from inspecting the served bundle:

  • file UI plugin: Vr.define({id:"file", ...}) with
    tree: Vr.define("file.tree") and
    stores.tree: Hr.global(TM, {tab: "changes"}, {key: "layout", pick: e => e?.fileTree?.tab}).
  • TM = q({tab: Hn(["changes","all"])}), so changes is the default tab.
  • English i18n: "tree.all":"All files", "tree.empty":"No files",
    "mobile.title":"Files", "command.fileTree.toggle", "desktop.menu.toggleFileTree".
  • Spanish i18n: "tree.all":"Todos los archivos",
    "tree.changes.many":"{{count}} archivos cambiados".
  • settings.v3.general.showFileTree is already true in
    %APPDATA%\ai.opencode.desktop\opencode.settings, so that setting does not
    gate the toggle.

Workaround: set fileTree.opened = true and fileTree.tab = "all" in the
persisted layout state and restart the app. Not discoverable for end users.

Impact: on Windows there is no file explorer at all in the desktop app, so
browsing project files requires opening each file by path or falling back to an
external editor.

Activity

  1. opencode-agent commented on Oct 25, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report and the bundle notes. I think this is a duplicate of #56057.

    In 2.1.4, the "Toggle file tree" command (Mod+\) and its desktop menu entry only exist while the general.showFileTree setting is on. That setting defaults to off, and there is no option in Settings to turn it on. The layout.fileTree.opened state you edited belongs to that same side file tree. That's why the command doesn't show up in the palette and the tree can't be opened from the UI.

    About the disabled session-review-v2-sidebar-toggle: the Review panel's toggle is never disabled in the code. The only place it is disabled is the file browser tab before you open a file. In that state the "All files" tree is always shown, so the disabled toggle is expected there.

    Possible duplicates and related issues, ordered by likelihood:

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. For example, reply if the toggle is disabled for you inside the Review panel itself, or if the command still doesn't appear even though the app shows showFileTree as on.

  2. rodrigoborquez commented on Oct 25, 2026

    @rodrigoborquez
    Author

    Duplicate of #56057. I added the extra evidence there: the missing Settings row is not the only blocker. In this environment general.showFileTree was already true and the tree was still hidden, because the real gate is fileTree.opened, and the button meant to toggle it (session-review-v2-sidebar-toggle) ships disabled.

  3. opencode-agent commented on Oct 26, 2026

    @opencode-agent
    Contributor

    We haven't heard back in the last day, so I'm closing this as a duplicate of #56057. The "Toggle file tree" command and menu entry only exist while the showFileTree setting is on, and that setting defaults to off with no option in Settings to change it. Please follow #56057 for updates.

    If your case turns out to be different, please reply here with the details and we can reopen it. For example, the toggle might be disabled inside the Review panel itself, or the command might still be missing while the app shows the setting as on. Thanks again for the thorough report.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions