Repository navigation
fix(editor): open external SSH file links - #9908
OnlyYu1996 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughRestored editor file loading now blocks external local files when an active runtime environment is present and authorizes external local paths only when no connection ID exists. External SSH paths bypass authorization. Tests configure the filesystem authorization mock and cover SSH loading, local-path authorization, and remote runtime blocking with the expected error and suppressed filesystem calls. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing as superseded by #10455, which has already merged the same resolved-SSH-owner routing and adds the stamped-host, live-tail, and remote-runtime safeguards needed by the current editor path. There is no remaining unique change from this branch to rebase safely. |
Summary
connectionIdowns the path.Closes #9743
Screenshots
No visual change.
Testing
pnpm lint(blocked by the existing non-exhaustive switch insrc/renderer/src/components/skills/skill-freshness-group.tsx:101)pnpm typecheckpnpm test(171 related tests passed)pnpm build(pnpm build:desktoppassed)The focused coverage verifies external SSH reads, local external-path authorization, remote runtime rejection, terminal file-link routing, runtime file reads, and connection ownership.
AI Review Report
Reviewed the terminal-link-to-editor path, owner hydration guard, per-file SSH connection resolution, runtime owner selection, and local authorization flow. The review verified that macOS, Linux, and Windows all use the same provider-aware renderer branch; no keyboard shortcut, label, path separator, or Electron platform behavior changed. It also confirmed that an unresolved SSH owner still fails retryably instead of falling back to a local read.
Security Audit
No dependencies, IPC messages, protocols, command execution, auth, or secret handling changed. Host-absolute paths bypass local authorization only when
getConnectionIdForFilehas resolved a concrete SSH owner; the read then goes through the existing SSH filesystem provider and connection boundary. Local paths still requirefs:authorizeExternalPath, and paired runtime paths remain constrained to the owning worktree RPC.Notes
This change intentionally does not extend paired runtime file RPCs to host-absolute paths.
ELI5
Clicking a file link to an absolute path on an SSH host failed local authorization. Editor tabs can open those SSH paths through the owning connection while local path rules stay the same.