Skip to content

Add workspace open targets and Ghostty support#952

Open
copypasteitworks wants to merge 2 commits intopingdotgg:mainfrom
copypasteitworks:pr/ghostty-open-target
Open

Add workspace open targets and Ghostty support#952
copypasteitworks wants to merge 2 commits intopingdotgg:mainfrom
copypasteitworks:pr/ghostty-open-target

Conversation

@copypasteitworks
Copy link

@copypasteitworks copypasteitworks commented Mar 12, 2026

Summary

Adds support for opening a workspace with broader open targets instead of editors only.

This PR:

  • adds a new shell.openWorkspace websocket/native API method
  • introduces shared WorkspaceOpenTargetId contracts
  • exposes availableOpenTargets from the server config
  • adds Ghostty as a supported workspace target
  • keeps the existing favorite editor and primary Open button behavior unchanged
  • updates the chat header open menu to show available workspace targets

Behavior

  • If Ghostty is installed and supported on the current platform, it appears in the Open menu.
  • If Ghostty is not installed, it is omitted from the available targets and nothing changes for the user.
  • The primary Open button still uses the preferred editor and does not switch to Ghostty.

Validation

Passed:

  • bun fmt
  • bun lint
  • bun typecheck

Targeted tests passed:

  • bun run test src/open.test.ts src/wsServer.test.ts in apps/server
  • bun run test src/openTarget.test.ts src/ws.test.ts in packages/contracts
  • bun run test src/wsNativeApi.test.ts src/terminalStateStore.test.ts in apps/web

Note

Add Ghostty terminal as a workspace open target in the Open menu

  • Adds a WORKSPACE_OPEN_TARGETS contract and WorkspaceOpenTargetId type in packages/contracts/src/openTarget.ts, plus a new shell.openWorkspace WebSocket method.
  • Server computes availableOpenTargets (including Ghostty when detected) and returns it in getConfig; a new openWorkspace RPC routes to the Open service.
  • Ghostty launch uses AppleScript (osascript) on macOS and the ghostty CLI on Linux; unsupported platforms return an error.
  • OpenInPicker renders Ghostty alongside editors, invokes shell.openWorkspace for it, and skips updating the saved last-editor preference when Ghostty is selected.

Macroscope summarized f01e46d.

- add shared open-target contracts and websocket methods for `shell.openWorkspace`
- implement server resolution/launch logic for workspace targets, including Ghostty
- update Open menu UI to list workspace targets without changing preferred editor
- extend tests across contracts, server, and web for new open-target behavior
@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 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: 7f84d80e-9607-4331-84a9-a09382802f94

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
  • Post copyable unit tests in a comment

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 the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants