You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The terminal client stayed stable locally, but users could crash the session when resizing an SSH-backed `pxpx.sh` terminal.
19
+
20
+
## Problem
21
+
During SSH `window-change`, some terminals can briefly report invalid PTY dimensions such as `0x0`. The gateway forwarded those values to the child PTY runner, which then propagated them to the OpenTUI client. OpenTUI rejects framebuffer resizes at `0` width or height and aborts.
22
+
23
+
## Working Solution
24
+
- Added `sanitizePtyWindow` and `sanitizePtyInfo` in `src/ssh-gateway/pty.ts`
25
+
- Sanitized initial PTY dimensions before launching the interactive child
26
+
- Sanitized every SSH `window-change` event before forwarding it
27
+
- Preserved the last valid PTY size when a resize event reported invalid dimensions
28
+
- Added regression tests in `tests/ssh-gateway/pty.test.ts`
29
+
30
+
## Key Insight
31
+
This was not a generic client-side resize bug. The failure path was specific to the SSH PTY bridge, where transient invalid sizes can appear during interactive terminal resizes.
0 commit comments