From 82ccacb7beb27fe67917bde7f93b9c302bd21ca2 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Thu, 22 Jan 2026 23:47:01 -0500 Subject: [PATCH] Reduce toast notification duration to 2500ms and suppress MessageAbortedError toasts --- frontend/src/App.tsx | 1 + frontend/src/hooks/useSSE.ts | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3ae06d48..6cd23eda 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -47,6 +47,7 @@ function RouterContent() { expand={false} richColors closeButton + duration={2500} /> ) diff --git a/frontend/src/hooks/useSSE.ts b/frontend/src/hooks/useSSE.ts index 0a00b3dc..f91d57c1 100644 --- a/frontend/src/hooks/useSSE.ts +++ b/frontend/src/hooks/useSSE.ts @@ -292,11 +292,14 @@ export const useSSE = (opcodeUrl: string | null | undefined, directory?: string, if (!('error' in event.properties)) break if ('sessionID' in event.properties && event.properties.sessionID === currentSessionId) break - const parsed = parseOpenCodeError(event.properties.error) + const error = event.properties.error + if (error?.name === 'MessageAbortedError') break + + const parsed = parseOpenCodeError(error) if (parsed) { showToast.error(parsed.title, { description: parsed.message, - duration: 6000, + duration: 2500, }) } break