From 57406f6c148b893b5d459605f81f2a33d2efd960 Mon Sep 17 00:00:00 2001 From: timkjr Date: Wed, 16 Sep 2026 20:23:30 -0500 Subject: [PATCH] fix(split-pane): stop clamping Pane B's resize dimensions to a 40x10 floor _sendResize() clamped Pane B's proposed cols/rows to a 40/10 floor before sending the {t:'z',...} resize frame, so the PTY was misinformed of Pane B's real width at the divider's own reachable 20% position, causing real output-wrapping bugs. The primary pane (terminal-ui.js's getTerminalDimensions()) sends fitAddon.proposeDimensions() unclamped and lets the server enforce its own valid range ([1,500]/[1,200] in ws-routes.ts); Pane B now matches that convention. Co-Authored-By: Claude Sonnet 5 --- src/web/public/terminal-split.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/web/public/terminal-split.js b/src/web/public/terminal-split.js index 6ba51427..700a9d5b 100644 --- a/src/web/public/terminal-split.js +++ b/src/web/public/terminal-split.js @@ -96,9 +96,13 @@ if (!this._wsReady || !this.fitAddon) return; const dims = this.fitAddon.proposeDimensions(); if (!dims) return; - const cols = Math.max(dims.cols, 40); - const rows = Math.max(dims.rows, 10); - this.ws.send(JSON.stringify({ t: 'z', c: cols, r: rows, v: 'desktop' })); + // Send the real proposed dimensions unclamped, matching the primary + // pane's convention (terminal-ui.js's getTerminalDimensions()) — the + // server enforces its own valid range ([1,500]/[1,200] in ws-routes.ts). + // A 40/10 floor here misreported Pane B's real width to the PTY at the + // divider's own reachable 20% floor position, causing real + // output-wrapping bugs. + this.ws.send(JSON.stringify({ t: 'z', c: dims.cols, r: dims.rows, v: 'desktop' })); } destroy() {