Open Project dialog in web mode still broken (query parameter required) #5498

Closed
opened 2026-02-16 17:53:23 -05:00 by yindo · 0 comments
Owner

Originally created by @lxxonx on GitHub (Jan 13, 2026).

Originally assigned to: @thdxr on GitHub.

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

  1. Run opencode web from home directory
  2. Click "Open project" button
  3. 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

  1. Make query parameter optional with default empty string in server validator
  2. Add directory parameter support for searching outside current project
  3. Fix useFilteredList hook 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

Image

Originally created by @lxxonx on GitHub (Jan 13, 2026). Originally assigned to: @thdxr on GitHub. ## 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 1. Run `opencode web` from home directory 2. Click "Open project" button 3. 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: ```bash # 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 1. Make `query` parameter optional with default empty string in server validator 2. Add `directory` parameter support for searching outside current project 3. Fix `useFilteredList` hook 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 ![Image](https://github.com/user-attachments/assets/04e42a85-496f-40a8-9de8-0e2b47222a67)
yindo added the web label 2026-02-16 17:53:23 -05:00
yindo closed this issue 2026-02-16 17:53:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5498