tiletopia/src/components
megaproxy a5209e08ae Debounce PTY resize during drag to stop SIGWINCH-spam corrupting prompts
What the user saw: dragging a gutter filled the affected panes with
many overlapping bash prompts, some corrupted mid-print
(megaproxy@DESKTOP-megaproxy@DESKTOP-SSAQG5 etc).

Root cause: every resizePane() call sends SIGWINCH to the shell, which
makes bash redraw its prompt. The previous fix coalesced the local
xterm fit() into one per rAF, but still fired resizePane on every
rAF — 60+ SIGWINCHes per second during a drag, faster than bash can
finish one prompt redraw before the next interrupts it.

Fix: separate the two concerns. fit() + term.refresh() still run
every rAF (the visual must stay smooth). But resizePane() is
debounced to fire 150 ms after the LAST rAF — i.e. only when you
stop dragging — so bash gets one clean SIGWINCH at the final size
and produces a single tidy prompt redraw.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:53:34 +01:00
..
Notifications.css Migrate frontend from Svelte 5 to React 18 2026-05-22 18:05:05 +01:00
Notifications.tsx Remove unused React imports (Notifications, Palette) 2026-05-22 18:35:10 +01:00
Palette.css Migrate frontend from Svelte 5 to React 18 2026-05-22 18:05:05 +01:00
Palette.tsx Remove unused React imports (Notifications, Palette) 2026-05-22 18:35:10 +01:00
XtermPane.tsx Debounce PTY resize during drag to stop SIGWINCH-spam corrupting prompts 2026-05-22 21:53:34 +01:00