From cbac06564dbef67ee3a7f1f40b40c182d0daaf01 Mon Sep 17 00:00:00 2001 From: jacentsao Date: Mon, 3 Aug 2026 12:48:31 +0800 Subject: [PATCH] fix(chat): keep attachment upload status reactive --- frontend/src/components/AttachmentUpload.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/AttachmentUpload.vue b/frontend/src/components/AttachmentUpload.vue index a5d7d484..088d5164 100644 --- a/frontend/src/components/AttachmentUpload.vue +++ b/frontend/src/components/AttachmentUpload.vue @@ -124,9 +124,13 @@ const addFiles = async (files: File[]) => { }; attachments.value.push(attachment); + // Vue wraps objects inserted into a ref-backed array with a reactive proxy. + // Keep using that proxy in async upload/poll callbacks; mutating the raw + // object above does not trigger the attachment status UI to re-render. + const reactiveAttachment = attachments.value[attachments.value.length - 1]; emit('update:files', [...attachments.value]); if (props.sessionId) { - void uploadAttachment(attachment); + void uploadAttachment(reactiveAttachment); } } };