Skip to main content

max / goingson

Seed new installs at 1 backup, matching every other default backup_scheduler seeded max_backups_to_keep at 10 while BackupSettings::default, the repo default, and the column default in 029_backup_frequency_minutes.sql all use 1, so a fresh install started on a value no other layer agreed with and the retention list did not offer. Drops the Keep 10 backups option added in 5bb11dd along with it.
Author: Max Johnson <me@maxj.phd> · 2026-07-26 21:01 UTC
Signed with PGP, not checked
Commit: 36aa0621f734759fbd00f10e2e3d319cfa5f8135
Parent: 5bb11dd
3 files changed, +5 insertions, -9 deletions
@@ -124,7 +124,10 @@
124 124 let defaults = goingson_core::NewBackupSettings {
125 125 auto_backup_enabled: true,
126 126 backup_frequency_minutes: 15,
127 - max_backups_to_keep: 10,
127 + // 1 to match BackupSettings::default, the repo default, and the
128 + // column default in 029_backup_frequency_minutes.sql. The
129 + // MIN_BACKUPS_TO_KEEP floor above still keeps three generations.
130 + max_backups_to_keep: 1,
128 131 };
129 132 state
130 133 .backup_settings
@@ -241,9 +241,6 @@
241 241 { value: 1, label: 'Keep 1 backup (Recommended)' },
242 242 { value: 3, label: 'Keep 3 backups' },
243 243 { value: 7, label: 'Keep 7 backups' },
244 - // 10 is what backup_scheduler.rs seeds a fresh install with, so the
245 - // list has to carry it or that default has no option to select.
246 - { value: 10, label: 'Keep 10 backups' },
247 244 { value: 14, label: 'Keep 14 backups' },
248 245 { value: 0, label: 'Keep all backups' },
249 246 ];
@@ -13,7 +13,7 @@
13 13 // Mirror of NewBackupSettings in src-tauri/src/backup_scheduler.rs; used only
14 14 // to decide whether the backup "Customize" disclosure starts open.
15 15 const DEFAULT_BACKUP_FREQUENCY_MINUTES = 15;
16 - const DEFAULT_BACKUPS_TO_KEEP = 10;
16 + const DEFAULT_BACKUPS_TO_KEEP = 1;
17 17
18 18 // Settings Page
19 19
@@ -221,10 +221,6 @@
221 221 { value: 1, label: 'Keep 1 backup (Recommended)' },
222 222 { value: 3, label: 'Keep 3 backups' },
223 223 { value: 7, label: 'Keep 7 backups' },
224 - // 10 is what backup_scheduler.rs seeds a fresh install with, so
225 - // the list has to carry it or that default has no option to
226 - // select. Duplicated in export.js's backup settings modal.
227 - { value: 10, label: 'Keep 10 backups' },
228 224 { value: 14, label: 'Keep 14 backups' },
229 225 { value: 0, label: 'Keep all backups' },
230 226 ];