From 64bc5222fc7763d1aec4402bf3bf881dfccdc6e2 Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Tue, 28 Jul 2026 10:53:32 +0200 Subject: [PATCH] Fix release build: box CallPanel's in-call subtree to avoid recursion limit Mesh calling's nested Show/For inside ChatShell's own Show inlined as a type parameter, blowing rustc's query recursion limit during the wasm release build (CI: "queries overflow the depth limit!"). Splitting the in-call view into its own component and type-erasing both CallPanel branches with .into_any() keeps the type shallow instead of raising the crate-wide limit. --- src/app.rs | 79 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 27 deletions(-) diff --git a/src/app.rs b/src/app.rs index f70846e..070fabd 100644 --- a/src/app.rs +++ b/src/app.rs @@ -472,45 +472,70 @@ fn CallPanel(room: Memo, me: String) -> impl IntoView { view! {
- + } + .into_any() + } else { view! { } + .into_any() } - > -
-
- - } - } - /> -
- -
-
+ }}
} + .into_any() } #[cfg(not(feature = "hydrate"))] { let _ = (room, me); - view! {
} + view! {
}.into_any() + } +} + +/// The in-call subtree (video grid + leave button), split out of +/// `CallPanel` so its ``-over-peers view doesn't get inlined as a type +/// parameter of `CallPanel`'s own `if`/`else` branch - that inlining is what +/// was blowing the compiler's query recursion limit once mesh calling's +/// nested `Show`/`For` landed inside `ChatShell`'s own `Show`. +#[cfg(feature = "hydrate")] +#[component] +fn CallActive( + local_video_ref: NodeRef, + call_state: crate::webrtc::CallState, + on_leave: impl Fn(leptos::ev::MouseEvent) + 'static, +) -> impl IntoView { + view! { +
+
+ + } + } + /> +
+ +
} }