Files
Lumotia/docs/architecture-map/01-frontend/pages/first-run.md
jars a1f3f3f134 docs: architecture map (initial 5-slice generation, 105 pages)
Five-slice navigable map of the entire codebase under
docs/architecture-map/. Each slice is a self-contained
breadcrumbed sub-tree:

  01-frontend (16)              Svelte/SvelteKit UI
  02-tauri-runtime (26)         src-tauri commands + lifecycle
  03-audio-transcription (16)   audio + transcription crates
  04-llm-formatting-mcp (19)    llm, ai-formatting, mcp, cloud
  05-core-storage-hotkey-build  core, storage, hotkey, workspace,
                          (26) CI, dev glue

Plus master README.md and data-flow-end-to-end.md tracing
audio bytes from microphone to FTS5 search to MCP read.

Generated by 5 parallel subagents on 2026/05/09 against
HEAD 3c47000. Each page has YAML frontmatter, file:line code
refs, sibling cross-links, plain-English summaries.

Aggregated debt surfaced (full lists in master README):
RB-08 macOS power assertion, schema head drift v14 vs v15,
VAD blocked on ort version conflict, streaming primitives
not wired into live.rs, no prompt versioning, MCP has no
auth, cloud-providers in-memory keystore, SettingsPage
2 484 LOC, commands/live.rs 1 737 LOC, dual theme system,
brand rename to Lumenote pending across the codebase.

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

2.7 KiB

name, type, slice, last_verified
name type slice last_verified
First run page architecture-map-page 01-frontend 2026/05/09

First run page

Where you are: Architecture mapFrontendPages overview → First run

Plain English summary. What the user sees the first time they launch Magnotia, before any model is on disk. Probes hardware, recommends a Whisper model size, and downloads the chosen model (Whisper or Parakeet). On success, transitions to the dictation page.

At a glance

  • Path: src/lib/pages/FirstRunPage.svelte
  • LOC: 337
  • Imports:
    • Tauri: invoke, listen.
    • Stores: page, settings, saveSettings from page.svelte.ts. toasts.
    • Components: UnicodeSpinner.
    • External: lucide-svelte (Download, CheckCircle, Sunrise, Moon, Play).
  • Includes: also ShutdownRitualPage is imported here (suggesting the "evening ritual" preview lives in this same flow). Verify on read; treat as a coupled flow.

What's in here

Probe

  • onMount calls probe_system and rank_models (FirstRunPage.svelte:31-32) to compute recommended models given the user's RAM, GPU, OS.
  • Sets probing = false and renders the recommendation UI.

Download

  • downloadAndGo(modelId) (FirstRunPage.svelte:55-95):
    • Subscribes to model-download-progress and parakeet-download-progress events.
    • Calls download_model then load_model (Whisper) or download_parakeet_model then load_parakeet_model.
    • On success, sets ready = true and routes to dictation (page.current = "dictation").
    • Computes estimatedMinutes from elapsed and progress percent (derived.by).

Triggering

  • The shell auto sets page.current = "first-run" if list_models and list_parakeet_models are both empty (+layout.svelte:346-353).
  • Skip path: clicking "Get started" without a model lets the user opt out (still routes to dictation).

Tauri command surface

probe_system, rank_models, download_model, load_model, download_parakeet_model, load_parakeet_model. Events: model-download-progress, parakeet-download-progress.

Watch outs

  • The download is a single shot. There is no resume on cancel; if the user closes the app mid download, they restart from zero. Slice 02/05 may improve this later.
  • estimatedMinutes is a linear extrapolation. Network speed is not constant; expect the value to wiggle.
  • The page imports ShutdownRitualPage but the value of doing so should be confirmed (potential dead import).

See also