Skip to content

test(xterm): upstream master baseline (post-#5817, pre-#5821)#653

Draft
srid wants to merge 2 commits intomasterfrom
test/xterm-upstream-master
Draft

test(xterm): upstream master baseline (post-#5817, pre-#5821)#653
srid wants to merge 2 commits intomasterfrom
test/xterm-upstream-master

Conversation

@srid
Copy link
Copy Markdown
Member

@srid srid commented Apr 21, 2026

Purpose

Third prod arm in the #5821 A/B. This branch pins xterm.js + addon-webgl to the exact npm beta that was auto-published from upstream master seconds after our dispose-leaks PR (xtermjs/xterm.js#5817) merged — i.e. xterm master with #5817 landed, but without the open #5821 WeakRef fix.

This corresponds exactly to the "Unpatched" column in the local A/B. If the memory regression is real in production Chrome, this branch is where it reappears.

Pinned versions

\"@xterm/xterm\":        \"6.1.0-beta.199\",
\"@xterm/addon-webgl\":  \"0.20.0-beta.198\"

Fact-check — commit traceability

$ gh pr view 5817 --repo xtermjs/xterm.js --json mergeCommit
  → mergeCommit.oid = 0911688295fce79ba3b880e14af74f4f2718bef4

$ npm pack @xterm/xterm@6.1.0-beta.199 → package.json.commit
  → 0911688295fce79ba3b880e14af74f4f2718bef4   ✓

$ npm pack @xterm/addon-webgl@0.20.0-beta.198 → package.json.commit
  → 0911688295fce79ba3b880e14af74f4f2718bef4   ✓

All three SHAs match — the two npm betas are both built from the 0911688 merge commit of #5817. This is the same snapshot as xterm.js@master at the moment of writing (no commits after #5817 have landed).

Runtime verification of node_modules/@xterm/xterm/lib/xterm.mjs:

  • _pausedResizeTask = this._register(new Qi(...))present → #5817 applied ✓
  • new WeakRef(this) in _registerIntersectionObserverabsent → #5821 not applied ✓
  • Plain strong-this IntersectionObserver callback — matches the pre-#5821 upstream code

The three-arm A/B on pureintent

Run the same 30× canvas-maximize toggle test across all three branches and compare Chrome Task Manager Memory Footprint Δ:

Branch xterm state Expected (per local + #617 priors)
this (test/xterm-upstream-master) upstream master, pre-#5821 +367 MB / 30 toggles if #617 repros in prod
#652 (test/observer-nullify-variant) master + observer = undefined ? — the experiment
master (shipped) master + WeakRef ~0 MB / 30 toggles (per #617)

The full recipe — 7 terminals, DevTools console 30-cycle one-liner, fallback via Ctrl+Enter/Ctrl+D — is in the #652 description.

Interpreting the three outcomes

Rollback

Not for merge. Close after data collected. The real decision lands as a change on #5821 (keep WeakRef, collapse to observer-nullify, or close).

Refs xtermjs/xterm.js#5817, xtermjs/xterm.js#5821, #617, #652

srid added 2 commits April 21, 2026 19:39
Drops the juspay fork override for @xterm/xterm + @xterm/addon-webgl
and pins plain npm betas that were auto-published minutes after
xtermjs/xterm.js#5817 (our dispose-leaks fix) landed:

    @xterm/xterm:        6.1.0-beta.199   (published 2026-04-21 19:58Z)
    @xterm/addon-webgl:  0.20.0-beta.198  (published 2026-04-21 19:59Z)

Verified in node_modules:
  - _pausedResizeTask=this._register(...) present  → #5817 merged
  - plain 'let r=new e.IntersectionObserver(s=>this._handleIntersectionChange(...))'
    with strong this-capture, no WeakRef             → #5821 NOT applied

This is the 'Unpatched' column from the local A/B — the xterm state
that ships if #5821 stays open. Purpose: prod baseline against which
#617's WeakRef fix (and the observer-nullify variant on #652) can be
A/B'd via Chrome Task Manager on pureintent.

Not for merge. If prod shows the #617-shape +367 MB/30 toggles
regression, we have direct evidence that #5821 is load-bearing in
the wild (and should not wait for 6.1.0 stable).

Refs xtermjs/xterm.js#5817, xtermjs/xterm.js#5821, #617
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant