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:
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 |
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
Widens Electron’s custom-scheme allowlist for
openExternal, which is security-sensitive, but the new Zed paths are tightly validated (host + path, no userinfo, non-SSH routes blocked).Overview
Lets Open on a remote worktree launch Zed via official
zed://ssh/<host>/<path>hotlinks, so Zed shows up in the remote editor picker when its CLI is installed.The editor registry now records a URL style per remote-capable editor (
vscode-remotevszed-ssh).buildRemoteOpenUrlemits the matching shape; VS Code forks are unchanged.Electron’s external-URL allowlist is style-aware: only structurally valid Zed SSH links (host + path, no userinfo) may
openExternal;zed://settingsand incomplete SSH URLs stay blocked. Docs note that stable Zed and Preview share thezed://handler.Reviewed by Cursor Bugbot for commit 7d8d617. 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 7d8d617.