Skip to content

refactor(ui): move "Open in VS Code" out of the git menu, next to Explorer / PowerShell - #179

Merged
mortenaslo merged 1 commit into
mainfrom
feat/open-in-vscode-toolbar
Nov 6, 2026
Merged

mortenaslo merged 1 commit into
mainfrom
feat/open-in-vscode-toolbar

Conversation

@mortenaslo

Copy link
Copy Markdown
Contributor

Summary

Moves Open in VS Code out of the git chip's menu. It is now a { } button on the terminal toolbar between >_ and 📁, and an item after "Open PowerShell here" in the sidebar right-click menu.

Why

Opening a folder in an editor isn't a git action, and it should work for a folder that isn't a repo — in the git menu it was only reachable from repos.

Implementation notes

  • New MainWindow.OpenIn.cs holds the lookup and launcher, moved unchanged from MainWindow.Git.cs: code.cmd on PATH → Code.exe, launched directly with the folder as one argv element (never through code.cmd/cmd.exe).
  • Shown only when VS Code was found and the session has a local folder (hidden for SSH). The toolbar button starts collapsed and appears once the off-thread lookup succeeds.
  • Making this configurable for other editors, other VS Code installs and WSL/SSH remotes is Open with…: configurable editors/IDEs instead of a hard-wired "Open in VS Code" #178.

Test plan

  • Builds with 0 warnings; unit tests pass (the 3 GitServiceThreadingTests that need a non-worktree checkout run in CI).
  • Live: { } appears between >_ and 📁 on a session whose folder is not a git repo (and no git chip there).
  • Manual: { } opens the folder in VS Code; sidebar right-click → "Open in VS Code" does the same; the git menu no longer has it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NsYm9iLc2aRnRDfV2uZRQX

…lorer / PowerShell

Opening a folder in an editor is not a git action, and it should work for a
folder that isn't a repo. It now lives in MainWindow.OpenIn.cs:

- a "{ }" button on the terminal toolbar between >_ and 📁, and
- "Open in VS Code" after "Open PowerShell here" in the sidebar right-click menu.

Both appear only when VS Code was found and the session has a local folder
(not SSH). The toolbar button starts collapsed and shows once the off-thread
lookup succeeds. The lookup and launch are unchanged: code.cmd on PATH →
Code.exe, launched directly with the folder as one argv element.

A configurable "Open with…" for other editors, other VS Code installs and
WSL/SSH remotes is #178.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NsYm9iLc2aRnRDfV2uZRQX
@mortenaslo
mortenaslo merged commit e91fda7 into main Nov 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant