Repository navigation
Acquire a pane's WebGL renderer after its first settled fit - #1839
Merged
Merged
Conversation
Splitting a pane on the desktop playground left every other terminal blank until an unrelated DOM change. The entering pane's WebGL canvas was created at mount, at xterm's default 80x24 grid, and the settle-frame fit then resized that brand-new canvas. Chromium's TreesInViz compositor trips its damage checks on that frame (crbug.com/454680865: "Viz damage does not contain client damage", then "Has no damage while expects_to_draw is set" every frame) and skips draws, so the other canvases stay blank while still rendering correctly into their drawing buffers. mountElement now only reveals the element on the DOM renderer, and TerminalPane acquires the GPU renderer through mountRenderer after its fit gate passes, so the canvas is created at the settled grid. A pane whose size a remote session holds mounts its renderer without fitting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
07d440d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fafdf4b9.mouseterm.pages.dev |
| Branch Preview URL: | https://webgl-blank.mouseterm.pages.dev |
dormouse-bot
left a comment
Collaborator
There was a problem hiding this comment.
One spec wording issue: the code matches the PR description, but the new Renderer rule appears to say the opposite for held panes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
approved these changes
Nov 18, 2026
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.
Splitting a pane left every other terminal blank until an unrelated page change (a hover, say) forced a redraw. It reproduces on the production site.
Cause
The entering pane's WebGL canvas was created at mount, at xterm's default 80×24 grid, and the fit on the split animation's settle frame then resized that brand-new canvas. Chromium's TreesInViz compositor trips its damage checks on that frame (crbug.com/454680865: "Viz damage does not contain client damage", then "Has no damage while expects_to_draw is set" every frame) and skips draws, so the other canvases stay on their last presented frame while still rendering correctly into their drawing buffers.
TreesInViz is on by default in Chrome for Testing 150 (what agent-browser runs) and blanks every time; installed Chrome 157 does not blank unless it is launched with
--enable-features=TreesInViz. The create-then-resize pattern predates the xterm bump indc82a41c9.Fix
mountElementnow only reveals the element on the DOM renderer.TerminalPaneacquires the GPU renderer through the newmountRendererafter its settled-geometry gate and first fit, so the canvas is created at the settled grid. A stale container is a no-op.docs/specs/layout.md→ Renderer states the rule; the rationale entry carries the dated measurements.Testing
TerminalPane.test.tsxandterminal-registry.alert.test.tspin no renderer while entering and a renderer right after the first fit; they fail against the old code. jsdom has no WebGL, so the blanking itself is not testable there.🤖 Generated with Claude Code