Skip to content

fix: report the deck.gl render backend in the GPU panel (#8) - #20

Merged
GeoBradDev merged 13 commits into
mainfrom
issue-8-gpu-panel-render-backend
Nov 8, 2026
Merged

GeoBradDev merged 13 commits into
mainfrom
issue-8-gpu-panel-render-backend

Conversation

@GeoBradDev

Copy link
Copy Markdown
Owner

Summary

The GPU panel said RENDER WebGPU whenever navigator.gpu.requestAdapter() succeeded, while deck.gl was actually drawing with WebGL2. This PR reports the truth (user decision; WebGPU rendering is not wired):

  • RENDER now reads the luma.gl device deck.gl actually created, via deck's onDeviceInitialized callback passed in the MapboxOverlay constructor props (src/components/MapView.jsx). webgl (and webgl2) shows WebGL2, webgpu shows WebGPU, Detecting... until deck has a device, Unknown for anything else. The WebGPU adapter tier no longer decides RENDER; it only gates the compute readout.
  • The compute key now reads WEBGPU COMPUTE, so WebGPU compute availability (-- or the RUN button from GPU compute benchmark runs a 64 MB dispatch every second indefinitely, including in hidden tabs #11) reads apart from the render backend.
  • GPU name: adapter device, then description, then vendor architecture joined, then deck's WebGL renderer string (device.info.renderer), then Unknown. Long names are truncated with an ellipsis at 32ch with the full name in title (the span opts into pointer-events so the tooltip shows; the panel stays pointer-events: none).
  • Layout: because the renderer string is long, the panel's top-level max-width is now calc(100vw - 340px) so it always clears the 288px desktop popup, and the | separators are hidden at every width with a 14px column gap (as Layout breaks on mobile: header text overlaps and panels overflow at 375px #5 already did at 1024px and below), so a wrapped row never starts or ends with one. The 1024px and narrow rules from Layout breaks on mobile: header text overlaps and panels overflow at 375px #5 are unchanged.
  • Pure label helpers live in src/components/gpuLabels.js (backend labels in a Map, so prototype names like __proto__ show Unknown).

Plan

docs/plans/2026-11-07-issue-8-gpu-panel-render-backend.md, committed in b33b130 before any code. Revised in the same commits as the review fixes that departed from it: 3838b74 (AC1, prototype names), c1f9551 (AC5 truncation and title, AC7 popup clearance above 1024px), 212cde3 (AC5 tooltip pointer-events), 886f4cf (AC7 separators and column gap at every width), ff04f8e (README scope).

Test evidence

Gate at 886f4cf, run verbatim in the worktree (README-only commit ff04f8e after):

  • npm ci: added 330 packages, found 0 vulnerabilities
  • npm run lint: clean
  • npm test: Test Files 30 passed (30), Tests 249 passed (249) (baseline on main: 24 files, 211 tests)
  • npm run build: built (pre-existing >500 kB chunk warning)
  • npm audit --omit=dev --audit-level=high: found 0 vulnerabilities

New and updated tests: gpuLabels.test.js and gpuLabels.protoKeys.test.js (RENDER for webgl, webgl2, webgpu, not initialized, unknown and prototype names; every GPU label fallback step), GPUInfoPanel.test.jsx (RENDER cases incl. tier webgpu with device webgl showing WebGL2, key rename), GPUInfoPanel.benchmarkTier.test.jsx (key rename), GPUInfoPanel.gpuName.test.jsx, MapView.test.jsx (callback in the MapboxOverlay constructor props; Detecting... then WebGL2), styles.test.js, styles.gpuPanel.test.js, styles.gpuSeparators.test.js. Each defect's test was committed red before its fix.

Live drive (npm run build + npm run preview, Playwright with headless Chromium; the chrome-devtools MCP profile was locked):

  • RENDER timeline: Detecting... (warn) at about 190 ms, then WebGL2 (ok) at about 450 to 620 ms.
  • Both canvases (maplibregl-canvas, #deckgl-overlay) hold a webgl2 context and no webgpu context; the deck device read from the panel props is { type: 'webgl', renderer: 'ANGLE (Google, Vulkan 1.3.0 (SwiftShader Device (Subzero) ...' }. RENDER matches.
  • No adapter (default headless, like the user's Chrome where requestAdapter() is null): WEBGPU COMPUTE --, no RUN, GPU is the ANGLE renderer string, truncated with full title.
  • SwiftShader WebGPU adapter (--enable-unsafe-webgpu): tier webgpu, GPU google swiftshader, RUN shown and a run gave ~3.5 GB/s est., RENDER still WebGL2.
  • Layout, with and without a feature popup: 1440x900, 1280x800, 1025x800 show all six items, no separators visible, panel left edge at or right of 330px vs popup right edge 308px (no overlap); 768x1024 and 375x812 show only RENDER, PTS, FRAME inside the viewport; at 375 the panel hides while the bottom sheet is open (Layout breaks on mobile: header text overlaps and panels overflow at 375px #5). No overlap with header or layer panel anywhere. The map still pans when dragging over the panel; the GPU name hit-tests as itself.
  • Fresh verifier (separate context) reproduced the above and checked the popup focus/Escape flow (Layer toggles, stress slider, and feature popup are not keyboard or screen reader accessible #4) and layer toggles: no findings.

Review findings

High tier: three Claude finders (bugs/compliance, security, outside-the-diff) and two Fable finders (bugs/compliance, edge cases), a confirming finder, two delta rounds, a fresh verifier, and two doc finders.

Fixed:

  • B1 (Claude finder; also noted by Fable edge finder and others): renderBackendLabel used a plain object, so __proto__ crashed React and toString showed ok. Fixed with a Map (33fe11e, 3838b74).
  • B2 (Claude outside-diff finder note, confirmed from live-drive rects): the long WebGL renderer name widened the panel to 1315px at 1440, under the desktop popup. Fixed with truncation and a 340px top-level cap (a069c25, c1f9551).
  • F1 (Claude delta finder): the title tooltip was unreachable because the panel is pointer-events: none. Fixed (264840a, 212cde3).
  • F2 (Claude delta finder, confirmed from rects: 1025x800 panel 45px tall): wrapped rows above 1024px could end in |. Fixed (8e04e05, 886f4cf).
  • Docs (doc finders): README scope recorded in the plan; Known limitations wording made precise (ff04f8e).

Dismissed and why:

  • README GPU-name wording beyond AC8 (Fable): accurate and documents AC5; plan updated to name it.
  • The unmasked WebGL renderer string is shown on screen (Claude security note): intended by AC5 and the user's request for an honest GPU name; it is display only, never logged or sent.

Left as notes (not changed here):

  • If deck fails to create a device, RENDER stays Detecting...; after a WebGL context loss it still shows WebGL2. Loading and error states belong to No loading, error, or degraded states: failed data loads leave an empty map and SYS NOMINAL #10; noted in README Known limitations.
  • On a dual-GPU machine the GPU name (WebGPU adapter) can differ from the GPU deck draws with; the ordering follows the plan.
  • Nits: the 1024px media block now repeats the top-level separator and column-gap rules; topLevelCss() test helper ignores @supports and is copied in three test files; the MapView comment says the callback "must" be in the constructor (it is the non-racy choice).

Docs reconciled

  • README.md: GPU info panel bullet, Requirements, and Known limitations updated for RENDER as the deck.gl backend, WEBGPU COMPUTE, the GPU name fallback and truncation, and the device-failure and context-loss limits.
  • CLAUDE.md: no change needed because no rule or description it holds changed.
  • ADR: none.

Closes #8

🤖 Generated with Claude Code

https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf

GeoBradDev and others added 13 commits November 7, 2026 20:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
RENDER now reads the luma.gl device type passed to deck's
onDeviceInitialized instead of the WebGPU adapter tier, and the compute
readout key becomes WEBGPU COMPUTE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
@GeoBradDev
GeoBradDev merged commit d95ed61 into main Nov 8, 2026
1 check passed
@GeoBradDev
GeoBradDev deleted the issue-8-gpu-panel-render-backend branch November 8, 2026 02:57
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.

GPU panel shows RENDER WebGPU while deck.gl is actually rendering with WebGL2

1 participant