fix(ui): terminal renderer escape hatch + unified WebGL degradation#305
Merged
Conversation
The WebGL renderer's glyph rasterization is plain Canvas2D (shared with the DOM renderer), but the rasterized glyphs then ride a GPU pipeline with a known family of environment-specific corruption bugs (black boxes over CJK, garbled cells — same xterm atlas as VS Code's terminal, see microsoft/vscode#137047/#163936/#288682). None of them throw, so they can't be auto-detected; VS Code's answer is the gpuAcceleration setting. Ours: - `localStorage['openalice.terminal.renderer'] = 'dom'` forces the DOM renderer (unset/anything else keeps WebGL). - Shared `attachWebglRenderer` loader: addon-throw and context-loss both degrade to the DOM renderer; the demo replay previously had no context-loss handling at all. Investigated from external PR #253's black-box report — not reproducible on macOS nor Linux+Noto CJK with identical config, so the fix is an escape hatch rather than a blanket renderer swap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks
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.
Summary
localStorage.setItem('openalice.terminal.renderer', 'dom')+ reload forces the DOM renderer; unset keeps the WebGL default.attachWebglRendererloader used by both the workspace terminal and the demo replay: addon-construction failure and WebGL context loss now both degrade to the DOM renderer (the demo replay previously had no context-loss handling).Test plan
cd ui && npx tsc -bcleanrenderer.spec.ts(flag short-circuits before addon construction; default constructs+loads; load-throw disposes and degrades)Boundary touch
None — UI rendering only.
🤖 Generated with Claude Code