anomalyco / anomalyco/opencode
Web UI: folder names blank in session file tree sidebar
@Brendonovich is already working on this.
Since Sep 15, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Folder rows in the session's file tree sidebar (the persistent right panel opened via the file-tree toggle, not the diff/review tree) render with no label — only the chevron and icon show. File rows are fine.
Root cause: the directory listing in packages/app/src/workspaces/files/model.tsx derives each node's name with entry.path.split("/").at(-1) ?? entry.path. GET /api/fs/list returns directory paths with a trailing separator (e.g. "src/"), so the split's last segment is "", and ?? entry.path never runs because "" isn't nullish. Every directory node ends up with an empty name.
This is the same symptom as #43666, but a different component. #43835 fixed FileTreeV2 (used in the file browser/diff-review tab) by deriving its label from the path instead of node.name, but it didn't touch the tree loader itself, so the older FileTree component — still used in this sidebar's "Files changed"/"All" tabs — kept showing blank folders.
OpenCode version
v2 branch, HEAD 081eef3b80 (web app / packages/app)
Steps to reproduce
- Open a session in the Web UI and open the file tree side panel (
⌘\). - Switch to the "All" tab, or expand any folder under "Files changed".
- Folder rows show no text, only their chevron/icon. Files show their names normally.
Screenshot and/or share link
Before (bug):

After (fix from the linked PR):

Scrolled further down the same "before" tree — .git here is a plain file (this checkout is a worktree, so .git is a gitdir pointer file, not a directory) and renders fine, while the real directories above it are still blank:

Operating System
macOS (reproduced locally; not OS-specific — it's a path-parsing bug reproducible on any platform)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.