You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Desktop: 40+ scattered UserDefaults keys without type safety or validation #5793
Settings are stored across 40+ UserDefaults string keys spread across AppBuild, UpdaterViewModel, AuthService, ChatProvider, ConversationsPage, SettingsPage, and more. Each service uses its own key namespace with no type safety — all keys are raw strings.
Impact
Typos in key names cause silent resets to defaults
No settings migration when new versions add boolean settings (existing users stuck at unexpected defaults)
Refactoring a setting name silently breaks persistence
No single source of truth — settings come from UserDefaults, Firestore (SettingsSyncManager), local Rewind DB simultaneously
Suggested Fix
Create a centralized enum PreferenceKey with type-safe accessors
Add a settings version/migration mechanism
Consolidate to single source of truth per setting
Context
Found during desktop friction exploration (PR #5790).
Files: desktop/Desktop/Sources/MainWindow/Pages/SettingsPage.swift (5500+ lines), desktop/Desktop/Sources/AppState.swift, various providers
Activity