Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: auto-persist browser timezone on first load so daily log doesn't land on UTC's tomorrow

Adam Eivy869f8a8c604b
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 0fbde12a77..74fa083159 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -38,6 +38,8 @@
## Fixed
+- **Daily Log (and schedulers) could land on tomorrow's date for a UTC-configured server** — `ecosystem.config.cjs` forces `TZ=UTC` on the server process, so `getUserTimezone()`'s fallback (`Intl.DateTimeFormat().resolvedOptions().timeZone`) resolved to `UTC` whenever `settings.timezone` was unset. After 5pm PDT the daily-log "today" key flipped to tomorrow, creating entries like `2026-04-20` on a Sunday evening. `App.jsx` now bootstraps `settings.timezone` from the browser's IANA zone on first load if the setting is empty, so remote/VPN clients self-heal without visiting Settings → General. Skips the write if the browser itself resolves to UTC (avoids persisting a useless value).
+
- **Voice preload spawned a duplicate model instance on every server restart** — `lms load <model>` is *not* idempotent in practice; calling it on an already-loaded model spawns a SECOND instance in LM Studio (we observed 3 simultaneous copies of `qwen/qwen3-4b-2507` in one user's setup, eating 7+ GB extra). When VRAM was nearly full, the duplicate load failed with "Model loading was stopped due to insufficient system resources" and the preload reported as failed even though the original instance was fine. `preloadModel` now calls `lms ps --json`, parses `modelKey`s from the response, and skips the `lms load` if the chosen model is already loaded. Logs `🎙️ voice: <model> already loaded — skipping preload` when this fires.
- **Daily Log "let's make a daily log" opened the page but didn't start dictation, leaving the user stuck routing each utterance through the LLM** — the assistant then narrated `Appending to daily log: "..."` without actually calling `daily_log_append`, so nothing got written. Two changes: (1) `daily_log_open` tool description now says `startDictation` defaults to true for any create/write-intent phrasing ("make"/"start"/"new"/"create"/"dictate"/"record"/"talk into"/"log something"), with `startDictation=false` reserved for explicit view-only verbs ("show me"/"open"/"go to" without any write verb). (2) System prompt enumerates the create-intent phrases that should map to `daily_log_open(startDictation=true)` and explicitly tells the model to STAY QUIET after the call so the dictation system handles every following utterance without an LLM in the loop. Live-tested on qwen3-4b: 4/4 create-intent phrasings now route to dictation; 1/1 view-intent phrasing routes to navigation only.
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 025dcd4770..caa47a6580 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -1,6 +1,7 @@
-import { Suspense, lazy } from 'react';
+import { Suspense, lazy, useEffect } from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
import Layout from './components/Layout';
+import { getSettings, updateSettings } from './services/api';
import BrailleSpinner from './components/BrailleSpinner';
import Dashboard from './pages/Dashboard';
import Ambient from './pages/Ambient';
@@ -79,7 +80,24 @@ if (import.meta.hot) {
import.meta.hot.decline();
}
+// Self-heal timezone on first load: the server process runs under TZ=UTC, so
+// if settings.timezone was never set the server fallback resolves to UTC and
+// date-scoped features (daily log, schedulers) land on the wrong day. Push
+// the browser's IANA zone once so remote/VPN clients don't need to visit
+// Settings before their first entry is correct.
+function useTimezoneBootstrap() {
+ useEffect(() => {
+ getSettings().then((s) => {
+ if (s?.timezone) return;
+ const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
+ if (!tz || tz === 'UTC') return;
+ return updateSettings({ timezone: tz });
+ }).catch(() => null);
+ }, []);
+}
+
export default function App() {
+ useTimezoneBootstrap();
return (
<Suspense fallback={<PageLoader />}>
<Routes>