From 1937c509b15f397f5034559b4a68e80feded6d6e Mon Sep 17 00:00:00 2001 From: okxint Date: Sun, 9 Aug 2026 18:22:29 +0530 Subject: [PATCH] fix(csv-import): clear import item and fire notification for failed imports without error payload Failed imports with empty or null errors array caused isError to be false, silently skipping the notification and leaving the import box permanently visible. Use status comparison instead of errors truthiness, and remove the completed item from importItems after notification fires so the box closes once all imports finish. --- src/lib/components/csvImportBox.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/components/csvImportBox.svelte b/src/lib/components/csvImportBox.svelte index 6069ac4c41..2f7bf70ace 100644 --- a/src/lib/components/csvImportBox.svelte +++ b/src/lib/components/csvImportBox.svelte @@ -39,7 +39,7 @@ async function showCompletionNotification(database: string, table: string, payload: Payload) { const isSuccess = payload.status === 'completed'; - const isError = !isSuccess && !!payload.errors; + const isError = !isSuccess && payload.status === 'failed'; if (!isSuccess && !isError) return; @@ -118,6 +118,9 @@ if (status === 'completed' || status === 'failed') { await showCompletionNotification(databaseId, tableId, importData); + const next = new Map(importItems); + next.delete(importData.$id); + importItems = next; } }