Skip to content

Conversation

@ishanray
Copy link
Contributor

@ishanray ishanray commented Feb 4, 2026

Add a quick branch switcher modal accessible via cmd+b (configurable):

  • New BranchSwitcherPrompt component for branch selection UI
  • useBranchSwitcher hook for managing switcher state and logic
  • useBranchSwitcherShortcut hook for keyboard shortcut handling
  • Settings integration for customizing the shortcut
  • Support switching to branches in linked worktrees
image

Small unrelated fix:

  • Fix cmd+n shortcut to ignore shift key combinations (otherwise new worktree agent keyboard shortcut wasn't working)
  • Fix notification compilation on release builds

Add a quick branch switcher modal accessible via cmd+b (configurable):
- New BranchSwitcherPrompt component for branch selection UI
- useBranchSwitcher hook for managing switcher state and logic
- useBranchSwitcherShortcut hook for keyboard shortcut handling
- Settings integration for customizing the shortcut
- Support switching to branches in linked worktrees
- Fix cmd+n shortcut to ignore shift key combinations
- Fix notification compilation on release builds
@ishanray
Copy link
Contributor Author

ishanray commented Feb 4, 2026

There is also a git related issue that I fixed in a separate PR: #332

That bug was causing issues with the head of the checked out branch being unclean.

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1947bb3f9

ℹ️ 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".

Comment on lines 28 to 31
return (
workspaces.find(
(ws) => ws.kind === "worktree" && ws.worktree?.branch === branch,
) ?? null

Choose a reason for hiding this comment

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

P2 Badge Filter worktree matches to active workspace

The branch switcher treats any worktree with the same branch name as a match, regardless of which repo it belongs to. If the user has multiple workspaces with common branch names like main or develop, selecting a branch from the active repo can incorrectly switch to an unrelated worktree from a different repo because getWorktreeByBranch scans the full workspaces list. This only happens when there is at least one other worktree sharing the branch name, but in that case the switcher jumps to the wrong workspace. Consider restricting the search to worktrees whose parentId (or repo root) matches the active workspace.

Useful? React with 👍 / 👎.

@Dimillian Dimillian merged commit 83a37da into Dimillian:main Feb 4, 2026
4 checks 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.

2 participants