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 — feat(protocol): add host browse endpoint for location picking by heimoshuiyu · Pull Request #46828 · anomalyco/opencode

Conversation

@heimoshuiyu

@heimoshuiyu heimoshuiyu commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #46826
Fixes #46679

Type of change

  • New feature

What does this PR do?

Every location-scoped fs endpoint runs through LocationMiddleware, so the
first read against any directory constructs the complete location runtime:
config discovery, plugins, watchers, and one MCP process set per server in that
directory's config chain. Directory navigation used those endpoints. The app
workspace picker preloads every child of the current root, and the TUI /cd
completion lists each parent directory while typing. Browsing a directory with
68 subdirectories spawned 68 runtimes and two local MCP servers each (~20 GB).

Navigation is not a location operation, so it gets its own surface:

  • server.browse group with a single GET /api/browse/list?directory=<abs>
    served from the global FSUtil service: one stat plus one readdir, no
    location resolution, no runtime, no events. Sibling of the server-scoped
    groups; fs.list/fs.read/fs.find are unchanged for work inside an
    active location.
  • The app workspace picker (tree, background preload, typed suggestions) and
    the TUI /cd completion navigate through browse.list.
  • The sidebar file tree and @ mention search keep fs.list/fs.find: they
    run inside the open location and rely on filesystem.changed events and the
    per-location search index.
  • Picker bare-word suggestions now match only the immediate children of the
    current directory (client-side fuzzysort). The previous recursive search was
    capped (result limit, visited-directory limit, ignore set), so whether a
    match surfaced depended on tree shape. The unused file-mode suggestion path
    is removed; no caller passes mode="file" today.

Generated client surfaces regenerated via bun run generate.

This follows #44272's read taxonomy rather than its mechanism: form and
permission queues are runtime-owned state, so #45994 can honestly return an
empty collection when no runtime exists. Directory contents are host-owned
state that exists regardless, so an empty fallback would be wrong and a
conditional host fallback would make fs.list's view depend on cache state.
#44272 anticipated this bucket: "Filesystem/VCS capability decomposition
... out of scope". This PR is that decomposition for the navigation case,
and it leaves fs.list free to become placement-aware (#44568) without
breaking pickers.

How did you verify your code works?

  • packages/server/test/browse.test.ts: lists children (directories first),
    400 with a readable message for missing and non-directory paths.
  • Dev server experiment: browse/list against 10 unloaded subdirectories
    returned 200 ten times with zero location services booted log lines and an
    unchanged MCP process count; a control fs/list against one more
    subdirectory still booted a runtime and spawned its MCP servers, so existing
    location behavior is retained.
  • Full TUI test suite (1177 tests), app selection tests (23), and typecheck
    across protocol/server/client/tui/app.

Screenshots / recordings

No visual change. Picker suggestions are limited to the current directory's
children instead of recursive matches.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@heimoshuiyu
heimoshuiyu requested review from Brendonovich and Hona as code owners September 2, 2026 15:05
@github-actions github-actions Bot added the contributor label Sep 2, 2026
@heimoshuiyu
feat(protocol): add host browse endpoint for location picking
4b66294
GET /api/browse/list lists direct children of one host directory through
the global FSUtil service without resolving or materializing a location
runtime, so directory navigation never boots instances or starts their
MCP servers. The workspace picker and the TUI /cd completion navigate
through browse.list; the sidebar file tree and @ mention search keep the
location-scoped fs routes they depend on.
@heimoshuiyu
heimoshuiyu force-pushed the host-browse branch from 5eb73be to 4b66294 Compare September 2, 2026 15:32
@heimoshuiyu

heimoshuiyu commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

closed in favor of #46970

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@heimoshuiyu heimoshuiyu closed this Sep 3, 2026
@firefoxmmx2 firefoxmmx2 mentioned this pull request Sep 12, 2026
service: v2 service spawns one local MCP server pair per cataloged project directory at startup #43845
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Hona Hona Awaiting requested review from Hona Hona is a code owner
@Brendonovich Brendonovich Awaiting requested review from Brendonovich Brendonovich is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@heimoshuiyu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.