fix: show the chunk-load toast once per page

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-09-26 23:13:01 +02:00
co-authored by Claude Opus 5.5
parent 589908e766
commit a41fa19ead
@@ -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,