fix(split-pane): refit Pane B when the window/sidebar/tab-rail resizes

Ark0N's PR #453 review: fit() was only ever called from the divider
drag, and the trailing-edge ResizeObserver callback in terminal-ui.js
(throttledResize) only ever measured Pane A's own container. Split at
a wide viewport, shrink the window (or toggle the Alt+B sidebar, or
drag the tab rail), and Pane A's cols changed while Pane B silently
kept its stale PTY size in both xterm and the real pane.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
timkjr
2026-09-20 13:10:31 -05:00
co-authored by Claude Sonnet 5
parent 7fc66e8161
commit 78dcb0aa24
2 changed files with 6 additions and 69 deletions
+6
View File
@@ -1092,6 +1092,12 @@ Object.assign(CodemanApp.prototype, {
if (this._localEchoOverlay?.hasPending) {
this._localEchoOverlay.rerender();
}
// Pane B (split view) has its own container and its own fit()/resize
// frame — this observer only ever measured Pane A's container, so
// without this call Pane B never learned about a window resize, an
// Alt+B sidebar toggle, or a tab-rail drag, and its PTY silently
// stayed at whatever size it was last dragged to.
this._splitPane?.fit();
}, 300); // Trailing-edge: only fire after 300ms of no resize events
};