feat: per-pane monospace font size#9705
Conversation
|
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 |
|
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 Powered by Oz |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
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
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
UIZoomflag is enabled (UIZoom repurposesCmd+=/Cmd+-/Cmd+0for window zoom):UIZoom:Cmd+=/Cmd+-adjust the focused pane's font size (previously global).Cmd+0resets the focused pane's override back to the global default.UIZoom:Ctrl+Shift+>/Ctrl+Shift+<adjust the focused pane's font size (the=/-keys are taken bywindow zoom).
Cmd+0is bound toResetZoom, and now also clears the focused pane's font-size override — same key resets both.In both cases:
Implementation
HashMap<PaneId, f32>onPaneGroupFocusState; emits a newFontSizeOverrideChanged { pane_id }event withPaneFocusHandle::is_affectedfiltering to the matching pane.SizeUpdateBuilder::build,BlockListElement,BlockGridElement,AltScreenElement, and the prompt render helpers — so cell metrics and glyph painting always change together.EditorViewalready hadset_font_size; addedclear_font_sizeand madeset_font_sizeidempotent.Inputsyncs the editor's override on everyFontSizeOverrideChangedand once at focus-handle wiring time so a freshly split pane that inherits an override picks it up before its first render.close_pane(non-undo path),cleanup_closed_pane(undo grace expiry),remove_pane_for_move(pane leaves this group). TheUndoClosedPanesrestore path correctly preserves the override (we only forget on permanent removal).PaneIds aren't stable across restarts, so persisting wouldn't be meaningful.Linked Issue
Closes #6739.
ready-to-specorready-to-implement. (labeledReady-to-Implement)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):
Manual end-to-end testing in a local debug build (verified on both
UIZoomon and off):Cmd+0) works in both modesvim,htop)Presubmit:
./script/presubmit—cargo fmt,cargo clippy --workspace --all-targets --tests -- -D warnings,clang-format, andwgslfmt --checkall 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