fix: sync PTY size on connect and refocus terminal after command buttons#3
Merged
Merged
Conversation
Two related UX fixes: PTY size sync: connectTab/connectTabLocal/sshOpenPty are called with placeholder cols/rows (80x24, 100x30) before the terminal has reported its real fitted size. xterm.onResize only fires on size *changes*, so once xterm settled at e.g. 60 rows it never told the PTY, leaving dead rows at the bottom — particularly visible when running `screen` over a serial console, where screen's window inherits the local PTY size. Push the actual fitted dims to the PTY explicitly when sessionId becomes available (main term) and right after fit() (side term). Command-bar focus: after sending a button's command, return focus to the active terminal so the user can keep typing without an extra click. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Two related UX fixes:
PTY size sync: connectTab/connectTabLocal/sshOpenPty are called with placeholder cols/rows (80x24, 100x30) before the terminal has reported its real fitted size. xterm.onResize only fires on size changes, so once xterm settled at e.g. 60 rows it never told the PTY, leaving dead rows at the bottom — particularly visible when running
screenover a serial console, where screen's window inherits the local PTY size. Push the actual fitted dims to the PTY explicitly when sessionId becomes available (main term) and right after fit() (side term).Command-bar focus: after sending a button's command, return focus to the active terminal so the user can keep typing without an extra click.