Skip to content

fix(csv-import): fire notification and clear box for failed imports without error payload - #3152

Draft
okxint wants to merge 1 commit into
appwrite:mainfrom
okxint:fix/csv-import-notification-stuck
Draft

fix(csv-import): fire notification and clear box for failed imports without error payload#3152
okxint wants to merge 1 commit into
appwrite:mainfrom
okxint:fix/csv-import-notification-stuck

Conversation

@okxint

@okxint okxint commented Aug 9, 2026

Copy link
Copy Markdown

What changed

Two bugs compounded to leave the CSV import notification box permanently visible after a failed import.

Bug 1 — isError gate skipped on empty errors

showCompletionNotification checked const isError = !isSuccess && !!payload.errors. If a failed import had errors: null, undefined, or [], isError was falsy and the function returned early — no toast notification, no cleanup.

Bug 2 — import item never removed from importItems

updateOrAddItem called showCompletionNotification on terminal statuses but never removed the item from the importItems map. Since the box is only hidden when importItems.size === 0, it stayed open.

Fix

  1. Use payload.status === 'failed' instead of !!payload.errors to determine error state.
  2. Delete the item from importItems after the notification fires on every terminal status.

Closes related open issue #2877.

…mports 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant