Skip to content

feat: double-click pane tab to toggle zoom#28

Open
STRML wants to merge 2 commits intomanaflow-ai:mainfrom
STRML:feat/double-click-tab-zoom
Open

feat: double-click pane tab to toggle zoom#28
STRML wants to merge 2 commits intomanaflow-ai:mainfrom
STRML:feat/double-click-tab-zoom

Conversation

@STRML
Copy link
Copy Markdown

@STRML STRML commented Mar 16, 2026

Summary

  • Adds a double-tap gesture on TabItemView that calls the existing onZoomToggle() callback
  • Double-clicking a tab title in the pane tab bar toggles pane zoom (maximizes/restores that pane within the split layout)
  • 3-line addition — .onTapGesture(count: 2) placed before the existing single-tap handler

Parent cmux PR: manaflow-ai/cmux#1422

Test plan

  • Open a workspace with multiple splits
  • Double-click a tab title → pane should zoom to fill the content area
  • Double-click again → splits should restore
  • Single-click still selects tabs
  • Middle-click still closes tabs
  • Right-click context menu still works

Summary by cubic

Double-clicking a pane tab now toggles zoom to quickly maximize/restore a split. Added a host callback to detect user-initiated tab closes.

  • New Features
    • Double-click a tab title to toggle pane zoom within the split layout.
    • New onTabCloseRequest in BonsplitController fires when a user closes a tab from the tab strip, allowing hosts to handle workspace-close logic.

Written for commit ad798c5. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Double-tap on tabs to toggle zoom functionality.
    • Added a new callback hook to intercept and respond to tab close requests, enabling custom close-handling behavior.

austinywang and others added 2 commits March 13, 2026 12:43
Allows the host application to distinguish user-initiated tab closes
(clicking the X button) from internal/programmatic closes, so it can
decide whether closing the last surface should also close the workspace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c797d92f-65c8-4c67-9eda-7763f519df5a

📥 Commits

Reviewing files that changed from the base of the PR and between 505181f and ad798c5.

📒 Files selected for processing (3)
  • Sources/Bonsplit/Internal/Views/TabBarView.swift
  • Sources/Bonsplit/Internal/Views/TabItemView.swift
  • Sources/Bonsplit/Public/BonsplitController.swift

📝 Walkthrough

Walkthrough

The pull request introduces two new public-facing APIs: a tab-close request callback in BonsplitController that fires before actual tab closure, and a double-tap gesture on tab items to trigger zoom toggling. Both additions are invoked at their respective interaction points without altering existing control flow.

Changes

Cohort / File(s) Summary
Tab Close Request Callback
Sources/Bonsplit/Public/BonsplitController.swift, Sources/Bonsplit/Internal/Views/TabBarView.swift
Added new public optional callback property onTabCloseRequest to BonsplitController with @ObservationIgnored annotation. Invoked in the tab close handler before the actual close action to allow interception of tab-close requests.
Tab Double-Tap Zoom Toggle
Sources/Bonsplit/Internal/Views/TabItemView.swift
Added double-tap gesture recognizer to trigger onZoomToggle callback, coexisting with existing single-tap select and middle-click close behaviors.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A double-tap makes tabs zoom in and out,
Callbacks whisper "close!" before the shutdown—
Two gentle hooks for UI delight,
Bonsplit grows kinder with each interact! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main feature being added—a double-click gesture on pane tabs to toggle zoom—which is the primary change in the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

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