fix(trash): list a large trash, empty it, and browse it by folder

A large trash never finished listing, so the Trash page kept the rows of
the last refresh that got anywhere, and Empty Trash listed the trash before
sending the delete and hung there (B293). The paging fix is in
proton-drive-rs 0.12.5.

- The refresh reads only nodes it has not stored yet, without unlocking
  file keys, keeps the time the server says each was trashed, and drops
  rows only once the whole listing is in.
- Empty Trash sends the delete at once under the trash call time limit
  and clears the stored listing. Restore and Delete Permanently drop their
  rows right away.
- Schema v47 indexes trash.parent_uid and drops the stored rows once, so
  they are read again with real deletion times.
- The Trash page groups items by the folder they were deleted from, opens
  deleted folders through the new ListTrashedFolder request, and has a
  search box and a switch back to one list. Restore and Delete Permanently
  on a folder row act on everything deleted from it.
- pdfs trash takes --by-folder and --folder UID.
This commit is contained in:
nvrl committed 2026-11-22 02:38:48 +01:00
1 parent f141d88d97
commit d0f9681593
30 files changed
+2661 -1306

No files matched your search

+3 -3
View File
@@ -17,7 +17,7 @@ Options:
--only LIST capture only these, comma-separated (default: all of
login,files,photos,photos_map,computers,sync,conflicts,
prompt_gtk,prompt_fzf). preferences_sync and
preferences_apps exist too, for pull requests only
preferences_apps and trash exist too, for pull requests only
--website DIR afterwards, copy them into the website checkout at DIR
with its scripts/sync-screenshots.sh
--settle SECS how long a page gets to load before its capture (default 3)
@@ -37,7 +37,7 @@ EOF
repo="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
all=login,files,photos,photos_map,computers,sync,conflicts,prompt_gtk,prompt_fzf
# Not in the README, so not taken by default.
extra=preferences_sync,preferences_apps
extra=preferences_sync,preferences_apps,trash
# The capture itself, run by cage inside the throwaway session (see below).
if [[ "${1:-}" == --capture ]]; then
@@ -82,7 +82,7 @@ if [[ "${1:-}" == --capture ]]; then
sleep "$SETTLE"
for shot in files:browser photos:gallery photos_map:places-map computers:devices \
sync:sync-folders conflicts:activity \
preferences_sync:preferences-sync preferences_apps:preferences-apps; do
preferences_sync:preferences-sync preferences_apps:preferences-apps trash:trash; do
name=${shot%%:*}
wants "$name" || continue
"$BIN/pdfs-app" --page "${shot#*:}"