# Add open-in-editor feature with Cmd\+O shortcut \(\#2\) · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/eef57db955614e346091769bc6d4e80e0068e9b6)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: eef57db955614e346091769bc6d4e80e0068e9b6

Requested commit: eef57db955614e346091769bc6d4e80e0068e9b6

Commit: eef57db955614e346091769bc6d4e80e0068e9b6

Tree: 1b088f6d4b9ac2e5b6f2a440ede56b5c956eb5dd

Author: Julius Marminge

Committer: GitHub

## Message

```
Add open-in-editor feature with Cmd+O shortcut (#2)

* Add open-in-editor feature with Cmd+O shortcut

Add dropdown in header to open workspace in Cursor or system file manager (Finder/Explorer/Files). Include Cmd+O/Ctrl+O global keyboard shortcut to open in last-used editor, persisted to localStorage.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Move editor definitions to contracts for strict IPC typing

EDITORS config and EditorId type now live in @acme/contracts so the
shell.openInEditor IPC channel is strictly typed end-to-end. The main
process uses the contract's command field (null = file manager via
shell.openPath).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix biome formatting issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add error handling and address review feedback

- Validate cwd is non-empty in shell:open-in-editor IPC handler
- Check shell.openPath() return value and throw on error
- Attach spawn error listener to prevent crashes from missing CLI
- Validate localStorage lastEditor against known EDITORS list
- Only call preventDefault() for Cmd+O when action will run

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
```

## Parents

- [7a68e570eb821e5e905d5c8cee71a8aceff7be95](https://git.cafe/pingdotgg/t3code/commit/7a68e570eb821e5e905d5c8cee71a8aceff7be95?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/eef57db955614e346091769bc6d4e80e0068e9b6?format=markdown)
