Skip to content

fix: aborting a completed item reverts the first file instead of the target#1068

Open
People-Sea wants to merge 1 commit intopqina:masterfrom
People-Sea:fix/abort-revert-wrong-item
Open

fix: aborting a completed item reverts the first file instead of the target#1068
People-Sea wants to merge 1 commit intopqina:masterfrom
People-Sea:fix/abort-revert-wrong-item

Conversation

@People-Sea
Copy link
Contributor

@People-Sea People-Sea commented Feb 7, 2026

Problem

When clicking the abort button on a file that has already finished processing (animation still playing), ABORT_ITEM_PROCESSING dispatches REVERT_ITEM_PROCESSING with { id: item.id } instead of { query: item.id }. This causes getItemByQueryFromState to receive undefined for query, which makes getItemByQuery return items[0] — always reverting the first file in the list.

Steps to reproduce

Upload multiple files with maxParallelUploads set high (or fast connection)
Click the abort button on the second file while the completion animation is still playing
The first file gets reverted instead

Fix

- dispatch('REVERT_ITEM_PROCESSING', { id: item.id });
+ dispatch('REVERT_ITEM_PROCESSING', { query: item.id });

Before / After

Before (wrong file gets reverted):

before.mov

After (correct file gets reverted):

after.mov

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