Skip to content

Add zoom/maximize focused pane in splits - #634

Merged
lawrencecchen merged 1 commit into
mainfrom
issue-136-zoom-pane
Feb 27, 2026
Merged

lawrencecchen merged 1 commit into
mainfrom
issue-136-zoom-pane

Conversation

@lawrencecchen

Copy link
Copy Markdown
Contributor

Summary

  • Cmd+Shift+Enter toggles zoom on the focused pane, expanding it to fill the workspace
  • Splitting (Cmd+D, Cmd+Shift+D) or creating new tabs (Cmd+T) auto-unzooms
  • Zoom state shown as icon indicator in sidebar tab
  • Customizable shortcut via Settings (KeyboardShortcutSettings)
  • Includes bonsplit zoom toggle support (vendor/bonsplit updated)

Closes #136

Test plan

  • Cmd+Shift+Enter toggles zoom on focused pane
  • Cmd+D / Cmd+Shift+D / Cmd+T auto-unzooms
  • Zoom icon appears in sidebar tab when zoomed
  • Shortcut customizable in Settings

Cmd+Shift+Enter toggles zoom on the focused pane, expanding it to fill
the workspace. Splitting or creating new tabs auto-unzooms. Zoom state
shown as icon in sidebar tab. Includes bonsplit zoom toggle support.

Closes #136
@vercel

vercel Bot commented Feb 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Building Building Preview, Comment Feb 27, 2026 9:46am

@coderabbitai

coderabbitai Bot commented Feb 27, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@lawrencecchen has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between dca8992 and 20cb164.

📒 Files selected for processing (6)
  • Sources/AppDelegate.swift
  • Sources/ContentView.swift
  • Sources/KeyboardShortcutSettings.swift
  • Sources/TabManager.swift
  • Sources/Workspace.swift
  • vendor/bonsplit
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-136-zoom-pane

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

@greptile-apps

greptile-apps Bot commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Implemented pane zoom/maximize functionality for split terminal layouts.

  • Added Cmd+Shift+Enter keyboard shortcut to toggle zoom on the focused pane, expanding it to fill the workspace
  • Integrated with bonsplit submodule (updated to c4b8f5c) for zoom state management and UI indicators
  • Implemented auto-unzoom behavior when creating new splits (Cmd+D, Cmd+Shift+D) or new tabs (Cmd+T)
  • Added command palette entry with context-aware availability (only shown for terminal panels with splits)
  • Configured context menu shortcuts mapping for zoom, rename, and new terminal actions
  • Extended keyboard shortcut system to support Return key (↩) with proper keyCode handling (36, 76 for Return and Keypad Enter)

The implementation follows existing patterns in the codebase and integrates cleanly with the BonsplitController API.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Clean implementation that follows existing codebase patterns. The zoom feature is well-integrated across all necessary layers (keyboard shortcuts, command palette, context menus, and workspace management). Auto-unzoom behavior prevents confusing states. The submodule update provides the core zoom functionality. No logic errors, security issues, or architectural concerns identified.
  • No files require special attention

Important Files Changed

Filename Overview
Sources/AppDelegate.swift Added keyboard shortcut handling for toggle split zoom (Cmd+Shift+Return) and Return key support in shortcut matching
Sources/ContentView.swift Added command palette entry for "Toggle Pane Zoom" with proper context filtering for terminal panels with splits
Sources/KeyboardShortcutSettings.swift Added toggleSplitZoom action with Cmd+Shift+Return default, including Return key (↩) display and keyCode mappings (36, 76)
Sources/TabManager.swift Implemented zoom toggle logic and auto-unzoom behavior when creating new surfaces, splits, or browser splits
Sources/Workspace.swift Integrated BonsplitController zoom methods, added context menu shortcuts mapping, and handled toggleZoom context action
vendor/bonsplit Updated bonsplit submodule to c4b8f5c to add zoom/maximize functionality for panes

Sequence Diagram

sequenceDiagram
    participant User
    participant AppDelegate
    participant TabManager
    participant Workspace
    participant BonsplitController
    
    Note over User: Cmd+Shift+Enter pressed
    User->>AppDelegate: Key event
    AppDelegate->>AppDelegate: matchShortcut(toggleSplitZoom)
    AppDelegate->>TabManager: toggleFocusedSplitZoom()
    TabManager->>Workspace: toggleSplitZoom(panelId)
    Workspace->>Workspace: paneId(forPanelId)
    Workspace->>BonsplitController: togglePaneZoom(inPane)
    BonsplitController-->>Workspace: Bool (success)
    alt Zoom succeeded
        Workspace->>Workspace: focusPanel(panelId)
        Workspace-->>TabManager: true
        TabManager-->>AppDelegate: true
    else Zoom failed
        Workspace-->>TabManager: false
        TabManager-->>AppDelegate: false
    end
    
    Note over User: Auto-unzoom on split/tab creation
    User->>AppDelegate: Cmd+D (split) or Cmd+T (new tab)
    AppDelegate->>TabManager: createSplit() or newSurface()
    TabManager->>Workspace: clearSplitZoom()
    Workspace->>BonsplitController: clearPaneZoom()
    BonsplitController-->>Workspace: Bool
    TabManager->>TabManager: Create split/surface
Loading

Last reviewed commit: 20cb164

@lawrencecchen
lawrencecchen merged commit 978341b into main Feb 27, 2026
8 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 20cb164989

ℹ️ 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 thread Sources/Workspace.swift
appearance: appearance
)
self.bonsplitController = BonsplitController(configuration: config)
bonsplitController.contextMenuShortcuts = Self.buildContextMenuShortcuts()

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.

P2 Badge Refresh context-menu shortcuts after settings updates

contextMenuShortcuts is initialized once per workspace, but shortcut values are user-editable at runtime; after changing toggleSplitZoom (or the other mapped actions) in Settings, existing workspaces keep the old context-menu key equivalents because this dictionary is never rebuilt. That leaves the UI out of sync with the active shortcuts until the workspace is recreated or the app restarts, so this should be refreshed alongside the existing shortcut-change observers.

Useful? React with 👍 / 👎.

0xble added a commit to 0xble/cmux that referenced this pull request Mar 7, 2026
bn-l pushed a commit to bn-l/cmux that referenced this pull request Apr 3, 2026
Cmd+Shift+Enter toggles zoom on the focused pane, expanding it to fill
the workspace. Splitting or creating new tabs auto-unzooms. Zoom state
shown as icon in sidebar tab. Includes bonsplit zoom toggle support.

Closes manaflow-ai#136

This branch was successfully deployed

1 active deployment
Preview — 20cb1649 Deployed Feb 27, 2026 by vercel[bot]
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.

Zoom / auto-resize focused pane in splits

1 participant