fix(web): graph view is silently blank when WebGL is unavailable — no fallback or message #75

Open
opened 2026-07-04 10:59:35 +00:00 by anuna-02 · 0 comments
anuna-02 commented 2026-07-04 10:59:35 +00:00 (Migrated from codeberg.org)

Summary

When WebGL is unavailable in the browser, /_graph and the floating graph widget render a completely blank panel — no nodes, no error message, no fallback. The zoom/labels/find controls still render next to the empty canvas, which makes the page look broken rather than degraded.

Found during UAT of v0.9.3 (zetl serve on the bundled demo-vault).

Reproduction

  1. cd demo-vault && zetl serve --port 3777
  2. Open http://localhost:3777/_graph in a browser without WebGL. Easiest repro: Playwright/Chrome headless-shell with GPU disabled, or any environment where document.createElement('canvas').getContext('webgl') returns null (remote desktops, hardened browsers, some VMs).
  3. Observe: empty graph area, controls panel intact, nothing else.

Diagnosis

sigma.min.js probes WebGL at script-evaluation time and throws before defining the global:

[pageerror] Cannot read properties of null (reading 'getParameter')
typeof Sigma: undefined

graph-boot.js has no guard for typeof Sigma === 'undefined' and no WebGL capability check, so __zetlBootGraph silently does nothing. The <noscript> fallback and the details.zetl-graph-fallback-list page list exist, but neither is shown in the JS-enabled/no-WebGL case.

Verified the graph renders correctly (7 sigma canvases, labels, folder legend) in the same build once WebGL is available (--use-angle=swiftshader or headed Chrome), so this is purely the degradation path.

Expected

When WebGL is unavailable, show the existing keyboard-accessible page-list fallback (or at minimum a "Graph view requires WebGL" note), on both /_graph and the widget.

Environment

  • zetl 0.9.3, zetl serve, demo-vault
  • Chromium headless-shell 140 (Playwright 1208) without GPU — getContext('webgl')null
## Summary When WebGL is unavailable in the browser, `/_graph` and the floating graph widget render a completely blank panel — no nodes, no error message, no fallback. The zoom/labels/find controls still render next to the empty canvas, which makes the page look broken rather than degraded. Found during UAT of v0.9.3 (`zetl serve` on the bundled demo-vault). ## Reproduction 1. `cd demo-vault && zetl serve --port 3777` 2. Open `http://localhost:3777/_graph` in a browser without WebGL. Easiest repro: Playwright/Chrome headless-shell with GPU disabled, or any environment where `document.createElement('canvas').getContext('webgl')` returns `null` (remote desktops, hardened browsers, some VMs). 3. Observe: empty graph area, controls panel intact, nothing else. ## Diagnosis `sigma.min.js` probes WebGL at script-evaluation time and throws before defining the global: ``` [pageerror] Cannot read properties of null (reading 'getParameter') typeof Sigma: undefined ``` `graph-boot.js` has no guard for `typeof Sigma === 'undefined'` and no WebGL capability check, so `__zetlBootGraph` silently does nothing. The `<noscript>` fallback and the `details.zetl-graph-fallback-list` page list exist, but neither is shown in the JS-enabled/no-WebGL case. Verified the graph renders correctly (7 sigma canvases, labels, folder legend) in the same build once WebGL is available (`--use-angle=swiftshader` or headed Chrome), so this is purely the degradation path. ## Expected When WebGL is unavailable, show the existing keyboard-accessible page-list fallback (or at minimum a "Graph view requires WebGL" note), on both `/_graph` and the widget. ## Environment - zetl 0.9.3, `zetl serve`, demo-vault - Chromium headless-shell 140 (Playwright 1208) without GPU — `getContext('webgl')` → `null`
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
anuna-research/zetl#75
No description provided.