Repository navigation
fix(editor): let desktop edit host files outside workspaces - #34119
Conversation
…rminal access Paired clients that can open terminals on a host can already read and write anything its user can, so the per-terminal provenance gate on files outside workspaces protected nothing. The host now grants any existing file outside its workspaces; older hosts get a clear update message instead of a refusal. Co-Authored-By: Claude <[email protected]>
…ting them Co-Authored-By: Claude <[email protected]>
…r local fallbacks Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Paired clients with terminal access can already write any file on the host, and phones can now save these files, so desktop grant tabs open editable too. Saves go through the host grant, renewing it when it lapsed and keeping the disk-change check; a grant tab never falls back to writing this computer's same path. Co-Authored-By: Claude <[email protected]>
… tabs Co-Authored-By: Claude <[email protected]>
…sed grant as deleted Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
…efore saving Co-Authored-By: Claude <[email protected]>
… and restore read-only grants as read-only Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
…nstead of locking the tab Co-Authored-By: Claude <[email protected]>
…keep read-only grants off the tab Co-Authored-By: Claude <[email protected]>
…t for a grant Co-Authored-By: Claude <[email protected]>
…airing Co-Authored-By: Claude <[email protected]>
… for grant tabs Co-Authored-By: Claude <[email protected]>
…ng module to break an import cycle Co-Authored-By: Claude <[email protected]>
…tle saves whose reply was lost Co-Authored-By: Claude <[email protected]>
… a disconnect Co-Authored-By: Claude <[email protected]>
…as saved Co-Authored-By: Claude <[email protected]>
…ncluding desktop timeout envelopes Co-Authored-By: Claude <[email protected]>
…erge-tmp # Conflicts: # src/main/runtime/terminal/lifecycle/floating-session-liveness.ts
…spaces' into nwparker/edit-restack-tmp
# Conflicts: # src/renderer/src/components/quick-open-file-navigation.test.ts # src/renderer/src/components/quick-open-file-navigation.ts # src/renderer/src/components/terminal-pane/terminal-host-workspace-file.ts
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
22189f5c-5b9d-40bd-91ed-ca76c355b9ff
Files selected for processing: 82-
config/reliability-gates.jsoncconfig/scripts/ci-shard-timings.jsonsrc/main/native-chat/native-chat-file-provenance.test.tssrc/main/native-chat/native-chat-file-provenance.tssrc/main/runtime/construction/runtime-file-command-state.tssrc/main/runtime/files/file-command-host.tssrc/main/runtime/orca-runtime-files-terminal-artifact-grants.test.tssrc/main/runtime/orca-runtime-files-terminal-artifact-io.test.tssrc/main/runtime/orca-runtime-files-terminal-link-host-translation.test.tssrc/main/runtime/orca-runtime-files-terminal-path-resolution.test.tssrc/main/runtime/orca-runtime-files-test-harness.tssrc/main/runtime/orca-runtime-path-candidate-history.test.tssrc/main/runtime/orca-runtime-test-mocks.spec.tssrc/main/runtime/orca-runtime-test-mocks/imported-values.spec.tssrc/main/runtime/orca-runtime-tests/headless-snapshots.spec.tssrc/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-06.spec.tssrc/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-11.spec.tssrc/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-03.spec.tssrc/main/runtime/recent-pty-output-buffer.test.tssrc/main/runtime/recent-pty-output-buffer.tssrc/main/runtime/recent-pty-output-retention.test.tssrc/main/runtime/rpc/rpc-caller-scope.test.tssrc/main/runtime/runtime-rpc-mobile-terminal-streaming.test.tssrc/main/runtime/runtime-rpc/runtime-rpc-lifecycle.tssrc/main/runtime/terminal-kitty-file-read.test.tssrc/main/runtime/terminal-kitty-file-read.tssrc/main/runtime/terminal-kitty-temporary-roots.tssrc/main/runtime/terminal-output-path-candidates.tssrc/main/runtime/terminal/artifacts/artifact-integrity.tssrc/main/runtime/terminal/artifacts/artifact-stat.tssrc/main/runtime/terminal/artifacts/artifact-write.tssrc/main/runtime/terminal/artifacts/file-grants.test.tssrc/main/runtime/terminal/artifacts/file-grants.tssrc/main/runtime/terminal/artifacts/local-artifact-read.tssrc/main/runtime/terminal/artifacts/terminal-artifacts.tssrc/main/runtime/terminal/lifecycle/floating-session-liveness.tssrc/main/runtime/terminal/lifecycle/pty-exit-lifecycle.tssrc/main/runtime/terminal/lifecycle/terminal-view-resources.tssrc/main/runtime/terminal/output/headless-terminal-hydration.tssrc/main/runtime/terminal/output/pty-output-ingestion.tssrc/main/runtime/terminal/output/terminal-buffer-operations.tssrc/main/runtime/terminal/output/terminal-orchestration-authority.tssrc/main/runtime/terminal/output/terminal-output-path.tssrc/main/runtime/terminal/terminal-file-path.tssrc/main/runtime/terminal/terminal-path-resolver.tssrc/renderer/src/components/editor/ExternalFileChangeBanner.tsxsrc/renderer/src/components/editor/ExternalFileChangeCompareDialog.tsxsrc/renderer/src/components/editor/editor-header-file-rename.tssrc/renderer/src/components/editor/editor-save-disk-precondition.test.tssrc/renderer/src/components/editor/editor-save-disk-precondition.tssrc/renderer/src/components/editor/editor-save-grant.test.tssrc/renderer/src/components/editor/editor-save-queue.tssrc/renderer/src/components/editor/restored-host-file-grant.test.tssrc/renderer/src/components/editor/restored-host-file-grant.tssrc/renderer/src/components/editor/useEditorPanelContentState.test.tsxsrc/renderer/src/components/editor/useEditorPanelFileContentLoader.tssrc/renderer/src/components/quick-open-file-navigation.test.tssrc/renderer/src/components/quick-open-file-navigation.tssrc/renderer/src/components/terminal-pane/host-file-refusal.tssrc/renderer/src/components/terminal-pane/terminal-file-open-routing.tssrc/renderer/src/components/terminal-pane/terminal-host-file-link-existence.tssrc/renderer/src/components/terminal-pane/terminal-host-workspace-file.tssrc/renderer/src/components/terminal-pane/terminal-link-client-local-file.test.tssrc/renderer/src/components/terminal-pane/terminal-link-host-granted-file-link.test.tssrc/renderer/src/components/terminal-pane/terminal-link-host-workspace-file.test.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/runtime/runtime-file-client-types.tssrc/renderer/src/runtime/runtime-file-client.test.tssrc/renderer/src/runtime/runtime-file-mutation-client.tssrc/renderer/src/runtime/runtime-file-read-client.tssrc/renderer/src/runtime/runtime-terminal-artifact-grant.tssrc/renderer/src/runtime/runtime-terminal-artifact-read.test.tssrc/renderer/src/runtime/runtime-terminal-artifact-read.tssrc/renderer/src/runtime/runtime-terminal-artifact-write.test.tssrc/renderer/src/runtime/runtime-terminal-artifact-write.tssrc/renderer/src/store/slices/editor/actions/open-file-mutations.tssrc/renderer/src/store/slices/editor/types/editor-files-slice.tssrc/renderer/src/store/slices/editor/types/open-file.tssrc/shared/file-write-disk-precondition.tssrc/shared/files-runtime-capabilities.tssrc/shared/protocol-version-published-capabilities.test.tssrc/shared/runtime-file-contracts.ts
Files with no reviewable changes: 21-
- src/main/native-chat/native-chat-file-provenance.test.ts
- src/renderer/src/components/editor/useEditorPanelContentState.test.tsx
- src/main/runtime/terminal/lifecycle/floating-session-liveness.ts
- src/main/runtime/terminal/artifacts/file-grants.test.ts
- src/main/runtime/runtime-rpc/runtime-rpc-lifecycle.ts
- src/main/runtime/orca-runtime-path-candidate-history.test.ts
- src/main/runtime/orca-runtime-test-mocks.spec.ts
- src/main/runtime/terminal/terminal-file-path.ts
- src/main/runtime/terminal/output/terminal-output-path.ts
- src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-06.spec.ts
- src/main/runtime/terminal/lifecycle/terminal-view-resources.ts
- src/main/native-chat/native-chat-file-provenance.ts
- src/main/runtime/terminal/artifacts/artifact-write.ts
- src/main/runtime/orca-runtime-test-mocks/imported-values.spec.ts
- src/main/runtime/terminal-output-path-candidates.ts
- src/main/runtime/terminal/lifecycle/pty-exit-lifecycle.ts
- src/main/runtime/orca-runtime-files-test-harness.ts
- src/main/runtime/files/file-command-host.ts
- config/scripts/ci-shard-timings.json
- src/main/runtime/construction/runtime-file-command-state.ts
- src/main/runtime/orca-runtime-tests/headless-snapshots.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
-
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ue.ts Co-Authored-By: Claude Opus 5.5 <[email protected]> Upstream stablyai#34119 grew editor-save-queue.ts to the 300-line max-lines cap; the fork's filePath field pushed it over.
Upstream (stablyai#34119) replaced the grant id with the granted editor fields; a granted file still stays off the plain-click OS route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ELI5
On a paired computer you can now edit and save files that sit outside every workspace on the host, such as a handoff note in
/tmp. Before, you could open them but only read them. Phones could already save these files. Being allowed to run terminals on the host already means you can change any file there, so desktop works the same way now.What Changed
Before: a file outside every workspace, opened from a chat link, a terminal link or Quick Open on a paired host, opened read-only. After: it opens editable, and saving writes the host's file.
How it works:
files.writeTerminalArtifact).files.resolve-terminal-path.absolute-files.v1.Why
The read-only restriction protected nothing. Callers already hold the
workspacepermission, which runs terminals as the host user, and phones could already save. Reusing the grant RPCs keeps the host side unchanged: no new methods and no capability gate beyond the one #33958 added.Linked Issue
Follow-up to #33958 (stacked on it). Maintainer request; no issue.
Visual Proof
N/A: the change is to editability and how saves are routed. A previously read-only tab now accepts edits; no new UI.
Testing
HtmlDocPreview.toolbar.test.tsxandHtmlDocPreview.failure-message.test.tsxfail on this machine. The toolbar file was re-run on the fix(files): open host files outside workspaces for any client with terminal access #33958 base and fails there identically; the failure-message file wasn't, but both fail the same way.Notes
Mobile already saves through the same grant RPCs, so phone and desktop now match. SSH workspaces are unchanged: the host doesn't grant paths outside SSH workspaces.