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:
parent
77535f7c68
commit
427db6cd17
4 changed files with 131 additions and 0 deletions
|
|
@ -28,6 +28,11 @@ fn main() -> iced::Result {
|
|||
#[cfg(target_arch = "wasm32")]
|
||||
{
|
||||
console_error_panic_hook::set_once();
|
||||
// After the console hook so the chained panic mirror keeps it; also
|
||||
// installs the log-facade listener that surfaces wgpu/naga errors as
|
||||
// a copyable on-page banner (#414 — an empty canvas otherwise gives
|
||||
// reporters nothing to paste).
|
||||
sys::web_diag::init();
|
||||
return app::run_web();
|
||||
}
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
|
|
|
|||
Loading…
Reference in a new issue