Skip to content

fix(editor): open external SSH file links - #9908

Open
OnlyYu1996 wants to merge 1 commit into
stablyai:mainfrom
OnlyYu1996:codex/issue-9743-ssh-external-file
Open

fix(editor): open external SSH file links#9908
OnlyYu1996 wants to merge 1 commit into
stablyai:mainfrom
OnlyYu1996:codex/issue-9743-ssh-external-file

Conversation

@OnlyYu1996

@OnlyYu1996 OnlyYu1996 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Let editor tabs read host-absolute SSH paths through their resolved SSH connection.
  • Skip local filesystem authorization only when a concrete SSH connectionId owns the path.
  • Preserve the existing local external-path authorization and remote runtime worktree boundary.

Closes #9743

Screenshots

No visual change.

Testing

  • pnpm lint (blocked by the existing non-exhaustive switch in src/renderer/src/components/skills/skill-freshness-group.tsx:101)
  • pnpm typecheck
  • pnpm test (171 related tests passed)
  • pnpm build (pnpm build:desktop passed)
  • Added or updated high-quality tests that would catch regressions

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 getConnectionIdForFile has resolved a concrete SSH owner; the read then goes through the existing SSH filesystem provider and connection boundary. Local paths still require fs: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.

  • X handle: N/A

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.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Restored 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)
Check name Status Explanation
Linked Issues check ✅ Passed The changes match #9743 by routing resolved SSH host-absolute paths through SSH and preserving local auth and runtime rejection.
Out of Scope Changes check ✅ Passed The diff stays focused on SSH file loading behavior and related regression tests, with no obvious unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly matches the main change: opening external SSH file links in the editor.
Description check ✅ Passed The description matches the template and includes summary, screenshots, testing, AI review, security, and notes.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

3 participants