From 82cfe41033218f9719f8f2c75d6526a217cb62cf Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Sun, 26 Jul 2026 16:32:30 +0200 Subject: [PATCH] fix: sweep only failed chips when the user aborts The abort listener also fires on navigating away while the run continues server side. Sweeping pending chips there stranded a steer the server had already acked and sent it a second time. selectLocalSteersForQueue takes a statuses argument so abort sweeps failed only. --- .../components/Chat/Input/Composer/Queue.tsx | 14 ++++-- .../Input/Composer/__tests__/Queue.spec.tsx | 7 ++- .../SSE/__tests__/useResumableSSE.spec.ts | 25 +++++++++- client/src/hooks/SSE/useResumableSSE.ts | 48 +++++++++++++------ client/src/locales/en/translation.json | 2 - 5 files changed, 73 insertions(+), 23 deletions(-) diff --git a/client/src/components/Chat/Input/Composer/Queue.tsx b/client/src/components/Chat/Input/Composer/Queue.tsx index 95b1ca79c2..0b4e2158a4 100644 --- a/client/src/components/Chat/Input/Composer/Queue.tsx +++ b/client/src/components/Chat/Input/Composer/Queue.tsx @@ -82,12 +82,16 @@ function Queue({ steering, conversationId, onEditToComposer, onRestoreToComposer - {localize( - fileCount === 1 ? 'com_ui_attachment_count_one' : 'com_ui_attachment_count', - { count: fileCount }, - )} + + {localize('com_ui_queued_attachment_count', { 0: String(fileCount) })} + + )}