feat: implement settings migration from localStorage to server

- Added logic to perform settings migration, merging localStorage data with server settings if necessary.
- Introduced `localStorageMigrated` flag to prevent re-migration on subsequent app loads.
- Updated `useSettingsMigration` hook to handle migration and hydration of settings.
- Ensured localStorage values are preserved post-migration for user flexibility.
- Enhanced documentation within the migration logic for clarity.
This commit is contained in:
webdevcody
2026-01-07 14:29:32 -05:00
parent 70c04b5a3f
commit e58e389658
3 changed files with 124 additions and 37 deletions

View File

@@ -387,6 +387,10 @@ export interface GlobalSettings {
/** Version number for schema migration */
version: number;
// Migration Tracking
/** Whether localStorage settings have been migrated to API storage (prevents re-migration) */
localStorageMigrated?: boolean;
// Onboarding / Setup Wizard
/** Whether the initial setup wizard has been completed */
setupComplete: boolean;