Files
Jake 26c7307607
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled
agent: lumotia-rebrand — docs, scripts, root config, residuals
Phase 9 of the rebrand cascade. Sweep covers everything the Phase 8
frontend pass deliberately skipped: docs/, root markdown, scripts,
Cargo.toml descriptions, code comments that survived earlier
word-boundary sed, plus a handful of identifiers caught on the final
verify pass.

transcription-app changes:
- README.md, HANDOVER.md, KNOWN-ISSUES.md, run.sh — magnotia/Magnotia
  -> lumotia/Lumotia.
- docs/ — sweep across all subdirs except docs/handovers/ (preserved
  as immutable audit trail). Includes architecture-map references
  to magnotia_core::*, magnotia_storage::*, etc. now pointing at
  lumotia_*; dev-setup.md tracing output examples (lumotia_startup
  target); brief/ + superpowers/ + issues/ + whisper-ecosystem/ +
  audit/.
- Cargo.toml descriptions on 9 crates (core, audio, cloud-providers,
  hotkey, llm, mcp, plus referenced others).
- crates/core/src/{error,hardware,recommendation,paths}.rs +
  crates/audio/src/wav.rs + crates/llm/src/model_manager.rs +
  crates/cloud-providers/src/keystore.rs + crates/mcp/src/lib.rs —
  doc comments and a model-manager user-agent string.
- Caught on final pass: BroadcastChannel("magnotia_task_sync") -> ...
  ("lumotia_task_sync"); magnotia_locale i18n localStorage key
  renamed + migration shim added; CSS keyframe names
  magnotiaPulse / magnotiaBar / magnotiaFade renamed in the design-
  system kit; magnotia_viewer_item / magnotia_viewer_mode handoff
  keys renamed in HistoryPage + viewer/+page.svelte; src/assets/
  wordmark.svg text.
- src-tauri/src/lib.rs comment cleanup ("magnotia era" was sed'd
  to "lumotia era" earlier — restored).

Preserved (intentional):
- crates/core/src/paths.rs — keeps "magnotia" / "Magnotia" / ".magnotia"
  legacy detection strings in legacy_and_target_paths() so the
  migration shim can still find user data from the magnotia era.
- src/lib/stores/{page,focusTimer}.svelte.ts + src/lib/i18n/index.ts
  — migration call sites reference the legacy magnotia keys
  deliberately.
- docs/handovers/ — historical audit trail.

cargo build --workspace passes. npm run check: 0 errors / 0 warnings
(3958 files). cargo test --workspace: 339 pass / 0 fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:38:03 +01:00

3.0 KiB

name, type, slice, last_verified
name type slice last_verified
Storage file paths architecture-map-page 05-core-storage-hotkey-build 2026/05/09

Storage file paths

Where you are: Architecture mapCore, Storage, Hotkey, Build → Storage file paths

Plain English summary. Thin re-export layer. lumotia-storage::file_storage proxies the lumotia-core::paths::AppPaths accessors so callers that already depend on lumotia-storage do not need to add an explicit lumotia-core import to reach the database path.

At a glance

  • File: crates/storage/src/file_storage.rs (28 LOC).
  • External deps: standard library only. Forwards into lumotia_core::paths.
  • Public surface: app_data_dir, database_path, recordings_dir, crashes_dir, logs_dir. Re-exported from crates/storage/src/lib.rs:23.
  • Consumers: slice 2 startup; the diagnostic-report bundler; the live-session recorder writing audio to recordings_dir.

What's in here

Every function is a one-liner forwarding into the core path API:

pub fn app_data_dir() -> PathBuf {
    lumotia_core::paths::app_paths().app_data_dir()
}
pub fn database_path() -> PathBuf {
    lumotia_core::paths::app_paths().database_path()
}
pub fn recordings_dir() -> PathBuf {
    lumotia_core::paths::app_paths().recordings_dir()
}
pub fn crashes_dir() -> PathBuf {
    lumotia_core::paths::app_paths().crashes_dir()
}
pub fn logs_dir() -> PathBuf {
    lumotia_core::paths::app_paths().logs_dir()
}

Notes per directory

  • database_path<app_data>/lumotia.db. Where lumotia_storage::init creates / opens the SQLite database. Absent on first run; created with create_if_missing(true).
  • recordings_dir<app_data>/recordings/. Audio captures live here. The transcription command (slice 2) writes WAV files; their relative path is stamped onto transcripts.audio_path.
  • crashes_dir<app_data>/crashes/. The Rust panic hook writes <unix-ts>-<short-id>.crash files here. Read by the diagnostic-report bundler in Settings → About.
  • logs_dir<app_data>/logs/. Rolling log file (lumotia.log, rotated lumotia.log.1, etc). The tracing-subscriber set up in slice 2 startup (src-tauri/src/lib.rs) writes here.

The model directories (models_dir, speech_model_dir, llm_models_dir) are not re-exported here. Callers reach them directly via lumotia_core::paths::AppPaths — those calls live in slices 3 (speech models) and 4 (LLM models).

Watch-outs

  • No directory-creation side effects. These functions return paths only. Callers that need the directory to exist are responsible for std::fs::create_dir_all. The storage init function does this for the database parent (crates/storage/src/database.rs:10); other consumers should follow.
  • Repeated calls re-resolve env vars. Each invocation rebuilds AppPaths from scratch. Cheap, but noisy. Slice 2 caches a OnceLock<AppPaths> for the app lifetime.

See also