GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — "Open project" dialog always shows "No folders found" — GET /file missing required path param · Issue #39434 · anomalyco/opencode

"Open project" dialog always shows "No folders found" — GET /file missing required path param #39434

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
"Open project" dialog always shows "No folders found" — GET /file missing required path param#39434
Copy link
Assignees
Brendonovich

Description

@andrianm28
andrianm28
opened on Jul 29, 2026
Issue body actions

Bug: "Open project" / directory picker always shows "No folders found" — GET /file request missing required path query param

Summary

The "Open project" dialog (and the subfolder browser inside the "New Session" flow) always shows "No folders found", even when valid directories exist and the server's REST API works correctly when called directly. The root cause is a client/server API contract mismatch: the frontend calls the file-listing SDK method without the now-required path query parameter, so the server rejects every request with a 400.

This looks like a regression of the older #8325 (closed, fixed for a different endpoint/cause) — same user-visible symptom, different root cause.

Environment

  • opencode server version: 1.18.8 (self-hosted opencode web, behind an nginx reverse proxy on a custom domain)
  • Client: web UI (Chrome), accessed via a domain other than localhost
  • Server started with an explicit project directory (single project scope), not 0.0.0.0/browsing from a multi-project root

Root cause

The server's own OpenAPI schema for GET /file marks path as required:

{
  "name": "path",
  "in": "query",
  "schema": { "type": "string" },
  "required": true
}

Confirmed directly against a running server:

# missing "path" -> 400
curl -u user:pass "https://<host>/file?directory=%2Fhome%2Fopencode"
# {"name":"BadRequest","data":{"message":"Missing key\n  at [\"path\"]","kind":"Query"}}

# with "path=" (even empty) -> 200, real listing
curl -u user:pass "https://<host>/file?path=&directory=%2Fhome%2Fopencode"
# [{"name":".cache","path":".cache/", ...}, ...]

Server log confirms the rejection:

level=WARN message="schema rejection" kind=Query reason="Missing key\n  at [\"path\"]"

But the frontend's directory-picker code calls the SDK's file.list() without a path field, in both the v1 and v2 directory pickers:

packages/app/src/components/directory-picker-domain.ts (~line 345):

const request = args.sdk.api.file
  .list({ location: { directory: key } })   // <-- no `path` field
  .then((result) => result.data)
  .catch(() => [])   // <-- error silently swallowed, becomes "No folders found"

packages/app/src/components/dialog-select-directory-v2.tsx (~line 130):

return sdk.api.file
  .list({ location: { directory: absolute } })  // <-- same issue
  .then((result) => ...)

Meanwhile, the SDK's own generated types (packages/sdk/js/src/v2/gen/types.gen.ts) show the correct/expected shape:

export type FileListData = {
  body?: never
  path?: never
  query: {
    directory?: string
    workspace?: string
    path: string   // required, not optional
  }
  url: "/file"
}

So the call sites use an outdated { location: { directory } } shape instead of the flat { directory, path } shape the SDK types (and server) now require. Because the .catch(() => []) swallows the resulting 400 error, the UI shows an empty "No folders found" state with no visible error at all, making this very hard to diagnose from the UI alone.

Steps to reproduce

  1. Run opencode web with a specific project directory (not the filesystem root/home), behind a reverse proxy on a non-localhost domain.
  2. Open the web UI, click "Open project" (or "Add project" from the New Session flow).
  3. Observe: "No folders found", regardless of what's typed in the search box or what directories actually exist.
  4. Open browser DevTools → Network tab → observe GET /file?... (or /find/file?...) requests returning 400 Bad Request with {"message":"Missing key\n at [\"path\"]"}.

Expected behavior

The directory picker should list real folders, since the underlying REST API works correctly when called with the required path parameter.

Suggested fix

Update the call sites in directory-picker-domain.ts and dialog-select-directory-v2.tsx to include an explicit path: "" (or the correct relative path being browsed) alongside directory, matching the FileListData query shape. Also consider not silently swallowing HTTP errors in .catch(() => []) for this codepath, so future contract mismatches surface as a visible error rather than a confusing empty state.

Activity

  1. github-actions
    assigned
    Brendonovich
    on Jul 29, 2026
  2. github-actions commented on Jul 29, 2026

    @github-actions
    github-actionsBot
    on Jul 29, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues with the same "No folders found" symptom. Please check:

    • Web project picker is empty until a search is entered #37611: Web project picker is empty until a search is entered (same symptom, different root cause — empty query to /find/file)
    • Folders list is not appearing up in the web client #34675: Folders list is not appearing up in the web client (same symptom, v1.17.11)
    • [BUG] opencode web can not open projects #37005: [BUG] opencode web can not open projects (same symptom, fff initialization failure root cause)

    Your root cause analysis (missing path query param causing 400s silently swallowed by .catch(() => [])) appears distinct from those, but maintainers may want to consolidate.

  3. Turgaud88 commented on Jul 29, 2026

    @Turgaud88
    Turgaud88
    on Jul 29, 2026
    More actions

    Hi, you need to manually enter the relative path to the project, and it will appear in the list, for example ~/projects/etc

  4. kai-kleinbard-tyto commented on Jul 30, 2026

    @kai-kleinbard-tyto
    kai-kleinbard-tyto
    on Jul 30, 2026
    More actions

    Closing as duplicate of #39471 — same 'Open Project' / file browser issue.

  5. EricZhou05 commented on Aug 11, 2026

    @EricZhou05
    EricZhou05
    on Aug 11, 2026
    More actions

    Fixed in #41158.

  6. github-actions commented on Oct 10, 2026

    @github-actions
    github-actionsBot
    on Oct 10, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  7. github-actions
    closed this as not plannedon Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Brendonovich
    Brendonovich

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.