Per-pane full-width tab mode with prominent title header

Merged
AZ
3mo ago
+966-106

Adds a per-pane fullWidthTabMode: when enabled, the pane header renders a prominent full-width title of the selected tab instead of the tab strip. Same height as the tab bar, live title updates, subtle index/count badge when more tabs exist, right-click anywhere on the header opens the selected tab's context menu (the exit path), no new-tab button. Adds TabContextAction.toggleFullWidthTab, per-pane controller API (setFullWidthTabMode/isFullWidthTabMode/toggleFullWidthTabMode/fullWidthTabModePaneIds), en+ja strings, and tests (163 passing).

Consumed by the cmux PR that wires this to the command palette and tab context menu (link added there once open).

šŸ¤– Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Adds a per-pane full-width tab mode that replaces the tab strip with a prominent, full-width title header for the selected tab. The header matches tab chrome, supports drag & drop, keeps key tab/pane actions, and toggling from context now selects the target tab first; it’s opt-in per pane.

  • New Features

    • Header shows the selected tab’s title and icon with live updates, adds an index/total badge, aligns with tab bar chrome (height, active indicator, separator), and respects tab bar visibility; no new‑tab button.
    • Preserves actions: right‑click opens the selected tab’s context menu with a toggleFullWidthTab item (label switches between ā€œFull Width Tabā€ and ā€œExit Full Width Tabā€); adds a tab switcher menu via the badge and a pane actions menu for configured split buttons (BonsplitConfiguration.splitButtons).
    • Dragging from the header starts a tab drag with preview; dropping .tabTransfer/.fileURL appends at the end with a focus‑aware hover highlight. A shared SplitViewController+TabDrag helper is used by the header, tab strip, and manual reorder.
    • BonsplitController handles TabContextAction.toggleFullWidthTab; adds onTabFullWidthToggleRequest for hosts, plus per‑pane APIs: setFullWidthTabMode(_:inPane:), isFullWidthTabMode(inPane:), toggleFullWidthTabMode(inPane:), fullWidthTabModePaneIds; en/ja strings and tests.
  • Bug Fixes

    • Toggling full‑width from a tab’s context menu selects that tab first to keep state consistent.
    • Cancelled tab drags clear state and restore one‑shot event monitor cleanup to prevent leaks.

Summary by CodeRabbit

  • New Features
    • Added Full Width Tab Mode with a dedicated full-width selected-tab header layout when enabled for a pane.
    • Added a context-menu action to enter/exit full-width tab mode; tab title/icon presentation updates accordingly.
    • Exposed controller APIs to query, set, and toggle full-width mode per pane, plus a list of pane IDs currently in that mode.
  • Bug Fixes
    • Full-width mode state is now reliably cleared when a pane is closed, including after split replacements.
  • Localization
    • Added translations for ā€œFull Width Tabā€ and ā€œExit Full Width Tabā€ in supported languages.