Skip to content

feat(terminal): add WebGL renderer toggle in settings#140

Merged
Ark0N merged 1 commit into
Ark0N:masterfrom
crawlsys:feat/webgl-renderer-toggle
Jul 12, 2026
Merged

feat(terminal): add WebGL renderer toggle in settings#140
Ark0N merged 1 commit into
Ark0N:masterfrom
crawlsys:feat/webgl-renderer-toggle

Conversation

@kvncrw

@kvncrw kvncrw commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Adds a 'WebGL Renderer' toggle to Settings > Appearance (desktop). WebGL stays on by default; users can turn it off to force the DOM renderer when they hit GPU glitches, without needing the ?nowebgl URL param. Explicit opt-in (or ?webgl=force) clears a stale auto-fallback marker. Mobile skip and the long-task auto-fallback safety net are unchanged.

The device/param/sticky/pref interaction is factored into a pure, unit-tested shouldSkipWebGL() helper in constants.js.

Adds a 'WebGL Renderer' toggle to Settings > Appearance (desktop). WebGL
stays on by default; users can turn it off to force the DOM renderer when
they hit GPU glitches, without needing the ?nowebgl URL param. Explicit
opt-in (or ?webgl=force) clears a stale auto-fallback marker. Mobile skip
and the long-task auto-fallback safety net are unchanged.

The device/param/sticky/pref interaction is factored into a pure,
unit-tested shouldSkipWebGL() helper in constants.js.
Ark0N pushed a commit that referenced this pull request Jul 12, 2026
…tics (PR #140)

- saveAppSettings no longer sends webglRendererEnabled on the settings PUT:
  the key is absent from the .strict() SettingsUpdateSchema, so every save
  400'd with INVALID_INPUT, silently killing all server-side settings
  persistence. Stripped in the per-device destructure alongside
  localEchoEnabled/skin/etc.
- shouldSkipWebGL now treats a stored true like the untouched default w.r.t.
  the sticky marker: the checkbox defaults checked on desktop, so any
  unrelated save stored true and every page load then cleared the
  'codeman-webgl-disabled' marker, permanently defeating the GPU-stall
  auto-fallback. Only ?webgl=force clears the marker at init.
- The marker is instead retired on a real OFF->ON toggle flip detected at
  save time (mirrors the _prevGestureEnabled pattern in settings-ui.js).
- webglRendererEnabled added to the displayKeys per-device set in
  loadAppSettingsFromServer (renderer choice is device/GPU-specific; syncing
  would leak mobile's hidden-checkbox false onto desktop).
- Tests: stored true + sticky marker -> still skips WebGL; OFF->ON save
  clears the marker and keeps the key off the wire; default-checked save
  leaves the marker alone; ?webgl=force / ?nowebgl behavior unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ark0N pushed a commit that referenced this pull request Jul 12, 2026
…r toggle in settings

Includes review fixes (per-device setting + sticky-marker semantics); merged locally because the org-owned fork rejects maintainer pushes.
@Ark0N Ark0N merged commit bf36eb0 into Ark0N:master Jul 12, 2026
2 checks passed
@Ark0N

Ark0N commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Merged — thank you @kvncrw, and welcome as a first-time contributor! 🎉 The WebGL toggle is genuinely useful for GPU-glitchy setups. Two notes: (1) your org fork (crawlsys) rejects maintainer pushes, so we merged locally with the review fixes included — the PR shows as merged via the master merge commit; (2) the review commit makes the setting per-device (renderer choice is GPU-specific, and the strict settings schema would otherwise have 400'd every save) and preserves the sticky auto-fallback marker unless the user explicitly re-enables. Hope to see more from you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants