Skip to content

fix: sync PTY size on connect and refocus terminal after command buttons#3

Merged
craig7351 merged 1 commit into
craig7351:mainfrom
ChrisLi826:fix/pty-size-and-focus
May 8, 2026
Merged

fix: sync PTY size on connect and refocus terminal after command buttons#3
craig7351 merged 1 commit into
craig7351:mainfrom
ChrisLi826:fix/pty-size-and-focus

Conversation

@ChrisLi826
Copy link
Copy Markdown

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.

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>
@craig7351 craig7351 merged commit ee73639 into craig7351:main May 8, 2026
3 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.

2 participants