macos: add split-button toolbar item for opening in external editors#10
macos: add split-button toolbar item for opening in external editors#10
Conversation
Adds a native split-button dropdown to the toolbar that opens the current working directory in an external editor. Clicking the button opens in the last-used editor; the dropdown arrow reveals a menu of all installed editors grouped by category (code editors, Git clients, Finder). The last-used editor is persisted across sessions. Supported editors: Cursor, VS Code, VSCodium, Zed, Sublime Text, Nova, TextMate, Xcode, JetBrains IDEs (IntelliJ, WebStorm, PyCharm, GoLand, RubyMine, CLion, Rider, PHPStorm, Fleet), Tower, Fork, GitKraken, Sourcetree, GitHub Desktop, and Finder.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f5447b486
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| switch worktrunkSidebarState.selection { | ||
| case .worktree(_, let path): | ||
| return path | ||
| case .session(_, _, let worktreePath): | ||
| return worktreePath |
There was a problem hiding this comment.
Use focused terminal cwd before sidebar selection
currentEditorPath() currently returns the selected worktree/session path whenever the sidebar has a selection, which means the new toolbar action opens the worktree root instead of the active terminal's actual pwd for common cases like working in a subdirectory. In practice, users clicking “Open in Editor” from a tab at /repo/subdir will be sent to /repo if the sidebar selection is on that worktree/session, so the feature does not open the current working directory as intended.
Useful? React with 👍 / 👎.
Adds a native split-button dropdown to the toolbar that opens the current working directory in an external editor. Clicking the button opens in the last-used editor; the dropdown arrow reveals a menu of all installed editors grouped by category (code editors, Git clients, Finder). The last-used editor is persisted across sessions.
Supported editors: Cursor, VS Code, VSCodium, Zed, Sublime Text, Nova, TextMate, Xcode, JetBrains IDEs (IntelliJ, WebStorm, PyCharm, GoLand, RubyMine, CLion, Rider, PHPStorm, Fleet), Tower, Fork, GitKraken, Sourcetree, GitHub Desktop, and Finder.