-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
webRelates to opencode on web / desktopRelates to opencode on web / desktop
Description
Description
The "Open Project" dialog in web mode still shows "No folders found" and returns 400 errors.
This is related to the previously closed #6307, which was marked as fixed but the fix doesn't seem to be in the released versions.
Version
- opencode: 1.1.19 (latest)
Steps to Reproduce
- Run
opencode webfrom home directory - Click "Open project" button
- Dialog shows "No folders found for ''"
Root Cause
The /find/file endpoint requires query parameter but the SDK/UI sends it as undefined when empty:
# This fails with 400:
curl "http://127.0.0.1:PORT/find/file?type=directory&limit=10"
# Error:
{
"error": [{
"expected": "string",
"code": "invalid_type",
"path": ["query"],
"message": "Invalid input: expected string, received undefined"
}]
}
# This works:
curl "http://127.0.0.1:PORT/find/file?query=&type=directory&limit=10"Proposed Fix
- Make
queryparameter optional with default empty string in server validator - Add
directoryparameter support for searching outside current project - Fix
useFilteredListhook to properly handle async items function
See PR #8186 for the full fix (was closed saying it was already fixed, but it wasn't).
Screenshots
Metadata
Metadata
Assignees
Labels
webRelates to opencode on web / desktopRelates to opencode on web / desktop
