From a2f24273ce9fe775487f21bd6a5e07013fc1c6b5 Mon Sep 17 00:00:00 2001 From: Christophe Vila Date: Tue, 4 Aug 2026 00:04:03 +0200 Subject: [PATCH] feat(frontend): error banners persist until manually dismissed Co-Authored-By: Claude Fable 5 --- frontend/src/banner.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/banner.ts b/frontend/src/banner.ts index 1c6d63b..7fc6ec3 100644 --- a/frontend/src/banner.ts +++ b/frontend/src/banner.ts @@ -6,6 +6,8 @@ export interface BannerEntry { message: string; } +// Non-error banners clean themselves up; errors stay until the user +// dismisses them, so a failure can't silently vanish before it's read. const DISMISS_AFTER_MS = 8000; let banners: BannerEntry[] = []; @@ -25,7 +27,9 @@ function show(severity: BannerSeverity, message: string): void { const id = nextId++; banners = [{ id, severity, message }, ...banners]; notify(); - setTimeout(() => dismiss(id), DISMISS_AFTER_MS); + if (severity !== "error") { + setTimeout(() => dismiss(id), DISMISS_AFTER_MS); + } } export function showError(message: string): void {