feat(desktop): open SSH worktrees in local Zed - #4362
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Effect service review: one convention violation in the new DesktopZedLaunchError. See inline comment.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0fca57b. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (opening SSH worktrees in local Zed) with new service components, IPC channels, and UI workflow changes. New features with external process integrations warrant human review. You can customize Macroscope's approvability policy. Learn more. |
0fca57b to
50b3f5c
Compare

Fixes #4361
What Changed
zedorzeditorCLI through desktop IPC with an encoded SSH workspace URI.zeditorfallback, detached launching, missing CLI behavior, and picker visibility.Why
The existing Open action runs in the environment that owns the worktree. For an SSH-backed thread, that environment is remote and cannot launch the user's local graphical editor.
Zed supports opening a remote project from its local CLI through an SSH URL. Launching Zed from the desktop process extends the existing Open and Ctrl+O workflow without changing server-side editor launching.
UI Changes
Before
After
Interaction
Screencast.From.2026-07-23.12-26-34.mp4
Validation
vp test run apps/desktop/src/shell/DesktopZedLauncher.test.ts apps/web/src/components/chat/ChatHeader.test.tsvp run --filter @t3tools/desktop typecheckvp run --filter @t3tools/web typecheckvp run --filter @t3tools/contracts typecheckChecklist
Note
Low Risk
Adds a bounded desktop-only path that spawns a local Zed CLI with SSH targets from IPC; no auth or server changes, and user-facing launch errors stay generic.
Overview
Adds Open in Zed for SSH-backed projects in the desktop app when the thread has an active project cwd and
desktopBridgeis available.A new
DesktopZedLauncherresolveszed/zeditoron PATH, builds an encodedssh://URI from the SSH connection target and workspace path, and spawns a detachedzed -r …process. Launch failures surface generic messages (no SSH details in the launch error path).The feature is wired through
openRemoteZedon the desktop IPC bridge (DesktopOpenRemoteZedInputin contracts).ChatHeaderextendsshouldShowOpenInPickerso the picker appears on SSH environments (not only the primary local env) and limits editor choices to Zed when an SSH profile is active.OpenInPickerroutes those opens todesktopBridge.openRemoteZedinstead of the usual shellopenInEditormutation, with error toasts on failure.Reviewed by Cursor Bugbot for commit 50b3f5c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add 'Open in Zed' support for SSH worktrees via local Zed CLI
DesktopZedLauncherservice that searches PATH forzedorzeditor, builds anssh://URI from the active SSH environment, and spawns the CLI in detached mode to open the remote workspace.openRemoteZedIPC channel, bridged to the renderer aswindow.desktopBridge.openRemoteZed(input).ChatHeaderto detect SSH environments in desktop context and restrict the 'Open in' picker to Zed, routing clicks through the desktop bridge instead of the local editor flow.OpenInPickerhandles theremoteZedTargetprop by calling the bridge and showing an error toast on failure.zednorzeditoris on PATH, the operation fails withDesktopZedCommandNotFoundErrorand surfaces an error toast to the user.Macroscope summarized 50b3f5c.