diff --git a/frontend/wasm/src/lib.rs b/frontend/wasm/src/lib.rs index 9e9d7aa171..9c84ed428c 100644 --- a/frontend/wasm/src/lib.rs +++ b/frontend/wasm/src/lib.rs @@ -51,14 +51,17 @@ pub fn panic_hook(info: &panic::PanicInfo) { if !NODE_GRAPH_ERROR_DISPLAYED.load(Ordering::SeqCst) { NODE_GRAPH_ERROR_DISPLAYED.store(true, Ordering::SeqCst); - editor_api::editor_and_handle(|editor, handle| { - let responses = editor.handle_message(DialogMessage::DisplayDialogError { - title: "Node graph panicked".into(), - description: "Node graph evaluation panicked, please check the log for more information.\n Please consider this as a critical error, and save your work before doing anything else. This is an experimental recovery feature, and it's not guaranteed to work.".into(), - }); - for response in responses { - handle.send_frontend_message_to_js_rust_proxy(response); - } + editor_api::editor_and_handle(|_, handle| { + let error = r#" + + + The document crashed while being rendered in its current state. + Undo your last action to restore the artwork. However, the editor is now + unstable! Save your document then restart the editor before continuing. + /text>"# + // It's a mystery why the `/text>` tag above needs to be missing its `<`, but when it exists it prints the `<` character in the text. However this works with it removed. + .to_string(); + handle.send_frontend_message_to_js_rust_proxy(FrontendMessage::UpdateDocumentArtwork { svg: error }); }); } diff --git a/node-graph/gstd/src/wasm_application_io.rs b/node-graph/gstd/src/wasm_application_io.rs index df8c683bd9..069cd24ba3 100644 --- a/node-graph/gstd/src/wasm_application_io.rs +++ b/node-graph/gstd/src/wasm_application_io.rs @@ -107,7 +107,6 @@ fn render_svg(data: impl GraphicElementRendered, mut render: SvgRender, render_p #[cfg(feature = "vello")] #[cfg_attr(not(target_arch = "wasm32"), allow(dead_code))] async fn render_canvas(render_config: RenderConfig, data: impl GraphicElementRendered, editor: &WasmEditorApi, surface_handle: wgpu_executor::WgpuSurface) -> RenderOutput { - unimplemented!(); if let Some(exec) = editor.application_io.as_ref().unwrap().gpu_executor() { use vello::*;