Repository navigation
docs(terminal): macOS stays DOM — xtermjs#5883 merged but is in no released addon (refs #430) - #443
Merged
Merged
Conversation
…S DOM default The renderer-default comment (and build-spec decision 7) claimed the upstream fix PR was unmerged. It merged 2026-05-21 — but that does not unblock the flip, and the corrected evidence says why: - #5883 touches only `addons/addon-webgl/src`, so it ships in `@xterm/addon-webgl`, not in the `@xterm/xterm` core; - that package's newest STABLE release is `0.19.0` (2025-12-22) — the version pinned here — which predates the merge; - the first published artifact carrying the fix is the `0.20.0-beta.219` prerelease, whose peer range demands a beta core too. So macOS stays on DOM and no dependency moves. Record the trigger as a stable `@xterm/addon-webgl` >= 0.20.0 carrying #5883, rather than #5816 being closed — an issue can outlive its fix, and #5816 is still open. Refs #430
D-010's flip-back condition read "when #5816 is closed and the fix is in a released xterm". Re-verified 2026-07-31: the fix (#5883) merged upstream but is in no stable release, so macOS keeps the DOM default and the condition is restated as the thing that is actually checkable — a stable `@xterm/addon-webgl` >= 0.20.0 carrying #5883, independent of #5816's issue state. Verified by tarball inspection rather than by dates: the fix's markers (`AtlasPage.nextVersion`, `invalidateAtlasTextures`, `MERGE_RETRY_LIMIT`) are absent from 0.19.0 and from 0.20.0-beta.218, and present from 0.20.0-beta.219 on. The original decision is amended in place, not replaced — it stays active. Refs #430
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The flip did not happen — and shouldn't yet
Refs #430. This PR deliberately does not close it. I went to flip the macOS branch of the
renderer resolution to GPU, established the facts first, and the flip-back condition is not
met. What lands here is the corrected evidence and a sharper trigger, not a behavior change.
Nothing user-visible changes: macOS still resolves to DOM, Windows/Linux still resolve to GPU,
no dependency moves,
bun.lockuntouched.What I established
3e2a42e@xterm/addon-webgl, not the@xterm/xtermcoreaddons/addon-webgl/src@xterm/addon-webgl@0.20.0-beta.219(2026-05-21, ~1h after merge)@xterm/addon-webgl@0.19.0(stable, 2025-12-22) — predates the mergebun.lockThe core lesson is that the fix is in the addon, not the core — so "which xterm release
contains it" is the wrong question; the addon versions independently.
@xterm/addon-webglhas exactly three stable releases ever:0.17.0,0.18.0,0.19.0(2025-12-22). npm
dist-tags.latestis still0.19.0. All three predate the 2026-05-21merge.
0.20.0-beta.219…0.20.0-beta.291prereleases.ahead_by: 848, behind_by: 0vs. tag6.0.0, which is the newest tag in the repo — the fix is in no tagged release.Verified by content, not by dates. I downloaded the tarballs and grepped for the fix's own
markers (
AtlasPage.nextVersion,invalidateAtlasTextures,MERGE_RETRY_LIMIT):0.18.00.19.0← ours0.20.0-beta.2180.20.0-beta.2190.20.0-beta.291Why I did not take the beta
0.20.0-beta.219'speerDependenciesis{"@xterm/xterm": "^6.1.0-beta.220"}— and the latestbeta wants
^6.1.0-beta.292. Taking the fix today moves the whole terminal stack onto theprerelease channel (core + every addon in lockstep), to fix a bug whose only symptom is visual,
on the platform we develop on, with no gate that can catch a regression. That trade is worse than
the DOM renderer. #430 itself set the bar at "in a released xterm the repo has taken".
What this PR changes
apps/web/src/lib/platform.ts— the comment aboveDEFAULT_TERMINAL_WEBGLasserted thefix PR was "unmerged". That was true when written and is now false, which is the kind of stale
claim that gets a default flipped on a bad premise later. Replaced with the actual status and
a checkable trigger (
npm view @xterm/addon-webgl version).docs/research/2026-07-10-terminal-build-spec.md(decision 7) — same stale "fix PRunmerged" note, corrected in place with a dated re-check, per the register's rule that no
living doc keeps contradictory prose.
docs/decisions/INDEX.md— D-010 amended in place (still ✅ active, original text intact):records that the condition was checked and not met, with the evidence, and restates the
trigger as a stable
@xterm/addon-webgl≥ 0.20.0 carrying #5883 rather than "#5816 isclosed". #5816 is still open, but issue state was always the wrong signal — an issue routinely
outlives its fix, and here the fix landed while the issue stayed open. Release state is the
fact that actually gates us.
Tri-state semantics: unchanged
Nothing touched
resolveTerminalWebgl,Settings.terminalWebglEnabled, the RustSettings/SettingsPatchshape, or the camelCase pinning tests.stored ?? DEFAULT_TERMINAL_WEBGLstill means
Some(false)(explicit opt-out) is returned verbatim and can never be flipped on bya default change — only
nullconsults the platform default.apps/web/src/lib/platform.test.tsxpins all four cases (true/false/null/undefined).The escape hatch (unchanged, and where it lives)
Settings → Terminal → "GPU rendering (WebGL)" —
apps/web/src/components/settings/settings-terminal-cards.tsx. Toggling it writes an explicittrue/falsethat outranks the platform default forever after. Independently,terminal-webgl.tswires the addon'sonContextLossto dispose the addon (xterm reverts to DOM)and raise a toast, so even an explicit opt-in degrades to DOM rather than to a blank pane.
Deferred, and now on the record: the WebKit context cap
#430 also parks an LRU WebGL context pool for WebKit's ~16-live-context cap. Since macOS stays on
DOM, it does not become urgent from this PR — macOS is the WebKit target, and the pool is
load-bearing only once macOS resolves to GPU. It does not need its own ticket today, but it is
a hard prerequisite of the eventual flip, not a follow-up to it: with the tab cap at 8 terminals
plus any other GL surface, flipping macOS to GPU without pooling walks toward a cap where WebKit
force-loses the oldest context unrecoverably. Whoever executes the flip should land the pool in
the same change. #430 stays open and carries both.
Verification
No behavior changed, so there is nothing here for a human to look at. The visual check #430 calls
for is not owed on this PR — it is owed on the future PR that actually flips the default, and
that PR still cannot be proven green by any gate in this repo: WebGL corruption is a rendering
artifact, headless chromium has no reliable WebGL context, and there are no pixel tests for xterm.
Gates run locally, all green:
lint·typecheck·tsc -b apps/web·lint:meta·codegen:check·test:web(514 files / 2937 tests, both vitest projects) ·test:node(2022 tests) ·
test:plugin·audit(5 pre-existing tolerated advisories, no newsuppressions). Rust untouched;
codegen:check's cargo legs still ran andgit diff --exit-code -- apps/web/src/lib/generatedis clean.