Skip to content

Implement dragging actions for vertical tab groups#12000

Merged
johnturcoo merged 3 commits into
masterfrom
johnturco/app-4619-vertical-tab-group-dragging-support
Jun 1, 2026
Merged

Implement dragging actions for vertical tab groups#12000
johnturcoo merged 3 commits into
masterfrom
johnturco/app-4619-vertical-tab-group-dragging-support

Conversation

@johnturcoo
Copy link
Copy Markdown
Contributor

@johnturcoo johnturcoo commented Jun 1, 2026

Description

Adds drag-and-drop reordering for vertical tab groups. Users can drag a group to reorder it as a block. Single tabs can also be dragged into and out of an expanded group.

Changes

New actions (app/src/workspace/action.rs): StartGroupDrag, DragGroup, DropGroup

Group drag handler (app/src/workspace/view.rs):

  • on_group_drag — block reorder via move_group_block when the dragged header's midpoint crosses an above/below neighbor's midpoint
  • target_group_at_y — hit-tests group container rects (with a 6px edge margin so the ungrouped zone between adjacent groups is reachable)
  • neighbor_drag_rect — substitutes the group container's rect for stale per-tab rects when a neighbor lives inside a collapsed group.
  • assign_tab_to_group — flips tabs[i].group_id for cross-group transitions during a tab drag

Nested-Draggable support (crates/warpui_core/src/elements/drag/draggable.rs, crates/warpui_core/src/presenter.rs):

  • New Draggable::with_defer_to_handled_child_mouse_down() builder. When the flag is set, the Draggable yields its mouse-down to any descendant Draggable that already claimed the event.
  • New EventContext::descendant_draggable_initiated flag — set unconditionally when a Draggable claims a mouse-down, read only by Draggables that opt into deferral.
  • Backward-compatible: existing Draggables don't opt in, so existing drag behavior is unaffected.
  • This allows proper handling of nested draggable elements

Linked Issue

https://linear.app/warpdotdev/issue/APP-4619/vertical-tab-group-dragging-support

Testing

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

Screenshots / Videos

Demo video

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

oz-for-oss Bot commented Jun 1, 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

@johnturcoo johnturcoo changed the title Implement drag and drop for vertical tab groups Implement dragging actions for vertical tab groups Jun 1, 2026
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 vertical tab group drag-and-drop support plus nested-draggable deferral plumbing. I found two blocking correctness issues in the tab/group drag behavior. No security-specific findings were identified, and the provided spec context did not include approved requirements to compare against.

Concerns

  • Dragging a tab into a non-adjacent expanded group only flips group_id and returns, while the renderer only groups consecutive tabs. This can split one logical group into multiple rendered containers and leave later group-block operations working on an invalid range.
  • Skipping the per-tab draggable for a sole group member means the only tab in a group cannot be dragged out to dissolve/prune that group.

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.rs
@peicodes peicodes self-requested a review June 1, 2026 15:13
@peicodes
Copy link
Copy Markdown
Contributor

peicodes commented Jun 1, 2026

Can we verify what the behavior is when cross-window tab dragging is enabled? Two things I wanna test:

  • Does dragging a tab out into a new window still work?
  • Does dragging a tab from one window to another still work?
  • What happens if I try to drag a group out?
  • What happens if I try to drag a tab within a group out?
  • What happens if I try to drag a tab from one window into another window's tab group?

@johnturcoo
Copy link
Copy Markdown
Contributor Author

johnturcoo commented Jun 1, 2026

@peicodes To answer your questions:

  • Does dragging a tab out into a new window still work?
    Yes
  • Does dragging a tab from one window to another still work?
    Yes
  • What happens if I try to drag a group out?
    Currently you can not drag a group out.
  • What happens if I try to drag a tab within a group out?
    Works as expected, the group does not update until tab is released, but this should be a minor fix.
  • What happens if I try to drag a tab from one window into another window's tab group?
    Currently this does not work, it can only be dropped into the vertical tab pane outside of groups.

I don't think any of these are blocking, IMO. I want to land this by eod so it can be on dogfood tmw for feedback. I will address these bugs as fast follows.

Loom for reference: https://www.loom.com/share/ccb7253b50c74e2f95a7b9f8ccbfef09

@johnturcoo johnturcoo force-pushed the johnturco/app-4622-tab-group-more-options-menu-actions branch from f564a5f to b290b3f Compare June 1, 2026 19:21
@johnturcoo johnturcoo force-pushed the johnturco/app-4619-vertical-tab-group-dragging-support branch from 22bae9e to 2672d09 Compare June 1, 2026 20:28
Base automatically changed from johnturco/app-4622-tab-group-more-options-menu-actions to master June 1, 2026 20:36
@johnturcoo johnturcoo force-pushed the johnturco/app-4619-vertical-tab-group-dragging-support branch from 2672d09 to 03eeb47 Compare June 1, 2026 20:48
@johnturcoo johnturcoo enabled auto-merge (squash) June 1, 2026 20:48
@johnturcoo johnturcoo merged commit 662bd73 into master Jun 1, 2026
25 checks passed
@johnturcoo johnturcoo deleted the johnturco/app-4619-vertical-tab-group-dragging-support branch June 1, 2026 21:41
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