From 609ed65f4f9575e08607c03c725b5b2f66b0cb2e Mon Sep 17 00:00:00 2001 From: Dymas Date: Mon, 22 Jun 2026 10:32:32 +0200 Subject: [PATCH] Add boot phase status messages --- src/frontend/src/main.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/frontend/src/main.ts b/src/frontend/src/main.ts index dceb71b..25040d9 100644 --- a/src/frontend/src/main.ts +++ b/src/frontend/src/main.ts @@ -8,6 +8,8 @@ function setBootStatus(message: string): void { document.getElementById('boot-status')!.textContent = message; } +setBootStatus('Starting frontend bundle...'); + window.addEventListener('error', (event) => { setBootStatus(`Frontend error: ${event.message || 'unknown'}`); }); @@ -16,11 +18,17 @@ window.addEventListener('unhandledrejection', (event) => { setBootStatus(`Frontend rejection: ${String(event.reason || 'unknown')}`); }); +const bootTimeout = window.setTimeout(() => { + setBootStatus('Bootstrap still running...'); +}, 3000); + bootstrapApplication(AppComponent, appConfig) .then(() => { + window.clearTimeout(bootTimeout); document.getElementById('boot-status')?.remove(); }) .catch((err) => { + window.clearTimeout(bootTimeout); console.error(err); setBootStatus(`Bootstrap failed: ${String(err)}`); });