Repository navigation
Description
Title: [Web UI] "Open project" folder picker search is anchored to home directory; cannot find projects on other drives (Windows)
Describe the bug
On Windows, the "Open project" folder picker in the web UI anchors its search base to path.home (the OS user home, e.g. C:\Users\<user>) instead of the directory the server was started from or the current session directory. As a result, even when opencode web is started from the root of another drive (e.g. D:\), a plain-text search (typing a project name) only searches inside C:\Users\<user> and can never find projects located in subdirectories on the other drive.
Steps to reproduce
- On Windows, start
opencode webfrom the root ofD:\. - Open the web UI → click "Open project" (add project).
- Type the name of a project that lives on D: (e.g.
fleximetricatD:\code\python-demo\fleximetric). - The dialog shows "No folder found".
Expected behavior
- A plain-text search should be recursive relative to the server start directory (or the current session directory); or
- The user should at least be able to switch the search base by typing a drive path.
Actual behavior
- Plain-text search is always anchored to
path.home; projects on other drives are never found. - Server log captured from a real browser request:
GET /find/file?directory=C:\Users\<user>&query=fleximetric&dirs=true&limit=50→results=0. - The exact same query with
directory=D:\returnsresults=50, proving the backend recursive search works fine — the bug is purely in the frontend search-base selection.
Root cause analysis
In the web bundle (oc-dialog-v2.js), the dialog search base is computed with this priority:
base = start || path.home || path.directoryThe dialog is opened without start, so path.home (OS user home) always wins over path.directory (server start directory). The /path endpoint confirms the two are independent:
{
"home": "C:\\Users\\<user>",
"directory": "D:\\"
}The frontend search only ever uses home.
Workaround
- In the search box, first type
D:\+ Enter (or click the Root button) to move the browse base to the target drive, then type the project name to search; or - Type the full path
D:/code/python-demoand navigate level by level; or - Open the project once in the TUI — it will then appear in the web sidebar.
Environment
- opencode version: v1.18.18 (npm global install)
- OS: Windows 10/11
- Note: Chinese (non-ASCII) directory names also show as mojibake in the web UI (GBK vs UTF-8 mismatch) — related encoding issue, worth fixing together.
Related issues
- opencode web UI cannot browse or select folders outside the default user profile (e.g., D:\code\python) #6490 — identical report (web UI cannot browse projects under
D:\code\python); auto-closed after 60 days of inactivity, never fixed. - @ file mentions do not include files created after startup #32747 — ripgrepLayer only indexes the directory snapshot from server boot; new files require a restart (related but not identical).
- Title: [BUG] Open project picker misses deeper WSL project folders #28303 — project picker misses deep WSL project folders (same class of "picker search scope" problem).
Activity
[-][Web UI] Folder picker search anchored to home dir; cannot find projects on other drives (Windows)[/-][+]Bug: folder picker search anchored to home dir; cannot find projects on other drives (Windows)[/+]Annanxiao commentedon Sep 17, 2026
Confirmed on Windows mobile Web UI (v1.18.18). /path reports home on C: while directory is on D:. /project, /session, and /find/file all see the D: project correctly, and a direct session URL opens on the same phone, but the mobile project picker cannot find/open it. This supports the reported frontend search-base bug. One extra detail: entering a full D-drive path in the mobile picker can still show 'No folder found', suggesting an additional mobile/path-parsing issue.
wes1993 commentedon Sep 17, 2026
Same on Linux with docker
CodeJuggernaut commentedon Oct 10, 2026
Confirmed on windows, HOWEVER:
There's a workaround. In the picker's search box, type
C:\path\to\your\git\dirand press Enter, which moves the search there. Then typeyour directory nameand it will appear. Click it and you're in!thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊