Skip to content

Tab drop settles into its slot (classic motion pass) - #282

Merged
teamleaderleo merged 8 commits into
mainfrom
motion/tab-drop-settle
Oct 11, 2026
Merged

teamleaderleo merged 8 commits into
mainfrom
motion/tab-drop-settle

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 11, 2026 •

Copy link
Copy Markdown

Summary

Classic cmux snaps a dropped tab: the drag image vanishes under the pointer and the tab appears in its new slot at once. A tab reordered within its strip now settles. The drop asks AppKit to slide the drag image into the slot where the pane placed the tab (animatesToDestination, pinned tabs first). The real tab draws nothing there until the drag session ends (or 0.5 s), so it never shows twice.

The drop lands at once, as before, in these cases:

  • under Reduce Motion;
  • for a tab from another pane (its emptied pane may close, and fill-width tabs narrow, so the layout changes under the slot);
  • for file drops;
  • for a slot that is not fully on screen (scrolled, or under the trailing button lane), where the strip scrolls to reveal the tab.

Only the tab row moves. No pane, terminal or browser view animates or resizes.

Testing

  • TabDropSettleTests, red then green. Red on 85a5b5f: the drops landed but animatesToDestination stayed off and the drag image frame was unchanged. Green on 4df2b47. It covers left and right reorders, an unpinned tab dropped among pinned tabs, the session end showing the tab, and Reduce Motion.
  • Full suite in CI: 275 tests, 0 failures.
  • Not yet seen on screen: whether AppKit ends the session only after the slide. If it ends sooner, the tab shows slightly early; it can never stay hidden past 0.5 s.

🤖 Generated with Claude Code

Red: the drop leaves animatesToDestination off, so AppKit drops the drag
image under the pointer while the tab appears in its slot at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a613db5c-8d42-473f-afa4-d7ca60230554

📥 Commits

Reviewing files that changed from the base of the PR and between 5e441ac and 4df2b47.


📒 Files selected for processing (7)
  • Sources/Bonsplit/Internal/Controllers/SplitViewController+TabDrag.swift
  • Sources/Bonsplit/Internal/Controllers/SplitViewController+TabSettle.swift
  • Sources/Bonsplit/Internal/Controllers/SplitViewController.swift
  • Sources/Bonsplit/Internal/Views/TabBarDropDestinationNSView.swift
  • Sources/Bonsplit/Internal/Views/TabBarItemGeometryRegistry.swift
  • Sources/Bonsplit/Internal/Views/TabBarView.swift
  • Tests/BonsplitTests/TabDropSettleTests.swift

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

teamleaderleo and others added 7 commits October 11, 2026 14:43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The drop asks AppKit to slide the drag image to the slot the tab takes
(animatesToDestination, the item's frame read from the strip before the
move reflows it). The tab draws nothing there until the drag session ends
(or 0.5 s), so the gliding image and the tab never show twice. Reduce
Motion keeps the drop instant. Only the tab row moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w only

Review and CI:
- The slot comes from the tab's index after the drop (pinned tabs stay
  first), measured on the strip as it was before the drop.
- Only a drop carrying a tab transfer settles: a file dropped while a stale
  tab session lingers no longer hides that tab.
- A slot not fully in view (the strip scrolls to reveal it) lands at once.
- Tests pin reducesMotion off: the CI runner's setting decided them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: a tab from another pane lands in a layout that changes under it
(its emptied pane closes and the strip widens; fill-width tabs narrow), and
the old visible check let a slot half under the pinned tabs of a scrolled
strip settle before the strip scrolled. Settling now needs a reorder within
the strip with every tab the slot passes fully on screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: the clip view runs under the split-button lane, so a slot there
counted as on screen, then the strip scrolled to reveal the selected tab.
Every tab the slot passes must lie in the viewport outside that lane, the
width the strip's own reveal uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: pinned tabs sit before the scrolling viewport, so the viewport
check refused every pinned reorder. A reorder never crosses the pinned
boundary, so pinned tabs skip it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit d76aeb4 into main Oct 11, 2026
5 checks passed
teamleaderleo added a commit to manaflow-ai/cmux that referenced this pull request Oct 12, 2026
main moved bonsplit to bc0d6dd (#19672); classic/tab-drop-settle-2 is
that commit plus manaflow-ai/bonsplit#282 and nothing else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit to manaflow-ai/cmux that referenced this pull request Oct 12, 2026
…19593)

* Bonsplit: a tab reordered by drag settles into its slot

Bumps vendor/bonsplit to classic/tab-drop-settle: the current pin plus
manaflow-ai/bonsplit#282 only (bonsplit main also carries #272/#273, which
this does not ship). A tab dropped within its strip slides into its slot
instead of vanishing under the pointer; Reduce Motion and drops from other
panes stay instant. Only the tab row moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Bump bonsplit: main's pin plus the tab drop settle (#282)

main moved bonsplit to bc0d6dd (#19672); classic/tab-drop-settle-2 is
that commit plus manaflow-ai/bonsplit#282 and nothing else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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