Repository navigation
Description
Summary
While validating PR #6436, I found a separate remote-runtime editor-open issue: after opening a file from a Remote Host / paired runtime File Explorer, the editor can show Unable to load file; clicking Retry repeats the same failure because the editor tab is routed through local fs:readFile instead of the paired runtime file RPC.
This is separate from the Download fix in #6436. The Download action completed successfully for the same file.
Repro Harness Used
- Launch the PR/dev app with isolated user data and verify identity.
- Start a headless Orca runtime server in a foreground PTY:
ORCA_DEV_USER_DATA_PATH=/tmp/orca-remote-e2e/server-user-data \ ./node_modules/.bin/electron . --serve --serve-json --serve-port 6775 - Pair that runtime into the desktop app with the emitted
orca://pair?...URL. - On the runtime server, register a disposable git repo containing:
README.mdlarge.bin(1,048,699bytes)
- Set that repo's
externalWorktreeVisibilitytoshow, fetch the runtime repo/worktree into the desktop app, and select the runtime worktree. - Open File Explorer for that runtime worktree.
- Click
large.binin File Explorer. - Observe the editor tab error, then click
Retry.
Actual Result
The editor tab shows:
Unable to load file
Error invoking remote method 'fs:readFile': Error: Access denied: path resolves outside allowed directories. If this blocks a legitimate workflow, please file a GitHub issue.
Clicking Retry repeats the same failure. No renderer console errors were emitted during the retry.
Expected Result
Opening a file from a runtime-owned File Explorer should load through the runtime file RPC path, or produce a runtime-aware unsupported/too-large/binary message. Retry should retry the same runtime-aware read, not local fs:readFile.
Notes From Investigation
The editor supports runtime-owned tabs via runtimeEnvironmentId, and readRuntimeFileContent uses runtime RPC when the active settings contain the runtime owner.
The File Explorer row activation path appears to open files without explicitly carrying the runtime owner:
src/renderer/src/components/right-sidebar/useFileExplorerHandlers.tscallsopenFile({ filePath, relativePath, worktreeId, ... })withoutruntimeEnvironmentId.store.openFilecan fall back tosettings.activeRuntimeEnvironmentId, but that makes correctness depend on ambient global state rather than the selected file/worktree owner.
This may be state-dependent rather than universal, but a runtime-owned File Explorer row should preserve the runtime owner explicitly so editor load/retry cannot fall back to local filesystem reads.
Validation That Download Is Not Affected
For the same runtime file, the File Explorer context-menu Download action worked:
- macOS native Save dialog opened for
large.bin. - Saved file matched the runtime source exactly:
- size:
1,048,699bytes - SHA-256:
6eb96989e4bb95cf79889ee7e62cf3a3bf1b19152c7b9b9cf6ca9b03883459f0
- size:
So this issue is specifically about editor open/retry routing, not the download path.
Made with Orca 🐋
Activity
Fix remote File Explorer opening files via local fs:readFile (#6440) (#…
Fix remote File Explorer opening files via local fs:readFile (stablya…