From a865d404310fcc4f7962b8e3dc6bf8114d9948a2 Mon Sep 17 00:00:00 2001 From: Dan Lew Date: Thu, 21 May 2026 15:23:30 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=9E=20fix:=20don't=20show=20'deleting?= =?UTF-8?q?=20file'=20toast=20on=20attached=20files=20(#13239)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two ways to add a file to a conversation: 1. Uploading a new file. 2. Using an existing file (from the side panel). If you decide to remove the file, the behavior differs depending on how it was added. If you just uploaded a new file, it gets deleted from the conversation & the system. But if it's an existing file, then it only gets removed from the conversation (but not deleted). However, in both cases, it would show a toast saying that the file was deleted, which is incorrect for the "existing file" case. Now we check whether the file is `attached` (to the system) before showing the deletion toast, and skip showing it if we're not actually deleting the file. --- client/src/components/Chat/Input/Files/FileRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Chat/Input/Files/FileRow.tsx b/client/src/components/Chat/Input/Files/FileRow.tsx index bf04b16ade..27bef5526d 100644 --- a/client/src/components/Chat/Input/Files/FileRow.tsx +++ b/client/src/components/Chat/Input/Files/FileRow.tsx @@ -115,7 +115,7 @@ export default function FileRow({ if (abortUpload && file.progress < 1) { abortUpload(); } - if (file.progress >= 1) { + if (file.progress >= 1 && !file.attached) { showToast({ message: localize('com_ui_deleting_file'), status: 'info',