feature: sent-PDF history (10) + image retention (30) with pruning per Ben's 2026-09-02 ruling

This commit is contained in:
2026-09-02 10:27:11 +04:00
parent 8338216f23
commit 15adeec2c1
7 changed files with 966 additions and 11 deletions
+4 -1
View File
@@ -52,6 +52,7 @@ public final class AppModel {
let picker: RegionPickerController
let ledger: ReturnLedger
let watcher: ReturnWatcher
let historyStore: HistoryStore
let updateChecker: UpdateChecker
public init(
@@ -63,7 +64,7 @@ public final class AppModel {
picker: RegionPickerController,
ledger: ReturnLedger,
watcher: ReturnWatcher
) {
) throws {
self.paths = paths
self.spool = spool
self.composer = composer
@@ -72,6 +73,7 @@ public final class AppModel {
self.picker = picker
self.ledger = ledger
self.watcher = watcher
self.historyStore = try HistoryStore(paths: paths)
self.session = CaptureSession(
id: UUID(),
createdAt: Date(),
@@ -208,6 +210,7 @@ public final class AppModel {
ProcessInfo.processInfo.environment["SHOTDECK_PICKER_SELFTEST"] != nil
|| ProcessInfo.processInfo.environment["SHOTDECK_SNAPSHOT_DIR"] != nil
|| ProcessInfo.processInfo.environment["SHOTDECK_UPDATE_SELFTEST"] != nil
|| ProcessInfo.processInfo.environment["SHOTDECK_HISTORY_SELFTEST"] != nil
if !skipSchedule {
updateChecker.startSchedule()
}