Skip to content

fix: keep pages usable without WebGL2 - #26

Merged
kixelated merged 4 commits into
mainfrom
claude/vibrant-lamarr-bb7cb9
Nov 7, 2026
Merged

kixelated merged 4 commits into
mainfrom
claude/vibrant-lamarr-bb7cb9

Conversation

@kixelated

@kixelated kixelated commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Without WebGL2, canvas initialization aborts the page render. Guarding only the global background still leaves the About demo and profile preview constructing WebGL renderers.

Approach

Detect a missing WebGL2 context during setup, before creating a renderer. Keep the About content and profile controls available while their previews show an unsupported message. Show the room requirement before creating its connection, capture, or audio graph. Genuine shader and renderer errors still throw. Merge the current main branch.

Impact

Application behavior only; no published package API or wire changes. Supported browsers retain the existing renderer. The optional demo now closes its canvas and sound resources on disposal.

Alternatives

Keep the existing WebGL renderer and gate its consumers at initialization. A second renderer would add a separate rendering path.

Follow-ups

The existing Quest/MoQ migration supplies the missing Rust toolchain described below; no duplicate tooling change is included here.

Validation

  • quest gate just build in the repository's Nix shell: passed.

  • API/app TypeScript, Biome and both metadata tests: passed. One existing updater lint warning remains.

  • Real Chromium with WebGL2 disabled: /, /about, /home and /@test render their intended content without page errors; microphone and camera controls remain present on Home. Before the demo guard, both About routes reproduced blank pages with WebGL2 not supported.

  • Full just check exits 1 at native formatting with mbx[error]: could not find the real Cargo after excluding /home/kixelated/.local/share/mbx/bin/cargo. The unchanged base 171ed63 fails identically after the JS checks and tests pass. Both runs used nix develop --accept-flake-config --command /nix/store/5gdm9zz9rz8dmb3zlnn0rhh7dwqnaaw4-quest-0.1.0/bin/quest gate just check.

  • Supported WebGL rendering and native app compilation were not exercised on this host.

  • Required GitHub Check: passed on the reviewed head.

  • Pre-queue Quest validation was invoked against both this head and unchanged main; both report ENOENT for quest/. Neither Git tree contains a quest directory yet, so there are no quest documents to update or invalidate. The migration introduces Quest setup separately.

Review

Claude Code / claude-opus-5-5, medium effort, round 2 reviewed e6cae2e: no findings. Round 1's finding was fixed by keeping media controls and the edit-profile link outside the preview capability guard.

Auto-merge was disabled before pushing the reviewed head so the new head is left for the maintainer's existing merge pick.

(Written by GPT-6.1 Sol with xhigh)

The whole app rendered a blank page on browsers/configs that disable
WebGL (e.g. Librewolf's per-domain allow list). new Canvas() ran during
the synchronous SolidJS render and GLContext threw "WebGL2 not supported"
when getContext("webgl2") returned null, aborting the entire render —
even pages that don't need WebGL.

Canvas now catches the failure, exposes a `supported` flag, and guards
all GL operations so the decorative background simply doesn't render.
The room (which needs WebGL for video) is gated behind canvas.supported
and shows a clear "WebGL is required" notice instead of a blank page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 74d88ede-f11f-4bda-9c73-546e285dd020
Commits

Reviewing files that changed from the base of the PR and between 171ed63 and e6cae2e.

Files selected for processing: 5

  • app/src/about.tsx
  • app/src/components/profile.tsx
  • app/src/room/canvas.ts
  • app/src/room/gl/context.ts
  • app/src/sup.tsx
Finishing Touches

✨ Simplify code

  • Create PR with simplified code
  • Commit simplified code in branch claude/vibrant-lamarr-bb7cb9
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@kixelated
kixelated enabled auto-merge (squash) June 29, 2026 20:12
kixelated and others added 2 commits November 7, 2026 09:08
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@kixelated
kixelated disabled auto-merge November 7, 2026 17:13
Co-Authored-By: Codex <noreply@openai.com>
@kixelated kixelated changed the title Degrade gracefully when WebGL2 is unavailable fix: keep pages usable without WebGL2 Nov 7, 2026
@kixelated
kixelated merged commit 1320b17 into main Nov 7, 2026
2 checks passed
@kixelated
kixelated deleted the claude/vibrant-lamarr-bb7cb9 branch November 7, 2026 17:43
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.

1 participant