Empty Trash fails silently on huge trees (server: 'Too many subcategories'); purge automatically in chunks #539

Closed
opened 2026-10-08 06:09:04 +00:00 by sky_line · 0 comments
Owner

Symptom: Empty Trash with a Trash holding 14,593 folders and 23,399 items. AIS PURGEDESCENDENTS returned 403 Forbidden with "Too many subcategories in request". Nothing was deleted and the user got no message.

Owner decision: when the server refuses, empty the Trash automatically in parts. Refusing is bad UX, because the only manual fix is to purge piecemeal.

Design:

  • Driver: a sequential, bottom-up chunked purge. Purge or remove subtrees under an adaptive size threshold, halving the threshold on each refusal, one request at a time, with completion waits.
  • Confinement:
    • Re-check before every request that the target is still under the folder the user confirmed purging.
    • Never touch the root itself, system folders, or anything with a pending #538 copy.
  • Errors: no resend of identical requests. Stop and report on any other error.
  • UX: progress tip and completion notification.
  • #538 delete guard: switch from refusing to deferring. Queue the permanent delete and run it once the copies from that item or folder finish.
**Symptom:** Empty Trash with a Trash holding 14,593 folders and 23,399 items. AIS `PURGEDESCENDENTS` returned `403 Forbidden` with "Too many subcategories in request". Nothing was deleted and the user got no message. **Owner decision:** when the server refuses, empty the Trash automatically in parts. Refusing is bad UX, because the only manual fix is to purge piecemeal. **Design:** - **Driver:** a sequential, bottom-up chunked purge. Purge or remove subtrees under an adaptive size threshold, halving the threshold on each refusal, one request at a time, with completion waits. - **Confinement:** - Re-check before every request that the target is still under the folder the user confirmed purging. - Never touch the root itself, system folders, or anything with a pending #538 copy. - **Errors:** no resend of identical requests. Stop and report on any other error. - **UX:** progress tip and completion notification. - **#538 delete guard:** switch from refusing to deferring. Queue the permanent delete and run it once the copies from that item or folder finish.
sky_line added this to the Slipstream project 2026-10-08 06:09:04 +00:00
sky_line 2026-10-09 04:33:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#539
No description provided.