Repository navigation
feat(cli-peer): expose file explorer and Git read surfaces - #3492
Merged
Merged
Conversation
A Desktop controller driving a CLI Peer Host renders the workspace through the `explorer_*` reads and refreshes it from `file-system-changed`. The CLI Peer Host answered only the historical command names, so the file tree, the `@` reference picker and the editor breadcrumb all failed with "command 'explorer_get_children' is not supported on CLI peer host" even though this host already served the same directory read under another name. - Alias `explorer_get_children`, `explorer_get_children_paginated` and `explorer_get_file_tree` onto the existing readers instead of refusing them. - Add `get_file_tree`, `get_file_metadata`, `get_file_editor_sync_hash` and `create_file`, resolving local and remote-connection IO through a portable `path_operations` owner next to the existing read/write/rename helpers. - Add `start_file_watch`, `stop_file_watch` and `get_watched_paths`, and install the peer controller emitter for the watcher so change events reach attached controllers instead of leaving their tree stale after the first read. - Graduate the ten registry rows to `Handled`, correct the `stop_file_watch` remote-workspace stance, and regenerate the capability artifacts. - Declare `file-watch` in the CLI Core capability closure and pin the surface with a dispatch gate test.
Reuse GitService for repository, status, branches, log, diff, changed-file and revision reads. Preserve workspace-ID authority and reject remote workspaces without local fallback. Keep desktop owner DTOs, legacy payload compatibility and ownership-trust diagnostics. Add real-repository fixture tests covering nonmutation, wire fields and invalid inputs; update registry and generated projections.
This was referenced Oct 31, 2026
Main already serves the explorer_* aliases and get_file_tree on the CLI peer host with workspace-aware connection resolution; keep that owner and drop this branch's duplicate tree handler. Adapt the metadata, sync hash, create_file and file-watch handlers to the path-aware file_connection, keep main's ACP rows and get_file_watch_status row, and regenerate the remote surface artifacts.
Collaborator
|
Pushed two commits to resolve the conflicts with main (including #3669):
Verified:
Still open: |
3 tasks done
Regenerate the remote surface registry artifacts after openBitFun#3677 and openBitFun#3591.
Closed
Regenerate the remote surface registry artifacts after openBitFun#3670.
Regenerate the remote surface registry artifacts after openBitFun#3659.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
explorer_get_childrenand its paginated/tree aliases, restoring the backend surface used by the file tree, file-reference picker and editor breadcrumb.file-system-changedevents.GitServiceDTOs: repository/basic repository, status, branches/enhanced branches, commits, diff, changed files and revision resolution.Type and Areas
Type: Bug fix / feature completion
Areas: CLI Peer Host, shared filesystem routing, product operation registry
Motivation / Impact
A controller invokes the new
explorer_*command names, but the CLI host only implemented the historical directory commands and rejected the aliases before dispatch. This also affected file references and editor navigation. Basic Git panel reads likewise had no CLI peer handlers despite the shared Git owner already being available.Verification
cargo test --locked -p openbitfun-cli --bin openbitfun peer_host::— 107 passed.cargo test --locked -p openbitfun-product-domains --no-default-features remote_surface— 20 passed.pnpm run capabilities:check— passed.pnpm run fmt:rs— completed.git diff --check origin/main...HEAD— passed.pnpm run check:core-boundariesandpnpm run check:core-boundaries:test— passed (154 boundary tests).New Git fixture tests cover response fields, legacy/structured payloads, malformed inputs, workspace-ID authority, remote-scope rejection and unchanged HEAD/index/file content after reads.
Reviewer Notes
Checklist