Deleted files 1/3: trash retention setting, disable-final-deletion, auto-purge relocation (#278) #279

Closed
opened 2026-08-19 18:43:48 +00:00 by Cordy · 1 comment
Owner

Part of epic #278.

Backend

  • Settings gain trash lifecycle keys (settings store, state-backend): trashRetention (Go duration; bounded presets in UI ~1–X months but store the raw duration so operators can set what they want) and trashFinalDeletionDisabled (bool).
  • Enforcement lives at the purge chokepoint in the trash subsystem: automatic purge honors trashRetention; when trashFinalDeletionDisabled is set, expired items are marked eligible but never purged automatically — manual purge (#280) becomes the only way out.
  • Existing auto-purge behavior/settings (currently surfaced under Retention & holds → Auto-purge, #253) are semantically trash behavior: relocate their settings fields and wiring into this topic; Retention & holds keeps its Retention and Legal holds tabs only.
  • #268 interaction: the space-name tombstone window reads this retention value at deletion time (future deletions only; existing tombstones keep their recorded windows).
  • Server-side enforcement only — the dialog/topic UI is presentation (raw API calls obey the same policy), matching the #62/#255 stance.

UI (mockup-first)

New Administration topic Deleted files (#admin/trash), Instance section, Retention tab:

  • Retention select (presets + the stored value), following the admin panel patterns from #252/#253.
  • "Never delete automatically — keep items until an administrator purges them" as a deliberate checkbox; checking it disables/greys the retention select and shows an explicit warning about unbounded trash growth and quota interaction.
  • Relocated auto-purge controls.

Acceptance

  1. Retention is admin-editable, persisted, enforced at the purge chokepoint, and survives redeploys (state-backend).
  2. With final deletion disabled, nothing auto-purges; the state is loudly visible in the topic.
  3. Auto-purge no longer appears under Retention & holds; deep links #admin/retention/autopurge (if referenced) land sensibly.
  4. Legal holds still block purge in every path.
  5. Mockup proposed and signed off before implementation ships.
Part of epic #278. ## Backend - Settings gain trash lifecycle keys (settings store, state-backend): `trashRetention` (Go duration; bounded presets in UI ~1–X months but store the raw duration so operators can set what they want) and `trashFinalDeletionDisabled` (bool). - Enforcement lives at the purge chokepoint in the trash subsystem: automatic purge honors `trashRetention`; when `trashFinalDeletionDisabled` is set, expired items are *marked eligible* but never purged automatically — manual purge (#280) becomes the only way out. - Existing auto-purge behavior/settings (currently surfaced under Retention & holds → Auto-purge, #253) are semantically trash behavior: relocate their settings fields and wiring into this topic; `Retention & holds` keeps its Retention and Legal holds tabs only. - #268 interaction: the space-name tombstone window reads this retention value at deletion time (future deletions only; existing tombstones keep their recorded windows). - Server-side enforcement only — the dialog/topic UI is presentation (raw API calls obey the same policy), matching the #62/#255 stance. ## UI (mockup-first) New Administration topic **Deleted files** (`#admin/trash`), Instance section, Retention tab: - Retention select (presets + the stored value), following the admin panel patterns from #252/#253. - "Never delete automatically — keep items until an administrator purges them" as a deliberate checkbox; checking it disables/greys the retention select and shows an explicit warning about unbounded trash growth and quota interaction. - Relocated auto-purge controls. ## Acceptance 1. Retention is admin-editable, persisted, enforced at the purge chokepoint, and survives redeploys (state-backend). 2. With final deletion disabled, nothing auto-purges; the state is loudly visible in the topic. 3. Auto-purge no longer appears under Retention & holds; deep links `#admin/retention/autopurge` (if referenced) land sensibly. 4. Legal holds still block purge in every path. 5. Mockup proposed and signed off before implementation ships.
Author
Owner

Shipped as v0.6.48 (PR #282), live on both dogfoods.

As built (per the signed-off mockup): new Deleted files topic (#admin/trash) with the Retention tab — keep-duration select first (new 60-days preset + hint), then the deliberate "Never delete automatically" checkbox (inverse of trashAutoPurge, so checked = today's default and nothing changes on upgrade), warning notice about unbounded growth/quota pressure while checked, select disabled while checked. Manual purge and Purge log show honest stubs pointing at #280/#281. Retention & holds slims to Retention + Legal holds. Zero backend change — trashAutoPurgeAfter already was the retention window.

Dogfood checklist (fresh login needed after the roll):

  • #admin/trash renders the Retention tab; checkbox arrives checked (auto-purge was never enabled here)
  • unchecking enables the select and hides the warning; Save then persists auto-purge ON — re-check + Save to restore
  • Retention & holds now shows only Retention and Legal holds
  • deep links #admin/trash/purge and #admin/trash/log land on the stub tabs
Shipped as **v0.6.48** (PR #282), live on both dogfoods. As built (per the signed-off mockup): new **Deleted files** topic (`#admin/trash`) with the Retention tab — keep-duration select first (new 60-days preset + hint), then the deliberate "Never delete automatically" checkbox (inverse of `trashAutoPurge`, so checked = today's default and nothing changes on upgrade), warning notice about unbounded growth/quota pressure while checked, select disabled while checked. Manual purge and Purge log show honest stubs pointing at #280/#281. Retention & holds slims to Retention + Legal holds. Zero backend change — `trashAutoPurgeAfter` already was the retention window. Dogfood checklist (fresh login needed after the roll): - `#admin/trash` renders the Retention tab; checkbox arrives **checked** (auto-purge was never enabled here) - unchecking enables the select and hides the warning; Save then persists auto-purge ON — re-check + Save to restore - Retention & holds now shows only Retention and Legal holds - deep links `#admin/trash/purge` and `#admin/trash/log` land on the stub tabs
Cordy closed this issue 2026-08-20 05:12:23 +00:00
Sign in to join this conversation.
No labels
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: Cordy/Cairn#279
No description provided.