--- name: First run page type: architecture-map-page slice: 01-frontend last_verified: 2026/05/09 --- # First run page > **Where you are:** [Architecture map](../../README.md) → [Frontend](../README.md) → [Pages overview](../pages-overview.md) → 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 - [Pages overview](../pages-overview.md). When this page is forced. - [Frontend ↔ Tauri bridge](../frontend-tauri-bridge.md). Probe and download commands. - [Windows and routes](../windows-and-routes.md). Shell triggers.