Turn Deleted files (trash) on by default #1100

Closed
opened 2026-11-04 03:10:56 +00:00 by Cordy · 5 comments
Owner

Gap (v0.7 feature-gap research, 2026-11-04, decided by Nikola). storage.trash.enabled defaults to false (docs/handbook/configuration-reference.md:264 at 0e0885db, VERIFIED); the example configs and the Helm chart do not turn it on. A fresh install deletes for good. Every competitor keeps deleted files by default.

To do. Flip the default (config, example configs, chart values), say so in the CHANGELOG upgrade notes (an existing instance without the key starts keeping deleted files, which uses space), check quota and retention interplay, and update the handbook pages that describe the default.

Refs: scratch/b7e/backlog/gap-v07/research-v07-gaps.md A9, research-owncloud10.md.

**Gap (v0.7 feature-gap research, 2026-11-04, decided by Nikola).** `storage.trash.enabled` defaults to `false` (`docs/handbook/configuration-reference.md:264` at 0e0885db, VERIFIED); the example configs and the Helm chart do not turn it on. A fresh install deletes for good. Every competitor keeps deleted files by default. **To do.** Flip the default (config, example configs, chart values), say so in the CHANGELOG upgrade notes (an existing instance without the key starts keeping deleted files, which uses space), check quota and retention interplay, and update the handbook pages that describe the default. Refs: `scratch/b7e/backlog/gap-v07/research-v07-gaps.md` A9, research-owncloud10.md.
Author
Owner

Research done (scratch/b7e/backlog/research-1100.md).

  • storage.trash.enabled becomes optional: a missing key means on, an explicit false still switches it off (the auth.perUserHomes precedent, config.go:446, :948). The chart needs no change (it does not template the server config); the two example configs get the key.
  • Existing auto-purge settings stay as stored; new installs get "delete automatically after 30 days" (the common default across competitors).
  • Start log trash enabled source=default|config and a one-time admin bell pointing to Deleted files › Retention (marker in the statestore so several instances raise it once).
  • At start, look for user folders named .trash at a space or storage top (possible while trash was off); warn and list them in the bell, never move anything.

Found on the way: retention rules are enforced only by the trash driver (cmd/cairnd/main.go:2471), so with trash off a delete destroys a file a retention rule covers; and trash counts only against the instance allowance, not personal or space quotas (quota/peruser.go:47-77), while the admin warning says it "keeps counting against storage quotas" (index.html:5680). The wording is fixed in this batch; the quota interplay goes to a follow-up.

Decisions asked of Nikola next.

**Research done** (`scratch/b7e/backlog/research-1100.md`). - `storage.trash.enabled` becomes optional: a missing key means on, an explicit `false` still switches it off (the `auth.perUserHomes` precedent, `config.go:446`, `:948`). The chart needs no change (it does not template the server config); the two example configs get the key. - Existing auto-purge settings stay as stored; new installs get "delete automatically after 30 days" (the common default across competitors). - Start log `trash enabled source=default|config` and a one-time admin bell pointing to Deleted files › Retention (marker in the statestore so several instances raise it once). - At start, look for user folders named `.trash` at a space or storage top (possible while trash was off); warn and list them in the bell, never move anything. Found on the way: retention rules are enforced only by the trash driver (`cmd/cairnd/main.go:2471`), so with trash off a delete destroys a file a retention rule covers; and trash counts only against the instance allowance, not personal or space quotas (`quota/peruser.go:47-77`), while the admin warning says it "keeps counting against storage quotas" (`index.html:5680`). The wording is fixed in this batch; the quota interplay goes to a follow-up. Decisions asked of Nikola next.
Author
Owner

Decisions (Nikola, 2026-11-04): all recommendations approved. Missing key means on, explicit false still off; new installs auto-delete after 30 days, stored settings untouched; one-time admin bell; stray .trash user folders reported in the bell and the log, never moved; example configs show the key. Next: mockup frames A (bell) and B (Retention, new and upgraded).

**Decisions (Nikola, 2026-11-04): all recommendations approved.** Missing key means on, explicit `false` still off; new installs auto-delete after 30 days, stored settings untouched; one-time admin bell; stray `.trash` user folders reported in the bell and the log, never moved; example configs show the key. Next: mockup frames A (bell) and B (Retention, new and upgraded).
Author
Owner

Mockup approved (Nikola, 2026-11-04): 1100-trash-default-mockup.html, frames A and B, its strings, and the six open points as recommended (30-day default only with no settings document and no Deleted files entries; switching auto-delete on preselects 30 days; the stray-folder notice says to rename on the storage and links a handbook section; five bell items then a summary; warning plate restyled; no bell on new installs). Next: spec and plan (.superpowers/sdd/2026-11-04-tr1100).

**Mockup approved (Nikola, 2026-11-04):** `1100-trash-default-mockup.html`, frames A and B, its strings, and the six open points as recommended (30-day default only with no settings document and no Deleted files entries; switching auto-delete on preselects 30 days; the stray-folder notice says to rename on the storage and links a handbook section; five bell items then a summary; warning plate restyled; no bell on new installs). Next: spec and plan (`.superpowers/sdd/2026-11-04-tr1100`).
Author
Owner

Spec open points decided (Nikola, 2026-11-04), after research (research-1100-unsettled.md): all verdicts approved. Notably: an upgraded instance with an explicit true and no saved settings gets "never delete" (no silent 30-day purge); a single leftover stray folder after five shows as a sixth item; the German line is corrected to "…{period} aufbewahrt und dann endgültig gelöscht"; "Open Retention" stays text inside the clickable bell item (no nested button); the quiet marker is written right after the seed; a file named .trash gets a WARN at start; FR/IT fixes as listed.

**Spec open points decided (Nikola, 2026-11-04), after research (`research-1100-unsettled.md`):** all verdicts approved. Notably: an upgraded instance with an explicit `true` and no saved settings gets "never delete" (no silent 30-day purge); a single leftover stray folder after five shows as a sixth item; the German line is corrected to "…{period} aufbewahrt und dann endgültig gelöscht"; "Open Retention" stays text inside the clickable bell item (no nested button); the quiet marker is written right after the seed; a file named `.trash` gets a WARN at start; FR/IT fixes as listed.
Cordy closed this issue 2026-11-04 15:24:43 +00:00
Author
Owner

Shipped in v0.6.395 (PR #1114, merge 329ae0ca). Both dogfoods run it (0 restarts, no ERROR); both set the key explicitly, so they log trash enabled source=config and raise no bell, as designed. The upgrade check without the key is on #1005 ("v0.6.395").

Also fixed on the way: Administration no longer saves settings that could not be loaded, a Save merges over the freshly loaded settings (fields a tab does not show are no longer reset), and Discard on Retention resets its row and warning.

Follow-up: Deleted files count only against the instance allowance, not personal or space quotas (#1115). Closing.

Shipped in **v0.6.395** (PR #1114, merge 329ae0ca). Both dogfoods run it (0 restarts, no ERROR); both set the key explicitly, so they log `trash enabled source=config` and raise no bell, as designed. The upgrade check without the key is on #1005 ("v0.6.395"). Also fixed on the way: Administration no longer saves settings that could not be loaded, a Save merges over the freshly loaded settings (fields a tab does not show are no longer reset), and Discard on Retention resets its row and warning. Follow-up: Deleted files count only against the instance allowance, not personal or space quotas (#1115). Closing.
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#1100
No description provided.