Repository navigation
fix(desktop): bump @xterm/addon-webgl to 0.20.0-beta.297 for atlas page eviction - #6287
Conversation
📝 WalkthroughWalkthroughThe desktop package updates ChangesDesktop dependency update
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
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", |
There was a problem hiding this comment.
🗄️ 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.lockRepository: 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.
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
There was a problem hiding this comment.
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
| "@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", |
There was a problem hiding this comment.
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>
Summary
Bumps
@xterm/addon-webgl0.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.289build 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:maxAtlasPagesvia the merge fall-through, which upstream also ties to garbled rendering ([webgl] Atlas page merge corruption and overflow under heavy terminal rendering xtermjs/xterm.js#6038, Address terminal rendering issues with webgl microsoft/vscode#322756).The plateau equals
maxAtlasPages(16 on Metal) × 1 GiB (merged pages still grow todeviceMaxTextureSize16384² 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-sideclearTextureAtlas()memory-pressure mitigation. Filed separately.Verification
/tmp/gpu-samples.logphasesfix297-*in the investigation workspace).bun run lintandapps/desktoptypecheck pass.Summary by cubic
Bump
@xterm/addon-webglto 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
Dependencies
@xterm/addon-webgl0.20.0-beta.288 → 0.20.0-beta.297.Written for commit c17f479. Summary will update on new commits.
Summary by CodeRabbit