Skip to content

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

@lxxonx

Description

@lxxonx

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

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions