diff --git a/crates/cloud-providers/Cargo.toml b/crates/cloud-providers/Cargo.toml index cb8b44c..7600703 100644 --- a/crates/cloud-providers/Cargo.toml +++ b/crates/cloud-providers/Cargo.toml @@ -2,7 +2,7 @@ name = "lumotia-cloud-providers" version = "0.1.0" edition = "2021" -description = "Provider trait and BYOK cloud STT scaffolding for Lumotia (Lumotia)" +description = "Provider trait and BYOK cloud STT scaffolding for Lumotia" [dependencies] lumotia-core = { path = "../core" } diff --git a/crates/storage/src/database.rs b/crates/storage/src/database.rs index c5cde2e..dabb824 100644 --- a/crates/storage/src/database.rs +++ b/crates/storage/src/database.rs @@ -905,14 +905,16 @@ pub async fn get_setting(pool: &SqlitePool, key: &str) -> Result> Ok(row.map(|r| r.get("value"))) } -/// One-shot key rename for settings rows carried over from the lumotia era -/// (`magnotia_preferences`, `magnotia_morning_triage_last_shown`, etc.). +/// One-shot key rename for settings rows carried over from the magnotia era +/// (`magnotia_preferences`, `magnotia_morning_triage_last_shown`, etc.) to +/// the lumotia naming convention. /// /// Idempotent. Returns `(renamed, orphans_deleted)`: -/// * `renamed` — rows where only the lumotia key existed; the row's key -/// is updated to the lumotia equivalent. -/// * `orphans_deleted` — rows where BOTH keys existed; the lumotia row is -/// authoritative and the lumotia row is deleted to avoid silent debt. +/// * `renamed` — rows where only the legacy (magnotia) key existed; the +/// row's key is updated to the lumotia equivalent. +/// * `orphans_deleted` — rows where BOTH keys existed; the new (lumotia) +/// row is authoritative and the legacy (magnotia) row is deleted to +/// avoid silent debt. pub async fn migrate_legacy_setting_keys(pool: &SqlitePool) -> Result<(u64, u64)> { let mut tx = pool.begin().await.map_err(|source| Error::Query { operation: "migrate_legacy_setting_keys:begin".into(), diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 1de76df..8e25b35 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -12,7 +12,9 @@ use sqlx::SqlitePool; use tauri::Manager; use tracing_subscriber::EnvFilter; -use lumotia_core::paths::{migrate_legacy_data_dir, MigrationStatus}; +use lumotia_core::paths::{ + check_target_ambiguity, migrate_legacy_data_dir, MigrationStatus, +}; use lumotia_core::types::EngineName; use lumotia_llm::LlmEngine; use lumotia_storage::{ @@ -224,7 +226,7 @@ pub fn run() { builder .setup(|app| { - // One-shot legacy data-dir migration: rename ~/.local/share/lumotia + // One-shot legacy data-dir migration: rename ~/.local/share/magnotia // (and macOS/Windows equivalents) to the convention-preserving // lumotia path on first launch after the rebrand. Idempotent — // safe to call on every boot. A migration error is fatal: silently @@ -238,7 +240,7 @@ pub fn run() { from = %from.display(), to = %to.display(), renamed_db, - "migrated legacy lumotia data dir to lumotia" + "migrated legacy magnotia data dir to lumotia" ), Ok(MigrationStatus::TargetAlreadyExists { .. }) => {} Ok(MigrationStatus::NoLegacyFound) => {} diff --git a/src/lib/utils/localStorageMigration.ts b/src/lib/utils/localStorageMigration.ts index 758c2d4..5fee6b5 100644 --- a/src/lib/utils/localStorageMigration.ts +++ b/src/lib/utils/localStorageMigration.ts @@ -1,11 +1,12 @@ /** - * Phase 7 of the lumotia -> lumotia rebrand cascade. Persisted UI state + * Phase 7 of the magnotia -> lumotia rebrand cascade. Persisted UI state * survives the rename via one-shot key migrations run at module-load * inside the stores that own each key. * * `migrateLocalStorageKey` is idempotent and crash-safe: - * - If the new key already exists, the old key (if any) is removed - * silently — the lumotia value is authoritative. + * - If the new key already exists, the old (magnotia) key is removed + * silently — the new (lumotia) value is authoritative; the legacy + * (magnotia) key is removed. * - If only the old key exists, its value is copied to the new key and * the old key is removed. * - If neither exists, this is a no-op. diff --git a/src/lib/utils/settingsMigrations.ts b/src/lib/utils/settingsMigrations.ts index ade4121..63eea1a 100644 --- a/src/lib/utils/settingsMigrations.ts +++ b/src/lib/utils/settingsMigrations.ts @@ -1,7 +1,8 @@ /** * Forward-compatible, versioned settings migration. * - * Historically, `localStorage["lumotia_settings"]` was a bare JSON object + * Historically, `localStorage["magnotia_settings"]` (now migrated to + * `lumotia_settings` via Phase 7 of the rebrand cascade) was a bare JSON object * (whatever `SettingsState` looked like at write time). That shape * tolerates new fields cleanly — spread over `defaults` — but does not * survive: