feat: show Cancel button while completed tasks are being deleted (#2334) - #3220
feat: show Cancel button while completed tasks are being deleted (#2334)#3220oaksprout 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>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
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.