Skip to content

Modal: Detect and message broken WebGL (iOS/iPadOS 18.7.2 build 22H123) #367

@coderabbitai

Description

@coderabbitai

Summary

Safari/WebKit on iOS/iPadOS 18.7.2 build 22H123 claims WebGL support, but GL resource creation/compilation fails (buffers/framebuffers/shaders). OmniBlocks currently mounts Stage when Renderer.isSupported() is true and then crashes with a generic error.

We need a hardened detection + a user-friendly modal that explains “WebGL appears to be broken” and guides users (esp. iOS 18.7.2) to update.

Backlink: #364

Why

  • Renderer.isSupported() is optimistic on affected Safari; context exists but resources fail.
  • Prevents crash; provides actionable guidance (update to fixed build 22H124, try another browser, etc.).

Scope

  1. Detection (smoke test, cached once per session)
  • Create canvas + WebGL context.
  • Create & bind buffer; upload tiny data.
  • Create framebuffer.
  • Compile+link minimal shaders; verify COMPILE/LINK status.
  • Verify gl.getParameter(gl.VERSION) is truthy.
  1. Modal (new, matches WebGL-not-supported modal styling)
  • Title: “WebGL appears to be broken”
  • Text: Browser reports support but it’s malfunctioning (likely browser bug/driver issue).
  • iOS specific callout: “If you’re on iOS/iPadOS 18.7.2, update to build 22H124 (Settings → General → Software Update; turn off Beta Updates first).”
  • Link to Status & Issues wiki.
  1. UA-based iOS version hint (optional, not for gating)
  • Parse navigator.userAgent to detect iOS/iPadOS 18.7.2 and show a short note.
  • We cannot detect Apple ‘build numbers’ on the web; instruct user where to find it in Settings.

Non-goals

  • Do not change renderer internals.
  • Do not block on exact Apple build detection (not exposed to JS).

Acceptance criteria

  • Users on broken Safari builds see the “WebGL broken” modal instead of a crash.
  • Modal matches existing modal visuals.
  • Detection runs once per session (cached).
  • Healthy browsers still mount Stage normally.
  • Existing “WebGL not supported” flow remains unchanged.

Tasks

  • src/lib/tw-environment-support-prober.js: add canActuallyUseWebGL() smoke test; cache result; require both Renderer.isSupported() && smoke test.
  • New WebGlBrokenModal (component + container + CSS) mirroring existing modal layout; copy adjusted.
  • Stage wrapper: if smoke test fails, show WebGlBrokenModal; otherwise mount Stage.
  • UA helper for iOS version hint (no build detection).
  • Link modal to wiki: Status_and_Issues.
  • Manual verify on iPadOS 18.7.2 (22H123 should show modal; 22H124 should pass).
  • Add minimal telemetry in devtools (e.g., window.__omni.webglProbe with failed step) for triage (optional).

References

  • Tracking discussion: Broken on safari #364
  • WebGL conformance results (repo root): webgl-conformance-2.0.1.beta.txt
  • iOS 18.7.2 22H123 shader/ctx failures (community reports) and fix in 22H124

Metadata

Metadata

Labels

High-PriorityNeeds immediate attention,bugSomething isn't workingenhancementNew feature or requestjavascriptPull requests that update javascript codepossible-duplicateThe issue is a potential duplicate of another.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions