Skip to content

fix(desktop): bump @xterm/addon-webgl to 0.20.0-beta.297 for atlas page eviction - #6287

Merged
Kitenite merged 1 commit into
mainfrom
gpu-leak-repro-super-1793
Aug 9, 2026
Merged

Kitenite merged 1 commit into
mainfrom
gpu-leak-repro-super-1793

Conversation

@Kitenite

@Kitenite Kitenite commented Aug 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Bumps @xterm/addon-webgl 0.20.0-beta.288 → 0.20.0-beta.297 to pick up xterm.js PR #6043 (shipped in beta.289 — we missed it by one release), which adds _evictAllPages() so the glyph texture atlas evicts instead of allocating pages past the renderer's texture capacity. This also removes the version skew where every other @xterm/* package was on the .289 build line but addon-webgl was on .288.

Part of the SUPER-1793 GPU-process memory leak investigation.

What this fixes — and what it doesn't

Repro (from the SUPER-1793 investigation): high-cardinality truecolor output (e.g. Claude Code's animated gradient shimmer) makes the xterm WebGL glyph atlas churn; each distinct (glyph, fg-color) rasterizes a new atlas entry. Measured on an M5 Max dev build with while true; do printf '\e[38;2;%d;%d;%dmx' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)); done-class workloads:

The plateau equals maxAtlasPages (16 on Metal) × 1 GiB (merged pages still grow to deviceMaxTextureSize 16384² RGBA), so this bump alone does not close SUPER-1793 on low-RAM machines — the remaining work is an upstream cap on merged page size and/or an app-side clearTextureAtlas() memory-pressure mitigation. Filed separately.

Verification

  • Real app launch from this branch's dev build (guarding against the known ligatures-addon boot-crash failure mode): boots clean, WebGL renderer active, terminals render and stream normally.
  • Truecolor stress run on the patched build confirms the eviction behavior change described above (/tmp/gpu-samples.log phases fix297-* in the investigation workspace).
  • bun run lint and apps/desktop typecheck pass.

Summary by cubic

Bump @xterm/addon-webgl to 0.20.0-beta.297 to enable glyph atlas page eviction and stop unbounded GPU memory growth under high-cardinality output. Part of SUPER-1793.

  • Bug Fixes

    • Evicts glyph atlas pages instead of allocating past texture capacity, preventing runaway GPU-process memory and fixing the unbindable-page rendering issue.
    • Stress tests now plateau at the atlas page limit (~16 GiB on Metal); further reduction will need an upstream merged-page size cap or an app-side atlas clear.
  • Dependencies

    • Update @xterm/addon-webgl 0.20.0-beta.288 → 0.20.0-beta.297.

Written for commit c17f479. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Chores
    • Updated the terminal rendering component to a newer version for improved compatibility and stability.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The desktop package updates @xterm/addon-webgl from version 0.20.0-beta.288 to 0.20.0-beta.297.

Changes

Desktop dependency update

Layer / File(s) Summary
Update WebGL addon version
apps/desktop/package.json
Updates @xterm/addon-webgl from 0.20.0-beta.288 to 0.20.0-beta.297.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commit format and clearly describes the dependency update and its purpose.
Description check ✅ Passed The description explains the change, impact, limitations, and verification steps; only the template checklist is omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gpu-leak-repro-super-1793

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/desktop/package.json`:
- Line 164: Update the xterm dependency versions in apps/desktop/package.json so
`@xterm/addon-webgl`’s peer requirement ^6.1.0-beta.300 is satisfied by
`@xterm/xterm`, or downgrade the addon to match the existing core version; keep
the resolved entries in bun.lock consistent.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e8b3e2d6-3a7a-4135-b0e3-4d3c36cd3a24

📥 Commits

Reviewing files that changed from the base of the PR and between 871b02b and c17f479.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • apps/desktop/package.json

Comment thread apps/desktop/package.json
"@xterm/addon-serialize": "0.15.0-beta.289",
"@xterm/addon-unicode11": "0.10.0-beta.289",
"@xterm/addon-webgl": "0.20.0-beta.288",
"@xterm/addon-webgl": "0.20.0-beta.297",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python - <<'PY'
import json
import re
from pathlib import Path

manifest = json.loads(Path("apps/desktop/package.json").read_text())
deps = manifest["dependencies"]
addon = deps["`@xterm/addon-webgl`"]
xterm = deps["`@xterm/xterm`"]

lock = Path("bun.lock").read_text()
match = re.search(
    r'"`@xterm/addon-webgl`": \["`@xterm/addon-webgl`@(?P<resolved>[^"]+)".*?'
    r'"peerDependencies": \{.*?"`@xterm/xterm`": "\^(?P<peer>[^"]+)"',
    lock,
    re.S,
)

if not match:
    raise SystemExit("Could not find the addon peer dependency in bun.lock")

resolved = match.group("resolved")
peer = match.group("peer")

def beta_key(version: str) -> tuple[int, int, int, int]:
    match = re.fullmatch(r"(\d+)\.(\d+)\.(\d+)-beta\.(\d+)", version)
    if not match:
        raise SystemExit(f"Unsupported version format: {version}")
    return tuple(map(int, match.groups()))

if resolved != addon:
    raise SystemExit(f"Manifest resolves {addon}, but bun.lock resolves {resolved}")

if beta_key(xterm) < beta_key(peer):
    raise SystemExit(
        f"Unmet peer dependency: `@xterm/xterm` {xterm} does not satisfy ^{peer}"
    )

print(f"Compatible: `@xterm/addon-webgl` {addon}, `@xterm/xterm` {xterm}")
PY

rg -n -C 1 '"`@xterm/`(addon-webgl|xterm)"' \
  apps/desktop/package.json bun.lock

Repository: superset-sh/superset

Length of output: 242


Align the xterm peer dependency before merging.

apps/desktop/package.json pins @xterm/addon-webgl to 0.20.0-beta.297 while @xterm/xterm remains at 6.1.0-beta.289. bun.lock records that addon release with peer dependency @xterm/xterm: ^6.1.0-beta.300, so keep the xterm core version compatible or downgrade the addon.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/desktop/package.json` at line 164, Update the xterm dependency versions
in apps/desktop/package.json so `@xterm/addon-webgl`’s peer requirement
^6.1.0-beta.300 is satisfied by `@xterm/xterm`, or downgrade the addon to match
the existing core version; keep the resolved entries in bun.lock consistent.

@github-actions

github-actions Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/package.json">

<violation number="1" location="apps/desktop/package.json:164">
P2: This bump does not remove the @xterm/* version skew as the PR description states — it inverts it. @xterm/addon-webgl is now on `0.20.0-beta.297` while every other xterm package in this file is on the `beta.289` line (`@xterm/xterm` 6.1.0-beta.289, `@xterm/headless` 6.1.0-beta.289, and the fit/image/search/serialize/unicode11 addons). xterm.js publishes its core and addons as a coordinated set, and the webgl addon is tightly coupled to the core renderer internals; running a `.297` addon against a `.289` core means the addon may reference core APIs/behavior that landed in `.290`–`.297`, which is exactly the kind of drift this change was meant to eliminate. Consider bumping the whole @xterm set to a single matching build line (e.g. bump core + all addons to beta.297 together) rather than leaving webgl one line ahead, and update the PR description to reflect that the skew is not actually resolved.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/desktop/package.json
"@xterm/addon-serialize": "0.15.0-beta.289",
"@xterm/addon-unicode11": "0.10.0-beta.289",
"@xterm/addon-webgl": "0.20.0-beta.288",
"@xterm/addon-webgl": "0.20.0-beta.297",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This bump does not remove the @xterm/* version skew as the PR description states — it inverts it. @xterm/addon-webgl is now on 0.20.0-beta.297 while every other xterm package in this file is on the beta.289 line (@xterm/xterm 6.1.0-beta.289, @xterm/headless 6.1.0-beta.289, and the fit/image/search/serialize/unicode11 addons). xterm.js publishes its core and addons as a coordinated set, and the webgl addon is tightly coupled to the core renderer internals; running a .297 addon against a .289 core means the addon may reference core APIs/behavior that landed in .290–.297, which is exactly the kind of drift this change was meant to eliminate. Consider bumping the whole @XTerm set to a single matching build line (e.g. bump core + all addons to beta.297 together) rather than leaving webgl one line ahead, and update the PR description to reflect that the skew is not actually resolved.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/package.json, line 164:

<comment>This bump does not remove the @xterm/* version skew as the PR description states — it inverts it. @xterm/addon-webgl is now on `0.20.0-beta.297` while every other xterm package in this file is on the `beta.289` line (`@xterm/xterm` 6.1.0-beta.289, `@xterm/headless` 6.1.0-beta.289, and the fit/image/search/serialize/unicode11 addons). xterm.js publishes its core and addons as a coordinated set, and the webgl addon is tightly coupled to the core renderer internals; running a `.297` addon against a `.289` core means the addon may reference core APIs/behavior that landed in `.290`–`.297`, which is exactly the kind of drift this change was meant to eliminate. Consider bumping the whole @xterm set to a single matching build line (e.g. bump core + all addons to beta.297 together) rather than leaving webgl one line ahead, and update the PR description to reflect that the skew is not actually resolved.</comment>

<file context>
@@ -161,7 +161,7 @@
 		"@xterm/addon-serialize": "0.15.0-beta.289",
 		"@xterm/addon-unicode11": "0.10.0-beta.289",
-		"@xterm/addon-webgl": "0.20.0-beta.288",
+		"@xterm/addon-webgl": "0.20.0-beta.297",
 		"@xterm/headless": "6.1.0-beta.289",
 		"@xterm/xterm": "6.1.0-beta.289",
</file context>

@Kitenite
Kitenite merged commit cb2625a into main Aug 9, 2026
19 checks passed

This branch was previously deployed

1 inactive deployment
preview — c17f4792 Deployed Aug 9, 2026 by Kitenite via Deploy Admin #7309
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