You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(renderer): no client SSH operation arms in project creation or native chat - #27593
Since the old SSH relay was removed, a project on an SSH host lives on the Orca server that Orca runs on that host. In Add Project and in chat, the app still had code paths that tried to do the work over SSH from this computer. Those paths always failed. This PR removes them. SSH hosts now work in two ways only: you connect them, or you work through their server.
What Changed
Add Project dialog
canSelectAddRepoHost refuses SSH rows. An SSH row can still be connected. Once connected, the host's server row is what you pick.
Bug fix: right after a connect, before the server list has loaded, a connected SSH host could appear as its own row. Picking it sent the clone, create or add to this computer's SSH path, which failed. Now that row holds the dialog's actions disabled until the server row stands for it. It never falls back to this computer. A disconnected SSH host that was asked for also stays displayed and blocked instead of switching to Local.
Removed the client-SSH arms: cloneRemote (clone flow), createRemote (create flow), the local addRemote remote step (target list, local connect, nested scan, "Add in Settings"), the SSH browse arm, SSH-only copy and the always-true canCreateProject/isSshLikely/showRemoteAction props. Also removed use-add-repo-remote-nested-scan.ts and handleOpenSshSettings.
The "project on this server's SSH host" step (serverEnvironmentId → addRuntimeSshRepo) is unchanged. It is now the only way to reach the remote step. If that server goes away while the remote step is open, the start step renders instead of an empty body.
Folder flow: NonGitFolderDialog adds an SSH folder only through its server (addRuntimeSshRepo). If it has an SSH id but no server, it shows today's error (SSH connection "…" not found or not connected) and adds nothing on this computer. AddProjectFromFolderDialog loses its addRemote arm. The file explorer no longer offers "Add as project" inside an ssh:-owned folder. That arm could only fail, and it must not fall through to a local add.
setupProjectClone (Settings › Repository hosts and Set Project Location) on an ssh: host now throws that same text before any clone. Before, it called cloneRemote, which failed with that text.
Native chat
Removed NativeChatSshAttachmentOwner and uploadNativeChatAttachmentPaths. An ssh:-owned chat resolves to the owner that refuses client files: { kind: 'remote' }, renamed from 'runtime'. It shows "Local attachments are not available for remote sessions." Before, it tried an upload that failed with a connection error.
The clipboard-image save, paste settle and paste lifetime lose their SSH arms. The owner-unchanged check is now kind equality.
Internal workspace-file drops on an ssh: host still tag paths with the host's target id, so they are never read as client files.
Transcript images: an ssh: route with no server returns no context, so nothing is read. Nested server SSH hosts are unchanged.
Corrected the stale comment in runtime-client-target.ts about direct SSH riding this app's IPC.
Other
Removed 14 locale keys that nothing references any more, in all 6 locales plus the Korean overrides.
Telemetry: adding a project on a server's SSH host no longer emits add_repo_nested_scan_result with scan_failed. No scan runs there, so that event was a misreport.
Net lines: production −577 (+277/−854), tests −1090 (+278/−1368), locales −93.
Left for B3, which owns main and preload: deleting the repos:cloneRemote/createRemote/addRemote handlers and their preload and web API, and the nested-import connectionId plumbing into importNestedRepos. The renderer no longer produces a connectionId for it.
Why
This is Phase 3.99 C4 (design K19 / UI survey F1). Every arm removed here always failed. ssh-connect-flow never yields a client SSH workspace, and registerSsh{Git,Filesystem}Provider has no production caller. Keeping the arms meant a host picker that could choose a row that then failed, and Add Project code that every new flow had to copy. I considered keeping SSH rows pickable and routing them to the server, but that is new routing behaviour (design D-1, deferred). The plan chose a refusal, which matches today's error text. Wherever a removed arm could otherwise have fallen through to this computer, it refuses or blocks instead.
Linked Issue
Maintainer PR. Part of Phase 3.99 (stack entry C4, Wave 1).
Visual Proof
N/A. The only visible changes are on paths that already failed: an un-merged SSH row is disabled instead of selectable, the file-explorer "Add as project" item is hidden in relay-era ssh: folders, and SSH chat attachments show the remote-session notice instead of a connection error.
Testing
Dead-code proof: rg over src, config, tests and mobile, including the 159 @ts-nocheck files, finds no remaining reference to NativeChatSshAttachmentOwner, uploadNativeChatAttachmentPaths, useAddRepoRemoteNestedScan, selectedSshTargetId, lockSshTargetSelection, isScanningRemoteNested, stopRemoteNestedScan, handleOpenSshSettings, isSshLikely, showRemoteAction, canCreateProject, browseSsh or the removed locale keys. pnpm run build:electron-vite passes. The change is renderer-only, so CLI and orcad bundles are unaffected.
pnpm tc, pnpm lint (all ratchets at baseline; focus-read stays at 1138), oxlint, pnpm run check:code-quality:changed (0 new).
Focused tests: native-chat, sidebar, right-sidebar, new-workspace and the repo-slice suites (1043 files, 9559 tests). One timing test in ai-vault-session-worktree-map failed once under load and passed on rerun.
New and updated tests:
Host selection: an SSH row is never selected, a connected-but-unmerged SSH row blocks the actions instead of falling back to Local, and the server row is taken once merged.
useRemoteRepo with no server never lists, connects or adds.
Folder workspace on a server's SSH target goes through addRuntimeSshRepo, with the requested display name and duplicate repo IDs. This is a mocked server; no live older server was run. The same folder with no server refuses with today's text and adds nothing locally.
setupProjectClone on ssh: refuses before any clone.
The file-explorer action is hidden for ssh: folders.
Chat attachment owners for SSH resolve to remote.
Transcript images read nothing for an ssh: route with no server.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Self-review and an independent reviewer (GPT-6.1 Sol, high) both found no P0/P1 on b7a1e71b4d. Reports: .build/runtime-strategy/phase399/reviews/C4-self.md and C4-codex.md.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Remote SSH: managed SSH hosts are paired runtimes and use the server path, which is unchanged. No removed arm becomes local execution: an unresolved host blocks the dialog, and the store and folder dialog refuse with today's text.
Folder workspaces: the server's SSH folder path is kept and tested.
Wire: no change. The renderer to main IPC ships in one build, and modal data and web stubs stay client-local.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
📝 Walkthrough
Walkthrough
The change removes direct SSH-host repository and native-chat attachment paths. Native-chat ownership now uses local, remote, runtime-session, and not-ready states. SSH-specific uploads, clipboard saves, and connection metadata are removed. Repository creation, cloning, browsing, and folder import now use local or paired-server runtime paths. Related tests and localization entries were updated.
Priority: ⬇️ Low
Merge Risk:⚪ Minimal · up to b7a1e
The change removes client-side SSH paths from project creation and native chat attachments, and routes SSH operations through the paired server. No concrete merge-blocking risk was found in the supplied context.
Pre-merge checks | 4 | 1
❌ Failed checks (1 inconclusive)
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 23.68% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 38 functions across 50 files. (11 skipped…
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Title check
The title clearly and concisely describes the main change: removing client-side SSH operation paths from renderer project creation and native chat.
Description check
The description covers the required sections and provides clear user-facing changes, rationale, testing evidence, visual-proof justification, review notes, and compatibility considerations. The unchec…
Full details: Docstring Coverage
Explanation
Docstring coverage is 23.68% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 38 functions across 50 files. (11 skipped: 6 unsupported, 5 over the file limit.)
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
Commit to this branch
Create a new PR
🛠️ Fix failing CI checks 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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
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.
ELI5
Since the old SSH relay was removed, a project on an SSH host lives on the Orca server that Orca runs on that host. In Add Project and in chat, the app still had code paths that tried to do the work over SSH from this computer. Those paths always failed. This PR removes them. SSH hosts now work in two ways only: you connect them, or you work through their server.
What Changed
Add Project dialog
canSelectAddRepoHostrefuses SSH rows. An SSH row can still be connected. Once connected, the host's server row is what you pick.cloneRemote(clone flow),createRemote(create flow), the localaddRemoteremote step (target list, local connect, nested scan, "Add in Settings"), the SSH browse arm, SSH-only copy and the always-truecanCreateProject/isSshLikely/showRemoteActionprops. Also removeduse-add-repo-remote-nested-scan.tsandhandleOpenSshSettings.serverEnvironmentId→addRuntimeSshRepo) is unchanged. It is now the only way to reach the remote step. If that server goes away while the remote step is open, the start step renders instead of an empty body.NonGitFolderDialogadds an SSH folder only through its server (addRuntimeSshRepo). If it has an SSH id but no server, it shows today's error (SSH connection "…" not found or not connected) and adds nothing on this computer.AddProjectFromFolderDialogloses itsaddRemotearm. The file explorer no longer offers "Add as project" inside anssh:-owned folder. That arm could only fail, and it must not fall through to a local add.setupProjectClone(Settings › Repository hosts and Set Project Location) on anssh:host now throws that same text before any clone. Before, it calledcloneRemote, which failed with that text.Native chat
NativeChatSshAttachmentOwneranduploadNativeChatAttachmentPaths. Anssh:-owned chat resolves to the owner that refuses client files:{ kind: 'remote' }, renamed from'runtime'. It shows "Local attachments are not available for remote sessions." Before, it tried an upload that failed with a connection error.ssh:host still tag paths with the host's target id, so they are never read as client files.ssh:route with no server returns no context, so nothing is read. Nested server SSH hosts are unchanged.runtime-client-target.tsabout direct SSH riding this app's IPC.Other
add_repo_nested_scan_resultwithscan_failed. No scan runs there, so that event was a misreport.Net lines: production −577 (+277/−854), tests −1090 (+278/−1368), locales −93.
Left for B3, which owns main and preload: deleting the
repos:cloneRemote/createRemote/addRemotehandlers and their preload and web API, and the nested-importconnectionIdplumbing intoimportNestedRepos. The renderer no longer produces aconnectionIdfor it.Why
This is Phase 3.99 C4 (design K19 / UI survey F1). Every arm removed here always failed.
ssh-connect-flownever yields a client SSH workspace, andregisterSsh{Git,Filesystem}Providerhas no production caller. Keeping the arms meant a host picker that could choose a row that then failed, and Add Project code that every new flow had to copy. I considered keeping SSH rows pickable and routing them to the server, but that is new routing behaviour (design D-1, deferred). The plan chose a refusal, which matches today's error text. Wherever a removed arm could otherwise have fallen through to this computer, it refuses or blocks instead.Linked Issue
Maintainer PR. Part of Phase 3.99 (stack entry C4, Wave 1).
Visual Proof
N/A. The only visible changes are on paths that already failed: an un-merged SSH row is disabled instead of selectable, the file-explorer "Add as project" item is hidden in relay-era
ssh:folders, and SSH chat attachments show the remote-session notice instead of a connection error.Testing
Dead-code proof:
rgoversrc,config,testsandmobile, including the 159@ts-nocheckfiles, finds no remaining reference toNativeChatSshAttachmentOwner,uploadNativeChatAttachmentPaths,useAddRepoRemoteNestedScan,selectedSshTargetId,lockSshTargetSelection,isScanningRemoteNested,stopRemoteNestedScan,handleOpenSshSettings,isSshLikely,showRemoteAction,canCreateProject,browseSshor the removed locale keys.pnpm run build:electron-vitepasses. The change is renderer-only, so CLI and orcad bundles are unaffected.pnpm tc,pnpm lint(all ratchets at baseline; focus-read stays at 1138),oxlint,pnpm run check:code-quality:changed(0 new).Focused tests: native-chat, sidebar, right-sidebar, new-workspace and the repo-slice suites (1043 files, 9559 tests). One timing test in
ai-vault-session-worktree-mapfailed once under load and passed on rerun.New and updated tests:
useRemoteRepowith no server never lists, connects or adds.addRuntimeSshRepo, with the requested display name and duplicate repo IDs. This is a mocked server; no live older server was run. The same folder with no server refuses with today's text and adds nothing locally.setupProjectCloneonssh:refuses before any clone.ssh:folders.remote.ssh:route with no server.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Self-review and an independent reviewer (GPT-6.1 Sol, high) both found no P0/P1 on
b7a1e71b4d. Reports:.build/runtime-strategy/phase399/reviews/C4-self.mdandC4-codex.md.Agent skill upstream boundary
Notes