rouse-context/app
Jason Monk 0a0e914a2a Fix #116: Migrate all SharedPreferences usage to DataStore
Drop the last SharedPreferences call sites and replace them with typed
Preferences DataStore accessors:

- SecurityCheckPreferences: last-check time, self-cert / CT-log results,
  cert fingerprint (written by SecurityCheckWorker, read by
  TunnelForegroundService and SettingsViewModel)
- CertRenewalPreferences: last-attempt time, last outcome (written by
  CertRenewalWorker, observed by CertRenewalBannerFlow as a live Flow)
- SpuriousWakePreferences: wake counters and timestamp ring buffer,
  with the SpuriousWakeRecorder interface now suspend; the backing
  class is renamed DataStoreSpuriousWakeRecorder
- AppStatePreferences: first-launch marker and security-check interval
  (replaces the legacy rouse_settings prefs file)

Workers access their preferences through `by inject()` from Koin;
SettingsViewModel takes nullable accessor classes instead of raw
SharedPreferences. The McpSession alert gate reads from a
StateFlow-materialized view so the `() -> Boolean` contract is preserved
without reintroducing runBlocking.

Pre-release so no migration shim: legacy SharedPreferences files are
simply abandoned on upgrade. Only comments retain the SharedPreferences
word (pointing at this commit / the issue).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 21:24:08 -04:00
..
screenshots Fix #107: Wire SettingsScreen toggle + AuditHistoryViewModel for showAllMcpMessages 2026-04-14 06:35:37 -04:00
src Fix #116: Migrate all SharedPreferences usage to DataStore 2026-04-14 21:24:08 -04:00
build.gradle.kts Fix #70: Parameterize base domain for self-hosting 2026-04-12 13:06:07 -04:00
google-services.json Add Firebase: google-services.json, Google Services plugin, debug applicationIdSuffix 2026-04-05 15:38:40 -04:00
proguard-rules.pro Add ProGuard rules for Ktor JMX references 2026-04-11 15:07:22 -04:00