Repository navigation
fix: stop the terminal's last row clipping under pane padding - #147
Merged
gsvprharsha merged 2 commits intoOct 20, 2026
Merged
Conversation
FitAddon sizes rows and cols from the computed height and width of xterm's parent element. .terminal-pane is border-box with 8px padding, so those values included 16px the terminal could not use. Fit could then add a row that overflowed the pane and got cut off at the bottom, plus up to two columns past the right edge. Use an 8px margin instead of padding so fit measures only the space xterm can draw in. The gutter looks the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xterm.css sets .xterm-viewport to #000, and xterm 6 applies the theme background only to the scrollable element that spans the rows. Rows rarely fill the pane exactly, so the leftover strip (up to one row high) below the last row showed as a black bar. Give the viewport the same --tempest-bg-editor color the terminal theme uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@lvanhouten is attempting to deploy a commit to the Tempest OSS Team on Vercel. A member of the Team first needs to authorize it. |
gsvprharsha
approved these changes
Oct 20, 2026
Collaborator
|
@lvanhouten Thank you so much for the PR. We have merged it into the main branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FitAddon sizes rows and cols from the computed height and width of xterm's parent element. .terminal-pane is border-box with 8px padding, so those values included 16px the terminal could not use. Fit could then add a row that overflowed the pane and got cut off at the bottom, plus up to two columns past the right edge.
Use an 8px margin instead of padding so fit measures only the space xterm can draw in. The gutter looks the same.
What changed
Two CSS changes in
TerminalPane.cssthat fix how the terminal fills its pane:.terminal-pane:padding: 8px→margin: 8px. FitAddon sizes rows and columns from the computed border-box of xterm's parent. Withbox-sizing: border-boxand padding, that counted 16px the terminal couldn't use, so fit often added a row that overflowed the pane and was clipped at the bottom, plus up to two columns past the right edge. A margin keeps the same gutter while fit measures only the space xterm can draw in..xterm-viewportbackground →var(--tempest-bg-editor).xterm.csspaints.xterm-viewport#000, and xterm 6 applies the theme background only to the scrollable element that spans the rows. Rows rarely fill the pane exactly, so a strip up to one row high is left below the last row. Without the overflowing row from (1) covering it, that strip showed as a black bar. The viewport now uses the same color as the terminal theme, so it follows theme changes.Splitting the gutter between padding and margin doesn't avoid either problem. Over 60 pane heights,
padding: 4px; margin: 4pxclipped the last row at 16 and showed the black strip at 24, so both changes are needed.Related issue
N/A
How was this tested
Harness (xterm 6.0.0 + addon-fit 0.11.0, same DOM and CSS as
TerminalPane), across 60 pane heights:Column count also drops from 81 to 79, the correct value.
Same harness in Playwright WebKit 26.6 (the macOS engine family): identical results.
Installed build on Windows 11: Claude Code's bottom status line, which used to be half cut off, now renders fully, with no bar below it.
Checklist
npx tsc --noEmitpassescargo checkpasses (if backend changed) - N/A, CSS only