Skip to content

Commit 6800302

Browse files
committed
fix(xterm): patch IntersectionObserver retention via juspay/xterm.js fork
Bumps the pnpm override pointer from `fix/dispose-leaks-built` to `fix/kolu-xterm-fixes-built`, which stacks a second fix on top of the existing dispose-leaks patches: - xtermjs/xterm.js#5817 (`fix/dispose-leaks`): register CursorBlinkStateManager + _pausedResizeTask disposables. Already in production. - xtermjs/xterm.js#5821 (new, `fix/intersection-observer-weakref`): wrap `this` in a `WeakRef` inside `RenderService`'s IntersectionObserver callback. `observer.disconnect()` on our side wasn't releasing the callback in practice — heap snapshot showed 175,594 retained Uint32Arrays (~220 MB / 30 mode-toggles with 7 terminals) traced through the global IntersectionObserver registry → callback closure → RenderService → BufferService → BufferLines. WeakRef breaks that chain regardless of why the native registry held the callback. Local measurement on kolu@zest (fresh tab, 30 canvas↔focus toggles, 7 terminals restored): Before fix → After fix Task Manager Memory Footprint +367 MB → -3 MB BufferLine (Z1) instances Δ +175,594 → ~0 Upstream tracking: xtermjs/xterm.js#5820 (issue), xtermjs/xterm.js#5821 (PR). Fork consumption will collapse to a plain version bump once upstream merges + releases.
1 parent 34b4d7f commit 6800302

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ let
4646
# hash-fresh` enforces this stays in sync with pnpm-lock.yaml by forcing
4747
# fetchPnpmDeps to re-execute (--rebuild), so stale artifacts in the
4848
# binary cache can't silently satisfy a hash that no longer matches.
49-
hash = "sha256-B+bX+aTMJScRbZC55ATPAnL8tJG5QAm6fkkABpTaljY=";
49+
hash = "sha256-pdwV7svJnvCSmHd+O/KbXWjCf3oABv6vOLgKX6ttkDc=";
5050
fetcherVersion = 3;
5151
};
5252

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"yaml": "^2.8.3",
1919
"defu": "^6.1.5",
2020
"@anthropic-ai/sdk": "^0.81.0",
21-
"@xterm/xterm": "github:juspay/xterm.js#fix/dispose-leaks-built",
22-
"@xterm/addon-webgl": "github:juspay/xterm.js#fix/dispose-leaks-built&path:/addons/addon-webgl"
21+
"@xterm/xterm": "github:juspay/xterm.js#fix/kolu-xterm-fixes-built",
22+
"@xterm/addon-webgl": "github:juspay/xterm.js#fix/kolu-xterm-fixes-built&path:/addons/addon-webgl"
2323
},
2424
"patchedDependencies": {
2525
"node-pty@1.1.0": "patches/node-pty@1.1.0.patch"

pnpm-lock.yaml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)