Skip to content

feat: per-pane monospace font size#9705

Open
wpoulin wants to merge 1 commit intowarpdotdev:masterfrom
wpoulin:wpoulin/per-pane-font-size
Open

feat: per-pane monospace font size#9705
wpoulin wants to merge 1 commit intowarpdotdev:masterfrom
wpoulin:wpoulin/per-pane-font-size

Conversation

@wpoulin
Copy link
Copy Markdown

@wpoulin wpoulin commented May 1, 2026

Description

Adds independent monospace font-size control for each terminal pane (issue #6739). Previously the font-size shortcuts adjusted every Warp window globally; now each pane can have its own size, so users can shrink the text in one pane to see more output while keeping a sibling pane large for readability.

User-visible behavior

The shortcuts depend on whether the UIZoom flag is enabled (UIZoom repurposes Cmd+= / Cmd+- / Cmd+0 for window zoom):

  • Without UIZoom: Cmd+= / Cmd+- adjust the focused pane's font size (previously global). Cmd+0 resets the focused pane's override back to the global default.
  • With UIZoom: Ctrl+Shift+> / Ctrl+Shift+< adjust the focused pane's font size (the = / - keys are taken by
    window zoom). Cmd+0 is bound to ResetZoom, and now also clears the focused pane's font-size override — same key resets both.

In both cases:

  • The terminal grid, prompt, alt-screen, and the input editor where the user types all pick up the pane's effective font size — no glyph/cell mismatch and no leftover full-size input box. UI chrome (banners, menus, AI mode indicators) intentionally stays on the global so per-pane overlays don't change size as you adjust the terminal text.
  • The Settings UI's monospace font size slider continues to write the global; panes without an override continue to follow it.

Implementation

  • Per-pane override is stored as HashMap<PaneId, f32> on PaneGroupFocusState; emits a new FontSizeOverrideChanged { pane_id } event with PaneFocusHandle::is_affected filtering to the matching pane.
  • The render path is threaded with the pane's effective size — SizeUpdateBuilder::build, BlockListElement,
    BlockGridElement, AltScreenElement, and the prompt render helpers — so cell metrics and glyph painting always change together.
  • EditorView already had set_font_size; added clear_font_size and made set_font_size idempotent. Input syncs the editor's override on every FontSizeOverrideChanged and once at focus-handle wiring time so a freshly split pane that inherits an override picks it up before its first render.
  • Override entries are dropped on permanent pane removal — close_pane (non-undo path), cleanup_closed_pane (undo grace expiry), remove_pane_for_move (pane leaves this group). The UndoClosedPanes restore path correctly preserves the override (we only forget on permanent removal).
  • Override is in-memory only by design: PaneIds aren't stable across restarts, so persisting wouldn't be meaningful.

Linked Issue

Closes #6739.

  • The linked issue is labeled ready-to-spec or ready-to-implement. (labeled Ready-to-Implement)
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for
    user-visible or UI changes).

Screenshots / Videos

Screen.Recording.2026-04-30.at.11.28.16.PM.mov

Split the window into two panes, then increase the font size in one pane and decrease it in the other — each pane scales independently. Resetting returns both panes to the default size.

Testing

Unit tests added (8 total, all passing):

  • Cover override behavior, precedence over global, cleanup, no-ops, event targeting, and editor integration

Manual end-to-end testing in a local debug build (verified on both UIZoom on and off):

  • Verified independent resizing across panes
  • Reset behavior (Cmd+0) works in both modes
  • Global font changes don’t affect overridden panes
  • Works correctly in alt-screen apps (vim, htop)
  • Overrides persist through undo-close, but not permanent close

Presubmit: ./script/presubmitcargo fmt, cargo clippy --workspace --all-targets --tests -- -D warnings,
clang-format, and wgslfmt --check all clean.

Known limitation (out of scope, follow-up issue suggested): Per-pane override is dropped when a pane is dragged to another window — the destination group starts at the global default. Preserving across moves would need override state to live on pane content metadata; left for a separate PR.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 1, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @wpoulin on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 1, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@wpoulin

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @vkodithala.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@wpoulin
Copy link
Copy Markdown
Author

wpoulin commented May 1, 2026

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 1, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 1, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds in-memory per-pane monospace font-size overrides, routes the effective pane font size through terminal sizing/render paths, and syncs the embedded input editor with pane-level override changes.

Concerns

  • No blocking correctness, security, error-handling, or performance concerns found in the inlined diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from vkodithala May 1, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for per window font size

1 participant