Skip to content

desktop: stop cutting off the last row; default font 15 (0.2.5) - #6

Merged
ralyodio merged 1 commit into
mainfrom
fix/desktop-bottom-clip
Oct 6, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/desktop-bottom-clip

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Anthony: "the desktop app cuts/crops the bottom few pixels of the shell terminal unless i resize the window … very unprofessional", and "make default font size one size larger".

Cause. .pane had padding: 4px 0 0 6px under box-sizing: border-box. FitAddon computes rows from the parent's computed height, which under border-box includes the padding, and subtracts only the terminal element's own padding. Whenever the pane height left less than 4px to spare after whole rows, the fit added one row too many and the last row hung off the bottom. A resize "fixed" it only when the new height happened to land differently.

Fix

  • The inset moves to .pane .xterm; FitAddon subtracts that. .pane gets overflow: hidden as a backstop.
  • Refit when a font finishes loading (document.fonts loadingdone) and when the display scale changes (moving monitors, fractional scaling). Both change the cell size while the pane stays the same size.
  • The CI smoke test now fails with clipped: … if any pane's .xterm-screen extends past its pane.
  • The default font size goes from 14 to 15 (README updated).
  • Version 0.2.5.

node --check passes on main.js and app.js; layout tests: 6 pass.

🤖 Generated with Claude Code

The pane's padding sat on .pane, and FitAddon sizes rows from the parent's
computed height, which under border-box includes that padding. Whenever the
pane height left under 4px spare after whole rows, it fitted one row too many
and the bottom was clipped until a resize happened to land differently. The
inset now lives on .xterm, whose padding FitAddon subtracts.

Also refit when a font finishes loading or the display scale changes, and the
CI smoke test fails if any pane's screen extends past its pane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 6599450 into main Oct 6, 2026
4 checks passed
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.

1 participant