Skip to content

feat(web): open remote worktrees in Zed - #7900

Open
husseinraoouf wants to merge 1 commit into
pingdotgg:mainfrom
husseinraoouf:t3code/support-zed-remote-worktrees
Open

feat(web): open remote worktrees in Zed#7900
husseinraoouf wants to merge 1 commit into
pingdotgg:mainfrom
husseinraoouf:t3code/support-zed-remote-worktrees

Conversation

@husseinraoouf

@husseinraoouf husseinraoouf commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Closes #7899

Problem

The generalized remote editor links from #6572 only understand VS Code's vscode-remote URL 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

  • describe each remote-capable editor's URL shape in the shared editor registry
  • build Zed's official zed://ssh/<host>/<path> hotlinks while preserving the existing host/path encoding
  • include Zed in the desktop-side local editor probe
  • allow only structurally valid Zed SSH hotlinks through Electron's external URL boundary
  • document that stable Zed and Zed Preview share the zed:// handler, so users select Preview by registering the scheme from Preview

This 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 passed
  • vp run --filter @t3tools/contracts --filter @t3tools/desktop --filter @t3tools/web typecheck
  • targeted vp lint for changed TypeScript files
  • targeted vp fmt --check for all changed files
  • git diff --check

UI 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-remote vs zed-ssh). buildRemoteOpenUrl emits 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://settings and incomplete SSH URLs stay blocked. Docs note that stable Zed and Preview share the zed:// 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 links

  • Introduces RemoteEditorUrlStyle union type and optional remoteUrlStyle on EditorDefinition in editor.ts, so each remote editor declares its deep-link shape
  • Adds remoteScheme: 'zed' and remoteUrlStyle: 'zed-ssh' to the Zed editor entry; VS Code-family editors now explicitly declare remoteUrlStyle: 'vscode-remote'"- buildRemoteOpenUrl builds zed://ssh/<host>/<path> for Zed and continues to build <scheme>://vscode-remote/ssh-remote+<host><path> for VS Code-family; returns undefined when either scheme or style is missing
  • isRemoteEditorUrl in ElectronShell.ts replaces the flat protocol allowlist with a protocol→style Map and validates URL shape per style: Zed links require host ssh plus non-empty host and path segments; VS Code links require host vscode-remote and a /ssh-remote+ prefix
  • Behavioral Change: REMOTE_CAPABLE_EDITOR_IDS now requires both remoteScheme and remoteUrlStyle; editors missing either are excluded from remote-capable listings. Malformed Zed URLs (non-remote or missing path) are now rejected

Macroscope summarized 7d8d617.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3fd11aa6-af65-4cef-a189-31a7e42c75eb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 22, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@husseinraoouf

Copy link
Copy Markdown
Contributor Author

@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

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open remote worktrees in local Zed or Zed Preview

1 participant