Originally created by: Akarsh-Hegde
The UI's OpenObserve settings never reached an installed daemon, so OTLP export stayed disabled despite valid credentials entered in the UI.
Root cause: settings.json was resolved relative to each process's cwd. The UI (next dev, cwd <repo>/ui) wrote <repo>/settings.json, while a bundle-installed daemon runs with cwd ~/.meridian/app and read ~/.meridian/app/settings.json (absent) → fell back to defaults with no credentials. The two only ever agreed when the daemon was cargo run from the repo root. The daemon logged observability initialised (no OTLP exporter) … otel="disabled" even though the UI looked fully configured.
1. Fixed, install-independent settings path (src/config.rs, ui/lib/settings.ts)
~/.meridian/settings.json (next to meridian.db), overridable via MERIDIAN_SETTINGS_PATH.settings.json is kept only as a read-time migration fallback; the canonical path takes precedence so a UI "Apply" always reaches the daemon regardless of install type.2. Opt-in OpenObserve export with a top-level toggle (ui/components/views/SettingsView.tsx, defaults in both settings.ts and config.rs)
otlp_enabled now defaults to off (consistent default in the TS and Rust sources).Apply is unchanged and already correctly scoped: it SIGHUPs only the daemon PID, and launchd's KeepAlive relaunches that single service — screenpipe / MLX / UI are left running. (Verified the daemon is launchd-supervised; note ThrottleInterval=30 only throttles restarts within 30 s of a start.)
After this ships, the daemon reads ~/.meridian/settings.json. On an existing machine that file may be the older, credential-less one — seed it from the current repo file before deploying, e.g.:
cp <repo>/settings.json ~/.meridian/settings.json
Otherwise OTLP stays disabled and a bare "Apply" preserves an empty password (the GET would read the credless canonical file).
cargo fmt ✓ · cargo clippy --bin meridian -- -D warnings ✓ · cargo test --lib config (17 passed) ✓settings.json confirmed gitignored + untracked (no plaintext credentials in history).ui/node_modules in the worktree); the TS changes are mechanical.🤖 Generated with Claude Code
Originally posted by: Akarsh-Hegde
Code review — findings
CI is green and the feature works end-to-end (verified locally: toggle → OpenObserve starts → authenticated OTLP POST 200). Below is what I'd fix before merge, by severity.
🟠 Medium —
running: truecan be reported while OpenObserve isn't actually servingui/app/api/openobserve/route.ts:88treatslaunchctl printsucceeding as "up". Butprintreturns success as soon as the job is bootstrapped, not when the process has bound:5080. OpenObserve takes a second or two to start listening (and can crash-loop after load). This is essentially the failure the toggle is meant to make obvious — "Apply succeeded" while OO is still down. Recommend polling the real endpoint before returning:🟠 Medium — changing credentials in the UI after first boot silently has no effect
The cred→plist sync is gated on
!initialised(route.ts:67). Correct for OpenObserve's first-boot account creation, but it means a user who later edits email/password in Settings and clicks Apply gets{ok:true}while OO keeps the old login — and they'll be locked out at:5080. At minimum, detect this (creds in settings differ from what OO has) and surface "password changes require resetting the OpenObserve data dir," rather than reporting success.🟡 Low — secret handling
plutilargv (route.ts:78) and written to the plist in plaintext.execFileavoids shell injection, but the value is briefly visible inpsto other local users and the plist is world-readable (0644), same assettings.json. Considerchmod 600on both the plist andsettings.jsonon write. (Pre-existing for the plist, but this PR is where the UI starts writing it.)🟡 Low — PR scope / reviewability
16 files spanning daemon resolution, new UI route, installer, a breaking deprecation, plus a repo-wide
cargo fmtreformat of 6 unrelated files (ac1c2a6) and a product-wide CSS regression fix (d4f31c0). The fmt commit and the switch-CSS fix are independently valuable and block other PRs — strongly recommend extracting both into their own small PRs so this one is a focused, reviewable "OpenObserve opt-in" change. (The fmt fix in particular is what's currently red-CI-ing #272/#273/#274.)✅ Looks good
~/.meridian/settings.jsonresolution withMERIDIAN_SETTINGS_PATHoverride, repo path as read-only migration fallback, canonical-precedence — matches on both Rust and TS sides.MERIDIAN_OO_AUTHdeprecation logs a clear pointer to Settings; installer falls back with a warning and no longer hard-fails without creds.~/.openobserve/datais populated) is the right call and is verified (same pid before/after).Ticket changed by: Akarsh-Hegde