From a41fa19eadc308c4d01cd9d03f9e7f6bc69e18a3 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 26 Sep 2026 23:13:01 +0200 Subject: [PATCH] fix: show the chunk-load toast once per page Co-Authored-By: Claude Opus 5.5 (1M context) --- frontend/src/routes/(root)/+layout.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/routes/(root)/+layout.svelte b/frontend/src/routes/(root)/+layout.svelte index 56b8806578..ca03f417d8 100644 --- a/frontend/src/routes/(root)/+layout.svelte +++ b/frontend/src/routes/(root)/+layout.svelte @@ -36,6 +36,8 @@ 'Importing a module script failed', 'Unable to preload CSS' ] + // One failed component rejects once per chunk and stylesheet it needed. + let chunkLoadToastShown = false const monacoEditorUnhandledErrors = [ 'Model not found', @@ -217,6 +219,8 @@ // a component loaded on demand would otherwise silently never appear. if (chunkLoadErrors.some((m) => message.startsWith(m))) { console.warn(message) + if (chunkLoadToastShown) return + chunkLoadToastShown = true sendUserToast( 'Part of the page failed to load, Windmill may have been updated', true,