Keep terminal auto WebGL off software renderers
Description
Keep terminal auto WebGL off known software renderers on non-Linux platforms. The existing policy already kept Linux auto panes on DOM for SwiftShader/llvmpipe/software renderers, but Windows/macOS returned allowWebgl: true before checking renderer identity. That meant Windows could enter Orca's software-rendering fallback and still have xterm terminals create WebGL contexts through ANGLE/SwiftShader/WARP.
This PR extends the software-renderer check to non-Linux hosts while preserving the existing fast path for hardware or unknown renderers. It also keeps auto on DOM when the renderer probe shows WebGL2 is unavailable, and explicitly releases the temporary WebGL renderer-probe context after identity detection, so the safety probe does not keep a software WebGL context alive. Users who explicitly choose terminal GPU acceleration on still get the old forced-WebGL behavior.
Crash Evidence
02-renderer-crashed-bbiyakfatherreports a native Windows renderer crash:crashed (-1073741819)on Orca1.4.110with renderer heap only about93 MB / 117 MBnear the crash and no renderer JS exception or unhandled rejection in the bundle.04-renderer-killed-mtt-nakasonereports Windows rendererkilled (1)on Orca1.4.111about a minute after startup with heap about18 MB / 22 MB; the trace is native process-gone rather than a JS memory leak.- Re-audit of the final crash windows did not find a long-running git command immediately before the renderer exits: report 02 is a steady ~3s status/diff cadence at ~40-60ms, and report 04 is quiet for ~30s before process-gone.
- Current code already persists a Windows GPU software fallback marker for GPU child crash bursts, but terminal
autoskipped renderer probing on every non-Linux host and would still attempt xterm WebGL on software renderers.
ELI5
When Orca decides the graphics driver is shaky, it can run the app in a safer software graphics mode. But the terminal still said, "I am on Windows, so WebGL is fine," and tried to use the risky path anyway. Now auto checks whether WebGL is actually backed by software like SwiftShader or Microsoft Basic Render Driver and uses the safer DOM terminal renderer in that case.
Tradeoffs
- Some Windows users on software graphics will lose terminal WebGL acceleration in
auto, which is intentional for stability. - Hardware Windows renderers still use WebGL in
auto. - Explicit
terminalGpuAcceleration: 'on'remains an override for users who want to force WebGL.
Validation
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/pane-manager/terminal-webgl-auto-policy.test.tspnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/pane-manager/terminal-webgl-auto-policy.test.ts src/renderer/src/lib/pane-manager/pane-webgl-renderer.test.ts src/renderer/src/lib/pane-manager/pane-lifecycle.test.ts src/renderer/src/lib/pane-manager/pane-webgl-context-recovery.test.tspnpm run typecheckgit diff --check(clean, with Windows line-ending warnings only)
📝 Walkthrough
Walkthrough
This change extends terminal WebGL auto-policy detection to classify non-Linux renderer identities. The software-renderer pattern is renamed and broadened, and TerminalWebglAutoDecision.reason gains non-linux-webgl2-unavailable and non-linux-software-renderer. Non-Linux decision logic now probes renderer/vendor info, denies WebGL when WebGL2 is unavailable or a software renderer is detected, and otherwise allows WebGL with detected identity fields. Linux logic uses the renamed pattern. Tests add Windows coverage for software, unavailable-WebGL2, hardware, and cleanup cases, and a shared comment is reworded.
Sequence Diagram(s)
Included above within the review stack artifact for the core decision logic layer.
Related PRs: None specified.
Suggested labels: renderer, terminal, tests
Suggested reviewers: None specified.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | ⚠️ Warning | The description is on-topic but misses required template sections like Summary, Screenshots, AI Review Report, Security Audit, and Notes. | Rewrite the PR description to follow the template, adding all required sections plus the testing checklist and explicit cross-platform review summary. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Title check | ✅ Passed | The title clearly matches the main change: disabling terminal auto WebGL on software renderers. |
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 @coderabbitai help to get the list of available commands.
Moving this PR to draft because it has been untouched for more than 80 days (latest recorded PR activity or commit timestamp: 2026-07-03T06:50:46Z; checked on 2026-10-27). This keeps the review queue focused on active work while preserving the proposal. Please mark it ready for review when work resumes.