Skip to content

fix(web): preserve terminal font size when splitting - #5444

Merged
maria-rcks merged 1 commit into
mainfrom
t3bot/fix-split-terminal-font-size
Aug 5, 2026
Merged

fix(web): preserve terminal font size when splitting#5444
maria-rcks merged 1 commit into
mainfrom
t3bot/fix-split-terminal-font-size

Conversation

@t3-code

@t3-code t3-code Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • keep the configured terminal font size when the terminal canvas is resized
  • fit split panes by recalculating rows and columns instead of shrinking glyphs
  • remove the obsolete 80-column font-shrinking heuristic and its unit test

Why

splitting a terminal narrowed each pane and caused fit() to nearly halve the configured font size. pane width should affect the grid dimensions, not override the user's appearance setting.

UI Changes

before

split panes with mismatched font sizes

after

split panes preserving the configured font size

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (not applicable, no animation changes)

Testing

  • pnpm exec vp run --filter @t3tools/web typecheck
  • pnpm --filter @t3tools/web test -- src/terminal/ghostty/surface.test.ts (207 files, 1,806 tests)
  • pnpm exec vp fmt --check apps/web/src/terminal/ghostty/surface.ts apps/web/src/terminal/ghostty/surface.test.ts
  • manually split a live terminal and verified both panes retain the same configured font size

Built with OpenAI GPT-5.4 via T3bot.

Note

Preserve terminal font size when splitting by removing auto-fit font size reduction in GhosttyTerminalSurface

Previously, fit() would reduce the font size via fittedTerminalFontSize to ensure at least 80 columns fit within the mount width, which caused the font size to shrink when splitting the terminal. Now, fit() only adjusts canvas dimensions and grid layout without modifying the font size. The fittedTerminalFontSize utility, its constants, and related tests are removed entirely.

  • Behavioral Change: The terminal font size is no longer auto-reduced on container resize or split; it stays at the last explicitly set value.

Macroscope summarized cab920b.


Note

Low Risk
Terminal rendering and resize behavior only; no auth, data, or API surface changes.

Overview
Split terminals no longer shrink glyphs when a pane gets narrower. The web Ghostty surface used to run an 80-column heuristic in fit() that lowered the rendered font size until the grid fit the canvas width, which made split panes look half-sized compared to the user’s setting.

This change drops fittedTerminalFontSize, the requestedFontSize tracking, and the related unit tests. Resize now only updates column/row counts from the mount size and fixed metrics; configured font size is unchanged on setFont and on layout reflow.

Reviewed by Cursor Bugbot for commit cab920b. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 5, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR removes the automatic font-size fitting feature, which is a user-facing behavior change: splitting terminals will no longer auto-shrink font size to fit 80 columns. While the code change is a clean removal, reverting recently-added user-visible behavior warrants human confirmation.

You can customize Macroscope's approvability policy. Learn more.

@maria-rcks
maria-rcks merged commit 30e4715 into main Aug 5, 2026
16 checks passed
@maria-rcks
maria-rcks deleted the t3bot/fix-split-terminal-font-size branch August 5, 2026 21:02
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant