Skip to content

feat: maximize/zoom the focused split (ToggleSplitZoom)#1624

Open
nikicat wants to merge 3 commits into
raphamorim:mainfrom
nikicat:feat/split-zoom
Open

feat: maximize/zoom the focused split (ToggleSplitZoom)#1624
nikicat wants to merge 3 commits into
raphamorim:mainfrom
nikicat:feat/split-zoom

Conversation

@nikicat
Copy link
Copy Markdown

@nikicat nikicat commented May 30, 2026

Summary

Adds a tmux-style "zoom" action that temporarily expands the focused split to
fill the whole tab, toggling back to the exact prior layout on a second press
(FR #1615). Siblings are hidden via Taffy Display::None, so the zoomed panel
lays out identically to a lone panel while sibling processes keep running.

Details

  • New ToggleSplitZoom action, bound to Ctrl+Shift+X (Cmd+Shift+X on
    macOS), exposed via config (action = "ToggleSplitZoom") and the command palette.
  • Hidden panels collapse to zero area and are skipped by the resize, render,
    scrollbar, border and unfocused-dim passes via a new ContextGridItem::is_hidden().
  • Zoom is cleared automatically on split create/close and on split navigation.
  • A magnifier glyph (Nerd Font nf-fa-search, U+F002) marks a zoomed tab in the
    strip; for a single tab the strip is forced visible while zoomed to carry the
    indicator (the CSD title bar can't render the glyph). Island visibility now flows
    through one zoom-aware predicate (Navigation::island_visible_with) shared by the
    top-margin reservation, the render gate and input routing.

Testing

cargo test -p rioterm — adds layout/compute tests covering zoom hide/restore,
hidden-panel exclusion from resize/dim passes, and island re-reservation.

Closes #1615

🤖 Generated with Claude Code

nikicat and others added 3 commits May 30, 2026 17:19
Adds a tmux-style "zoom" action that temporarily expands the focused
split to fill the whole tab and toggles back to the exact prior layout
on a second press (FR raphamorim#1615). Siblings are hidden via Taffy
`Display::None`, so the zoomed panel lays out identically to a lone
panel while sibling processes keep running untouched.

Hidden panels collapse to zero area and are skipped by the resize,
render, scrollbar, border, and unfocused-dim passes via a new
`ContextGridItem::is_hidden()` predicate. The dim-overlay selection is
extracted to `ContextGrid::unfocused_panels()` so zoomed-away panels no
longer paint stale-sized shadows over the maximized panel. Zoom is
cleared automatically on split create/close and on split navigation.

Bound to Ctrl+Shift+X (Cmd+Shift+X on macOS) and exposed via config
(`action = "ToggleSplitZoom"`) and the command palette.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit e203941)
Surfaces when a tab has a maximized (zoomed) pane. The tab strip draws a
magnifier glyph (Nerd Font nf-fa-search, U+F002) on the left of any tab
whose grid is zoomed. For a single tab — where the strip is normally
hidden — the strip is forced visible while zoomed so it can carry the
indicator (the window title bar can't render the glyph: it's drawn by
sctk-adwaita with no font fallback).

Island visibility now flows through a single zoom-aware predicate,
`Navigation::island_visible_with(num_tabs, PaneZoom)`, used by the
top-margin reservation, the render gate, and input routing so they
agree. `PaneZoom` replaces a bare bool to avoid boolean blindness at the
call sites; `ContextManager::current_pane_zoom()` centralizes deriving it
from `grid_is_zoomed`. The reserved tab-bar height is re-synced on every
zoom change (toggle, split navigation, split, close) for single-tab
windows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit f795479)
Formatting-only; no behavior change. (CI `cargo fmt --check` gate.)

Co-Authored-By: Claude Opus 4.8 (1M context) <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.

[Feature Request] Add ToggleSplitZoom action to temporarily maximize the focused split (tmux-style)

1 participant