feat(web): open remote worktrees in Zed - #7900
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:
Comment |
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
|
@juliusmarminge i know you have alot on your plate, but i would appreciate if you could get this into nightly it would be a huge un-blocker for me |
Closes #7899
Problem
The generalized remote editor links from #6572 only understand VS Code's
vscode-remoteURL shape. Zed therefore remains local-only even though #4361 was closed, while its older dedicated implementation in #4362 predates the generalized flow. Zed Preview was not tracked.Fix
zed://ssh/<host>/<path>hotlinks while preserving the existing host/path encodingzed://handler, so users select Preview by registering the scheme from PreviewThis follows Zed's documented remote-development URL format and its shared release-channel URL scheme. It avoids reviving the separate Zed-only IPC path from #4362.
Verification
vp test run apps/web/src/remoteOpen.test.ts apps/desktop/src/electron/ElectronShell.test.ts� 20 tests passedvp run --filter @t3tools/contracts --filter @t3tools/desktop --filter @t3tools/web typecheckvp lintfor changed TypeScript filesvp fmt --checkfor all changed filesgit diff --checkUI changes
No layout or styling changes. Zed now appears in the existing remote Open picker when its local CLI is detected.
Implemented by Codex (gpt-5.6-sol) through the T3 Code Codex harness.
Note
Medium Risk
Changes Electron’s external URL allowlist and deep-link generation; mistakes could open unsafe custom schemes or break remote open for VS Code-family editors.
Overview
Adds Zed to the shared remote “Open in editor” flow using Zed’s
zed://ssh/<host>/<path>hotlinks, alongside the existing VS Code-familyvscode-remoteshape.The editor registry now declares a
RemoteEditorUrlStyleper remote-capable editor;buildRemoteOpenUrlbranches on that style (Zed vs VS Code forks).REMOTE_CAPABLE_EDITOR_IDSonly includes editors with both scheme and style, so Zed shows up in the remote Open picker when its CLI is detected.On desktop,
ElectronShellvalidates editor deep links by style—allowing well-formed Zed SSH URLs while still blocking unrelatedzed://routes and URLs with userinfo. Tests and user docs cover Zed/Zed Preview scheme registration.Reviewed by Cursor Bugbot for commit 4113f02. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add Zed as a remote-capable editor with
zed://ssh/deep linksRemoteEditorUrlStyleunion type and optionalremoteUrlStyleonEditorDefinitionin editor.ts, so each remote editor declares its deep-link shaperemoteScheme: 'zed'andremoteUrlStyle: 'zed-ssh'to the Zed editor entry; VS Code-family editors now explicitly declareremoteUrlStyle: 'vscode-remote'"-buildRemoteOpenUrlbuildszed://ssh/<host>/<path>for Zed and continues to build<scheme>://vscode-remote/ssh-remote+<host><path>for VS Code-family; returnsundefinedwhen either scheme or style is missingisRemoteEditorUrlin ElectronShell.ts replaces the flat protocol allowlist with a protocol→styleMapand validates URL shape per style: Zed links require hostsshplus non-empty host and path segments; VS Code links require hostvscode-remoteand a/ssh-remote+prefixREMOTE_CAPABLE_EDITOR_IDSnow requires bothremoteSchemeandremoteUrlStyle; editors missing either are excluded from remote-capable listings. Malformed Zed URLs (non-remote or missing path) are now rejectedMacroscope summarized 4113f02.