From 88ed0aca54fdbe06948539e1dc763fb50c04a1bb Mon Sep 17 00:00:00 2001 From: Bastian Venegas Date: Tue, 10 Mar 2026 18:18:35 -0300 Subject: [PATCH] fix: auto-dismiss toast notifications after timeout Add a 5s default auto-dismiss for toasts. Loading toasts are excluded so they persist until their operation completes. Co-Authored-By: Claude Opus 4.6 --- apps/web/src/components/ui/toast.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/ui/toast.tsx b/apps/web/src/components/ui/toast.tsx index 768a083e2e..14495bdc4d 100644 --- a/apps/web/src/components/ui/toast.tsx +++ b/apps/web/src/components/ui/toast.tsx @@ -27,6 +27,8 @@ const anchoredToastManager = Toast.createToastManager(); type ToastId = ReturnType; const threadToastVisibleTimeoutRemainingMs = new Map(); +const DEFAULT_DISMISS_AFTER_VISIBLE_MS = 5_000; + const TOAST_ICONS = { error: CircleAlertIcon, info: InfoIcon, @@ -263,7 +265,7 @@ function Toasts({ position = "top-right" }: { position: ToastPosition }) { toast={toast} >