Settings panel: retention editor + auto-purge controls are missing from the UI #82

Closed
opened 2026-07-30 04:41:47 +00:00 by Cordy · 0 comments
Owner

Two related gaps in the Settings dialog, both of which need the same edit site so they should be done in one pass.

1. Auto-purge has no UI control — this is a defect in what v0.3.19 claimed. The #77 backend is real and tested (opt-in flag, retention floor, hold veto, auto-purge audit event), but grep trashAutoPurge web/static/index.html returns nothing. An earlier patch step aborted before applying the Settings half and I verified only the Go side, then described the switch and the retention dropdown in the changelog as if they shipped. They didn't. Net effect today: auto-purge cannot be turned on except by writing the settings JSON directly, so the default-off behaviour is the only reachable behaviour. The changelog entry for v0.3.19 needs a correction too.

2. Retention periods are still JSON-only. settings.retentionPeriods (longest-prefix match, #63) has no editor. Intended shape: a path = duration textarea, one per line, parsed on the first = so paths containing = survive.

Known-good anchors (from the #79 splice run, so these do not need guessing again):

  • web/static/index.html:381<dialog id="settingsdlg">
  • web/static/index.html:426<button ... id="set-save" ...> , i.e. the end of the settings form; new fields go before this
  • web/static/index.html:1742 — the dialog-open handler, where current settings are populated
  • web/static/index.html:1745$("set-save").onclick, where the payload is assembled

The i18n keys are already on main from #79retentionPeriods and retentionHint exist in all four locales and are currently unused. Auto-purge needs new keys.

Lesson worth writing down: a Go-side-green patch run is not evidence the UI half applied. Any patch touching both needs an explicit post-condition assert per file, which is what caught this.

Two related gaps in the Settings dialog, both of which need the same edit site so they should be done in one pass. **1. Auto-purge has no UI control — this is a defect in what v0.3.19 claimed.** The #77 backend is real and tested (opt-in flag, retention floor, hold veto, `auto-purge` audit event), but `grep trashAutoPurge web/static/index.html` returns nothing. An earlier patch step aborted before applying the Settings half and I verified only the Go side, then described the switch and the retention dropdown in the changelog as if they shipped. They didn't. Net effect today: auto-purge cannot be turned on except by writing the settings JSON directly, so the default-off behaviour is the only reachable behaviour. The changelog entry for v0.3.19 needs a correction too. **2. Retention periods are still JSON-only.** `settings.retentionPeriods` (longest-prefix match, #63) has no editor. Intended shape: a `path = duration` textarea, one per line, parsed on the first `=` so paths containing `=` survive. **Known-good anchors** (from the #79 splice run, so these do not need guessing again): - `web/static/index.html:381` — `<dialog id="settingsdlg">` - `web/static/index.html:426` — `<button ... id="set-save" ...>` , i.e. the end of the settings form; new fields go before this - `web/static/index.html:1742` — the dialog-open handler, where current settings are populated - `web/static/index.html:1745` — `$("set-save").onclick`, where the payload is assembled The i18n keys are **already on main** from #79 — `retentionPeriods` and `retentionHint` exist in all four locales and are currently unused. Auto-purge needs new keys. **Lesson worth writing down:** a Go-side-green patch run is not evidence the UI half applied. Any patch touching both needs an explicit post-condition assert per file, which is what caught this.
Cordy closed this issue 2026-07-30 04:57:32 +00:00
Sign in to join this conversation.
No labels
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: Cordy/Cairn#82
No description provided.