Commit 629eead
[fix] Improve batch delete error handling with Promise.allSettled
Fixed issue where partial deletion failures were not reported to users.
Previously, if some assets failed to delete, the UI would still show
"all assets deleted successfully" which could mislead users about data loss.
Changes:
- Replaced Promise.all with Promise.allSettled in deleteMultipleAssets
- Track individual success/failure for each asset deletion
- Show different toast messages based on results:
- All success: success toast with count
- All failed: error toast
- Partial success: warning toast with succeeded/failed counts
- Improved error logging with asset names for debugging
Added i18n:
- mediaAsset.selection.partialDeleteSuccess: "{succeeded} deleted successfully, {failed} failed"
This addresses PR review comment #2 (Medium Priority).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent d3070b4 commit 629eead
File tree
2 files changed
+52
-21
lines changed- src
- locales/en
- platform/assets/composables
2 files changed
+52
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2043 | 2043 | | |
2044 | 2044 | | |
2045 | 2045 | | |
2046 | | - | |
| 2046 | + | |
| 2047 | + | |
2047 | 2048 | | |
2048 | 2049 | | |
2049 | 2050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
399 | 392 | | |
400 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
401 | 408 | | |
402 | 409 | | |
403 | 410 | | |
| |||
413 | 420 | | |
414 | 421 | | |
415 | 422 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
424 | 454 | | |
425 | 455 | | |
426 | 456 | | |
| |||
0 commit comments