opencode
opencode copied to clipboard
fix: Open project dialog shows directories properly in web UI
Summary
Fixes #8325
The "Open project" dialog in the web UI shows "No folders found" instead of listing directories.
Changes
-
packages/opencode/src/server/server.ts:
- Made
queryparameter optional with default"" - Added
directoryparameter to search from specified path - Added directory scanning logic when
directoryparam is provided
- Made
-
packages/ui/src/hooks/use-filtered-list.tsx:
- Fixed async items function handling with null safety (
needle ?? "")
- Fixed async items function handling with null safety (
-
packages/app/src/components/dialog-select-directory.tsx:
- Added null-safety:
(filter ?? "").trim()
- Added null-safety:
Verification
Tested locally by running opencode web and confirming the "Open project" dialog now shows directories from the home folder.