Skip to content

Add Zed support to Open actions via editor command aliases#1303

Merged
juliusmarminge merged 3 commits intopingdotgg:mainfrom
AdemBenAbdallah:feat/open-in-zed
Apr 6, 2026
Merged

Add Zed support to Open actions via editor command aliases#1303
juliusmarminge merged 3 commits intopingdotgg:mainfrom
AdemBenAbdallah:feat/open-in-zed

Conversation

@AdemBenAbdallah
Copy link
Copy Markdown
Contributor

@AdemBenAbdallah AdemBenAbdallah commented Mar 22, 2026

https://zed.dev/docs/reference/cli#installation

Summary

Add Zed support to the existing "Open" editor flow.

This keeps the current architecture intact by extending the shared editor definition and server open service to support multiple command aliases per editor.

Changes

  • add command alias support to the shared editor registry
  • support Zed via zed and zeditor
  • keep existing VS Code/Cursor behavior unchanged
  • add server tests for Zed resolution and fallback behavior

Why

Some Zed installs expose the CLI as zeditor instead of zed. Before this change, Zed could be modeled in the UI but still fail to appear or launch depending on the installed command name.

Verification

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run --cwd apps/server test src/open.test.ts
screenshot-2026-03-22_13-03-58

Note

Add zeditor alias fallback for Zed editor in Open actions

  • Changes EditorDefinition in packages/contracts/src/editor.ts to replace the single command field with a commands tuple (or null for file-manager), allowing editors to declare multiple candidate binaries.
  • Adds a resolveAvailableCommand helper in apps/server/src/open.ts that returns the first installed binary from a list, used when resolving which command to launch.
  • The zed editor now lists ["zed", "zeditor"] as candidates, so systems where only the zeditor alias is in PATH are supported.
  • file-manager uses commands: null and resolves to the platform-specific opener at runtime; it is excluded from available editors when that opener is not present.

Macroscope summarized 3dd2572.


Note

Low Risk
Low risk: limited to editor command resolution/availability logic, with added tests; primary behavior change is which binary gets launched or whether an editor appears as available.

Overview
Adds support for multiple CLI command aliases per editor by changing editor definitions from a single command to a commands list, and updating the server Open flow to pick the first available binary on PATH (falling back to the primary command).

Updates Zed to resolve via zed or zeditor, adjusts file-manager detection to only appear when the platform opener is available, and expands open.test.ts to cover alias fallback and availability edge cases.

Reviewed by Cursor Bugbot for commit 3dd2572. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 22, 2026

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

Run ID: a536c899-5136-4887-9e96-96c83248d198

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 22, 2026
@Klemencina
Copy link
Copy Markdown
Contributor

From the official arch package: https://archlinux.org/packages/extra/x86_64/zed/files/

- Resolve editor launches against multiple command aliases
- Include zeditor as a fallback for Zed and update availability checks
- Refresh MSW worker version

Co-authored-by: codex <codex@users.noreply.github.com>
@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Apr 6, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 013a2cf. Configure here.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 6, 2026

Approvability

Verdict: Approved

This PR adds support for editor command aliases, specifically allowing "zeditor" as a fallback for "zed" on Linux systems where Zed installs with that name. The change is self-contained, well-tested, and limited to internal command resolution logic with no API changes or security implications.

You can customize Macroscope's approvability policy. Learn more.

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge merged commit afc3924 into pingdotgg:main Apr 6, 2026
10 of 11 checks passed
Aditya190803 pushed a commit to Aditya190803/t3code that referenced this pull request Apr 7, 2026
…#1303)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Chrono-byte pushed a commit to Chrono-byte/t3code that referenced this pull request Apr 7, 2026
…#1303)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
gigq pushed a commit to gigq/t3code that referenced this pull request Apr 8, 2026
…#1303)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit afc3924)
rororowyourboat added a commit to rororowyourboat/t3code that referenced this pull request Apr 9, 2026
…threadId (#2)

* Raise slow RPC ack warning threshold to 15s (pingdotgg#1760)

* Use active worktree path for workspace saves (pingdotgg#1762)

* Stream git status updates over WebSocket (pingdotgg#1763)

Co-authored-by: codex <codex@users.noreply.github.com>

* fix(web): unwrap windows shell command wrappers (pingdotgg#1719)

* Rename "Chat" to "Build" in interaction mode toggle (pingdotgg#1769)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* Assign default capabilities to Codex custom models (pingdotgg#1793)

* Add project rename support in the sidebar (pingdotgg#1798)

* Support multi-select pending user inputs (pingdotgg#1797)

* Add Zed support to Open actions via editor command aliases (pingdotgg#1303)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* Closes pingdotgg#1795 - Support building and developing in a devcontainer (pingdotgg#1791)

* Add explicit timeouts to CI and release workflows (pingdotgg#1825)

* fix(web): distinguish singular/plural in pending action submit label (pingdotgg#1826)

* Refactor web stores into atomic slices ready to split ChatView (pingdotgg#1708)

* Add VSCode Insiders and VSCodium icons (pingdotgg#1847)

* Prepare datamodel for multi-environment (pingdotgg#1765)

Co-authored-by: justsomelegs <145564979+justsomelegs@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>

* Implement server auth bootstrap and pairing flow (pingdotgg#1768)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius@macmini.local>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>

* Use dev proxy for loopback auth and environment requests (pingdotgg#1853)

* Refresh local git status on turn completion (pingdotgg#1821)

Co-authored-by: codex <codex@users.noreply.github.com>

* fix(desktop): add Copy Link action for chat links (pingdotgg#1835)

* fix: map runtime modes to correct permission levels (pingdotgg#1587)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>

* Fix persisted composer image hydration typo (pingdotgg#1831)

* Clarify environment and workspace picker labels (pingdotgg#1854)

* Scope git toast state by thread ref (pingdotgg#1855)

* fix build (pingdotgg#1859)

* Stabilize keybindings toast stream setup (pingdotgg#1860)

Co-authored-by: Julius Marminge <julius@macmini.local>

* feat(web): add embeddable thread route for canvas tile hosts

Adds /embed/thread/:environmentId/:threadId — a standalone route that
renders the existing ChatView without the app sidebar chrome. This is the
iframe target for t3-canvas agent shapes (see rororowyourboat/t3-canvas#3).

- New file-based route embed.thread.\$environmentId.\$threadId.tsx
- __root.tsx bypasses AppSidebarLayout for any /embed/* pathname so the
  environment connection + websocket surface + toasts still initialize
  but the sidebar/diff/plan chrome does not render
- minimal=1 search param is parsed and wired to a data attribute on the
  container for future targeted CSS; chrome hiding (BranchToolbar,
  PlanSidebar, ThreadTerminalDrawer) stays as a follow-up pass
- routeTree.gen.ts regenerated by the @tanstack/router-plugin

---------

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: legs <145564979+justsomelegs@users.noreply.github.com>
Co-authored-by: sonder <168988030+heysonder@users.noreply.github.com>
Co-authored-by: Adem Ben Abdallah <96244394+AdemBenAbdallah@users.noreply.github.com>
Co-authored-by: Kyle Gottfried <6462596+Spitfire1900@users.noreply.github.com>
Co-authored-by: Jacob <589761+jvzijp@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius@macmini.local>
Co-authored-by: Klemencina <56873773+Klemencina@users.noreply.github.com>
Co-authored-by: Oskar Sekutowicz <me.oski646@gmail.com>
Co-authored-by: Noxire <59626436+noxire-dev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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.

3 participants