fix: use ResizeObserver for terminal refit after sidebar toggle

The previous transitionend approach (v0.4.5) had a { once: true } bug:
the sidebar transitions two CSS properties (width and min-width), and if
min-width fired first, the listener self-destructed before the width event
arrived — so _refitTerminal() was never called.

Replace the fragile event-based approach with a ResizeObserver on
#terminal-container. This automatically calls _fitAddon.fit() (debounced
50ms) whenever the container dimensions change, handling sidebar toggle,
browser resize, and any future layout change. Remove the now-unnecessary
window._refitTerminal global and the broken transitionend handler.

Bumps version to 0.4.6.
This commit is contained in:
Brian Krabach
2026-05-02 07:45:11 -07:00
parent 538d11165c
commit abe6a97241
4 changed files with 22 additions and 16 deletions
Generated
+1 -1
View File
@@ -332,7 +332,7 @@ wheels = [
[[package]]
name = "muxplex"
version = "0.4.5"
version = "0.4.6"
source = { editable = "." }
dependencies = [
{ name = "aiofiles" },