Files
Amber/app/schemas
greenart7c3 d1ce1dd1ed Keep logs and activity longer with a size budget
Logs were capped at 1000 rows / 3 days and history at 2000 rows / 7 days
per account. Relay lifecycle events (connecting, connected, sent, OK...)
fill the log cap within hours, so logs disappeared almost immediately.
The cap also didn't bound disk use under heavy signing: cleanup only ran
once a day.

- Merge repeated log entries: an entry identical to one logged in the
  last hour (same url, type, message) bumps a repeatCount on that row
  instead of inserting. Log DB v3 adds the column and a (url, time) index.
- Replace the row caps with LogRetentionManager: delete rows past the
  retention period, then the oldest rows in batches while the database
  is over its budget (20 MB logs, 50 MB history). It runs from
  ClearLogsWorker and, throttled to once a minute, after writes via a
  Room InvalidationTracker observer, so bursts are trimmed right away.
- Databases without auto-vacuum are switched to incremental auto-vacuum
  so deleted rows give space back to the filesystem.
- New "Keep logs for" (default 7 days) and "Keep activity for" (default
  30 days) settings in Security. Retention is read synchronously from
  SharedPreferences so a prune before the async settings load never
  applies a shorter default.
- Logs screen, relay dialog and export show the repeat count.
2026-10-16 17:26:10 -03:00
..