feat(web): copyable on-page banner for renderer errors (#414)

wgpu/naga report pipeline and shader failures through the log facade,
then leave the canvas empty - with no logger installed on wasm the
message was lost, so a broken GPU path looked like "draws nothing" with
a clean console. Install a web logger that mirrors Error-level records
to the browser console and into a fixed DOM overlay with selectable
text, a Copy button and repeat-collapsing; panics land in the same
banner via a chained hook. Windows Chrome/Edge reporters can now paste
the exact ANGLE/D3D11 error instead of a screenshot of a blank canvas.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-21 16:43:35 +03:00
commit 427db6cd17
4 changed files with 131 additions and 0 deletions

1
Cargo.lock generated
View file

@ -31,6 +31,7 @@ dependencies = [
"image",
"inventory",
"js-sys",
"log",
"lyon_tessellation",
"lzma-sys",
"ocs_plugin_api",