Repository navigation
Conversation
Deleting a single folder reported nothing until its last entry was gone, because progress counted whole top-level items, so a folder with hundreds of thousands of files sat at 0% for minutes and looked frozen. Count the entries the delete workers remove, report the running count every 250 ms as a new DeleteEntriesRemoved event, and let the progress modal and dock card pulse and show "N items deleted" while one item is being deleted. Several items keep their item percentage.
|
Review pass for merge:
The deletion change itself is sound: Manual check in the QA container (600,000 files in one folder, Shift+Delete): the docked card switched from Local verification: full pinned |
|
CI note: the first run's shard 3 failed in |
…der group-write gap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQ23A9GfGFakM7LCfHpGaM
…nerate indexes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RQ23A9GfGFakM7LCfHpGaM
Description
Deleting one large folder showed no progress until its last entry was gone.
DeleteProgresscounts whole top-level items, so a single folder with hundreds of thousands of files stayed at 0% for the whole deletion and looked frozen, as #1930 describes.The delete workers now count each file, symlink and folder they remove (a counter on the
Deadlineevery delete job already carries, so no new parameter through the copy, replace and merge callers). While a permanent deletion runs,run_deletion_inreports that count every 250 ms, only when it changed, as a newOperationEvent::DeleteEntriesRemoved. The browser forwards it asBrowserEvent::DeletionEntriesRemovedfor both the modal and the docked card, and when one item is being deleted the progress view pulses and shows "N items deleted", the same presentation Empty Trash uses. With several items the item percentage stays, since the count would only flicker against it. No new strings: it uses the existing "%{items} deleted" and item count text.Not changed: the first symptom in the issue, the confirmation dialog's "Calculating total size…" step that can run for up to five minutes, is separate and untouched. A deletion that moves items to Trash is a rename and reports no count.
Visual evidence
N/A: no layout change. The progress text and pulsing bar now update while one folder is deleted.
How to test
mkdir big && cd big && seq 1 200000 | xargs touch.Expected result: the progress shows a pulsing bar and a running "N items deleted" count instead of staying at 0%. Before this change it showed 0% until the folder was gone.
Covered by
workers_count_every_file_symlink_and_folder_they_remove,removed_entries_are_reported_when_they_change_and_stop_with_the_reporter,removed_entry_counts_reach_observers_only_from_the_current_deletionandone_deleted_folder_counts_the_entries_removed_but_several_items_keep_their_percent. Disabling the worker count or the progress handler makes the matching test fail. Thelocal_operations, app, services and progress suites and the delete, trash and undo QA scenarios pass. I did not time a real 300,000-file deletion.Related issue
Part of #1930