Repository navigation
Add WebGL atlas alternate-buffer stress test and refine the manual rendering demo - #6056
Merged
anthonykim1 merged 3 commits intoJul 19, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends xterm.js’s WebGL renderer validation by adding a Chromium-only Playwright stress test that mimics TUI-like alternate-buffer redraw patterns and forces significant glyph churn, while also refining the demo’s manual “atlas stress” controls to better match the workflow being tested.
Changes:
- Added a new Chromium-only Playwright integration test that alternates buffers, redraws synthetic TUI frames, floods unique glyphs to force multi-page atlas usage, and verifies both atlas capacity invariants and post-stress primary-buffer pixel/text stability.
- Updated the WebGL demo’s manual atlas stress UI by separating action buttons from options and renaming the scrolling toggle to Scroll output.
Show a summary per file
| File | Description |
|---|---|
| demo/client/components/window/webglWindow.ts | Refactors the manual atlas stress demo UI controls and renames the scrolling option to “Scroll output”. |
| addons/addon-webgl/test/WebglAtlasStress.test.ts | Adds a Chromium-only Playwright stress test covering alternate-buffer redraws, atlas page churn, capacity checks, and pixel/text stability assertions. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
Member
Author
nedtwigg
added a commit
to diffplug/xterm.js
that referenced
this pull request
Jul 22, 2026
Upstream 8aab310..699f553 is entirely addon-webgl atlas work: - xtermjs#6042 replaces the consume-once ITextureAtlas.beginFrame() flag with a monotonic pageLayoutVersion, so every renderer sharing an atlas learns about a page-layout change instead of only the first one to ask. - xtermjs#6043 adds _evictAllPages() so the atlas can't grow past the renderer's texture capacity, plus a defensive clamp in GlyphRenderer.render. - xtermjs#6056 adds atlas overflow/stress/shared-garble test coverage. The merge is textually clean; the semantic follow-up to _evictAllPages is in the next commit.
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.

Part of: #6038
Follow-up to: #6042
Follow-up to: #6043
Scroll output.Manual verification
Open http://localhost:3000, select the WebGL demo, and click atlas stress start. Enable Scroll output to append lines instead of redrawing the same viewport.
Watch for missing glyphs, blank regions, visual corruption, or rendering stalls.
Focused automated verification
This opens Chromium so the synthetic alternate-buffer workload can be observed. The result appears in the terminal, with screenshots written to:
out-esbuild-test/playwright/atlas-stress-reference.pngout-esbuild-test/playwright/atlas-stress-after.pngAlso verified the full addon WebGL suites in Chromium, Firefox, and WebKit. The new stress test runs only in Chromium.
Inspirations from:
WebglSharedAtlasGarble.test.ts.WebglAtlasOverflow.test.ts.webglWindow.tsatlas stress workflow.