Skip to content

Support multi select grouping actions for vertical tabs#12229

Merged
johnturcoo merged 2 commits into
masterfrom
johnturco/app-4661-group-creation-from-multi-select-for-vertical-tabs
Jun 8, 2026
Merged

Support multi select grouping actions for vertical tabs#12229
johnturcoo merged 2 commits into
masterfrom
johnturco/app-4661-group-creation-from-multi-select-for-vertical-tabs

Conversation

@johnturcoo
Copy link
Copy Markdown
Contributor

@johnturcoo johnturcoo commented Jun 4, 2026

Description

Adds group operations to the vertical tabs multi-selection from the previous PR. When the user has multiple tabs selected (via shift-click or cmd-click), right-clicking any selected tab opens a new multi-tab menu with three actions: Create group from tabs, Move to group, and Remove from group.

Create group from tabs turns the selection into a new tab group at the top of the tab list. Move to group folds the selection into an existing group, anchored at the group's first member so the group doesn't visually move. Remove from group is available only when every selected tab shares the same group; the removed tabs land just below the group's remaining members, or in the same position if no remaining members existing.

NOTE: UI is not polished here and is going to be updated in a follow up PR.

How it works

Added new workspace actions for creating group, moving to group and removing from group when several tabs are selected. Helper functions containing the logic can be found in app/src/workspace/view/tab_grouping.rs. Important note:

  • Moving to group is possible if there is another group available for at least one of the selected tabs (ie Group 1 contains members A,B,C, tab list contains A,B,C,D. Selecting all 4 tabs allows move to group 1, since tab D can be moved to group 1).
    All other behavior for these actions should be as expected. Empty groups are deleted after any of these actions.

Added two new actions for clearing all selected tabs, and for toggling the multi-tab selection right click menu, which displays the "Move to group", "Remove from group" and "Create group from tabs" options. This menu is displayed on right click of a selected tab, otherwise the regular single-tab menu appears. Right click on a tab or pane branches on is_in_multi_tab_selection to determine which menu to display.

The "move to group" sidecar menu is now used for both the single-tab menu as well as the multi-tab selection menu, rendering is extracted into a shared function add_move_to_group_sidecar_overlay.

The only other thing to note here: Since we support cmd + click to select any individual tab, the active tab is always assumed to be selected when any other member is selected, but is only marked as selected for a range selection. This is important when determining which menu to display when right clicking the active tab, without needing to do additional bookkeeping on every cmd + click that toggles selected tabs.

Linked Issue

https://linear.app/warpdotdev/issue/APP-4661/group-creation-from-multi-select-for-vertical-tabs

Testing

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Demo video

This demo video shows a mix of shift + click range selection, cmd + click individual tab selection and a mix of different actions from the multi tab selection menu

@cla-bot cla-bot Bot added the cla-signed label Jun 4, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 4, 2026

@johnturcoo

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds multi-tab context-menu actions for vertical tabs, including creating a group from the current selection, moving selected tabs into an existing group, and removing selected tabs from a shared group. The attached Loom video satisfies the repository visual-evidence requirement, and no approved spec context was available for spec drift validation.

Concerns

  • Opening a regular pane/tab context menu from outside an active multi-selection clears the selection flags but does not clear show_tab_selection_right_click_menu. Because the selection menu reuses tab_right_click_menu, stale selection-menu state can leave both menu flags set and render/update the shared menu in multiple places. The same cleanup should be applied anywhere another context menu replaces the multi-selection menu.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/workspace/view/vertical_tabs.rs
Comment thread app/src/workspace/view/vertical_tabs.rs
if !any_flagged {
return Vec::new();
}
// Otherwise, the active tab must always be part of the multi tab selection.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This might be contentious with the following user story:

  • I have 5 tabs, 1 active
  • I'm just organizing my tabs and moving some to its own group with cmd-click
  • My active tab is not one of the ones I want to move

target: VerticalTabsPaneContextMenuTarget::ActivePane(active_pane_context_menu_target),
position,
});
let anchor = TabContextMenuAnchor::Pointer(position);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: we can maybe extract to a "on_right_click" handler if they're identical

@johnturcoo johnturcoo force-pushed the johnturco/app-4642-shift-click-range-group-selection branch from 70ac813 to c606da6 Compare June 7, 2026 15:42
Base automatically changed from johnturco/app-4642-shift-click-range-group-selection to master June 7, 2026 17:09
@johnturcoo johnturcoo force-pushed the johnturco/app-4661-group-creation-from-multi-select-for-vertical-tabs branch from cc95d6b to fa86d68 Compare June 7, 2026 17:29
@johnturcoo johnturcoo enabled auto-merge (squash) June 8, 2026 01:26
@johnturcoo johnturcoo merged commit b24fce3 into master Jun 8, 2026
25 checks passed
@johnturcoo johnturcoo deleted the johnturco/app-4661-group-creation-from-multi-select-for-vertical-tabs branch June 8, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants