Originally created by: Akarsh-Hegde
Summary
- New
mlx_server.rs: MLX FastAPI server child-process manager — Approach A resolution walk (bundled venv → env override → legacy install → dev CWD), orphan reclaim on startup, PID file, health probe, spawn with kill_on_drop(false)
- New
commands/setup.rs: 6 setup wizard commands with live (not stubbed) state: is_first_run, mark_setup_complete, check_accessibility (AXIsProcessTrusted FFI), check_screen_recording (pgrep proxy), get_mlx_status, start_mlx_server_cmd
- First-run auto-open:
lib.rs spawns a task that checks ~/.meridian/onboarded after 800 ms and opens the wizard window on first launch — drag DMG → double-click → wizard appears
- Dead menu items fixed:
open_dashboard and open_worklogs (tray menu + Tauri commands) previously opened localhost:3939 (Node server retired). Now open native Tauri window at WebviewUrl::App("today"). Removed duplicate "Open Dashboard (native)" item and dead ui_base() helper
- Wizard fully wired (
ui/app/setup/page.tsx): permissions step polls every 2s (green badge when granted), model step polls every 3s and auto-starts server, OAuth buttons enabled and wired to start_oauth, Finish calls mark_setup_complete before closing
Architecture note
This builds the Approach A (bundle-venv) MLX management path, matching the final decision in Decisions/Packaging the MLX Python service into the Tauri app.md. The check_screen_recording command uses a pgrep proxy (temporary; will swap to CGPreflightScreenCaptureAccess() when B-in-process capture lands after legal sign-off).
Test plan
- [x]
cargo clippy -- -D warnings passes
- [x]
cargo fmt --check clean
- [x]
cargo test — 7 tests, 0 failures
- [x]
npm run tauri build succeeded — Meridian Tray_0.1.0_aarch64.dmg (8.3 MB) and .app bundled
- [x]
.app launches (tray icon appears, process found via pgrep)
- [x]
/setup route included in Next.js static export (shown in build route table)
- [ ] Manual: launch fresh (delete
~/.meridian/onboarded), verify wizard auto-opens after ~800 ms
- [ ] Manual: toggle Screen Recording in System Settings → green badge appears in wizard step 1
- [ ] Manual: toggle Accessibility in System Settings → green badge appears in wizard step 1
- [ ] Manual: wizard Finish →
~/.meridian/onboarded written → relaunch skips wizard
- Obsidian morning report:
Architecture/Morning Report - 2026-06-19 - DMG Onboarding.md
- Approach A decision:
Decisions/Packaging the MLX Python service into the Tauri app.md
- Screenpipe plan:
Decisions/Screenpipe relicense - fork-at-MIT then in-process capture.md
🤖 Generated with Claude Code
https://claude.ai/code/session_01M7jfB95RakvdwJ8hRogrs4
Ticket changed by: Akarsh-Hegde