Skip to content

Add sidebar tab context menu actions#32

Merged
nicosuave merged 2 commits intomainfrom
close-sidebar-tab
Mar 7, 2026
Merged

Add sidebar tab context menu actions#32
nicosuave merged 2 commits intomainfrom
close-sidebar-tab

Conversation

@nicosuave
Copy link
Member

  • add Close Tab to sidebar tab rows and route it to the exact native tab window behind the row
  • add the same Remove Worktree… and Reveal in Finder actions used by regular worktree rows
  • keep the existing remove-worktree disable behavior for main worktrees

Verified with zig build test.

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: bc329d2ea3

ℹ️ 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 +900 to +901
guard let tabGroup = window.tabGroup else { return }
guard let targetWindow = tabGroup.windows.first(where: { $0.windowNumber == windowNumber }) else { return }

Choose a reason for hiding this comment

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

P2 Badge Close tab when no native tab group exists

The new sidebar Close Tab action becomes a no-op when the current window is not in an AppKit tab group (for example, a single window/tab setup), because closeNativeTab returns early on window.tabGroup == nil instead of delegating to closeTab(_:). This means users can see the context-menu action but it silently does nothing in that common state.

Useful? React with 👍 / 👎.

@nicosuave nicosuave merged commit bb6e7a6 into main Mar 7, 2026
120 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.

1 participant