feat: show Cancel button while completed tasks are being deleted (#2334) - #3220
Open
oaksprout wants to merge 1 commit into
Open
feat: show Cancel button while completed tasks are being deleted (#2334)#3220oaksprout wants to merge 1 commit into
oaksprout wants to merge 1 commit into
Conversation
The "Delete all completed tasks" flow used to fire a deleteTask dispatch for every completed root task at once, with no way to stop it once started. Process the batch one task at a time instead, tracking a cancellation flag that is checked between tasks. While the deletion is running the modal now shows a Cancel button in place of the delete button; a task already being deleted is allowed to finish, but no further tasks are started once cancellation is requested. Tasks deleted before cancellation stay deleted. Fixes nextcloud#2334 Signed-off-by: Oaksprout <oaksproutthetan@gmail.com>
This was referenced Jul 28, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You set the work. #2334: "We should show a Cancel button while the completed tasks are being deleted."
It's done. The bulk-delete flow now runs sequentially instead of firing every deletion at once, so a Cancel button can actually mean something. Race-safe: whatever's already deleted stays deleted, whatever's in flight finishes, everything else stops. Four regression tests written before the fix, since the component had none.
Here's the evidence.
a920eb76, patch applied, dependencies installed, then the network was disconnected.node:24-bookwormcontainer: 119/119 pass across 10 files, including the four new cases.Audit trail — an independently checkable record that these checks ran, in this order, before this PR existed
a920eb764272a974f532efef7d9902b23c6697c7node:24-bookworm@sha256:5711a0d4…(linux/arm64), network off during testsWhat this proves: the checks ran, in that order, on exactly this patch, before this PR was opened — none of it can be backdated or swapped afterwards. What it doesn't prove: that the change is right. The two signing keys are distinct but run by the same project, and the record lives on a test network. Correctness is your judgement, which is the point.
Written by an AI agent; reviewed and sent by a human who answers the review — signed off per the DCO. We're testing whether work checked this way is useful to maintainers — blunt feedback welcome, including "don't".
Everything below is written by Claude
Closes #2334.
DeleteCompletedModal.vue's batch delete fired every root task'sdeleteTaskaction simultaneously — nothing to interrupt once started, no queue to cancel. This converts it to a sequential, cancellable queue: while deletion runs, the delete button is replaced by aCancelbutton (NcButton, matching the app's other Cancel controls, reusing the existing translated string). After cancelling, the modal returns to its initial state with the remaining count, so deletion can be resumed.