You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore(desktop): prepare v0.1.6
* fix(desktop): fix launchd startup reliability — config drift, port race, stale cleanup
Root causes fixed:
- Plist config drift: after app upgrade, launchd kept using old plist with
stale paths/env vars. installService now compares content and re-bootstraps
when changed.
- White screen on startup: renderer fetched runtimeConfig before cold-start
updated ports (web port fallback to OS-assigned). IPC handler now gates on
coldStartReady promise.
- Stop button ineffective: SIGTERM + KeepAlive = instant respawn. Stop now
uses bootout (unregisters from launchd), Start re-bootstraps from plist.
- Stale plist cleanup: on startup, compares existing plists against freshly
generated ones and cleans up mismatches from old installations/versions.
Other fixes:
- Packaged mode now passes actual nexuHome for NEXU_HOME validation
- Services running without runtime-ports.json are torn down cleanly
- Dead Electron PID detected via kill(pid,0) → fresh web port used
- Web port fallback uses port:0 (OS-assigned) instead of fragile +1
- EmbeddedWebServer exposes actual bound port
- effectivePorts always returned (not just on attach)
- Removed dead tryAttachToRunningServices code
Tests: 14 new startup scenario smoke tests covering all edge cases.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: fix userData path in AGENTS.md full-reset instruction
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,12 +69,21 @@ This repo is desktop-first. Prefer the controller-first path and remove or ignor
69
69
- The desktop dev launcher is `apps/desktop/dev.sh`; it is the source of truth for tmux orchestration, sidecar builds, runtime cleanup, and stable repo-local path setup during local development.
70
70
- Treat `pnpm start` as the canonical cold-start entrypoint for the full local desktop runtime.
71
71
- The active desktop runtime path is controller-first: desktop launches `controller + web + openclaw` and no longer starts local `api`, `gateway`, or `pglite` sidecars.
72
-
- Desktop local runtime should not depend on PostgreSQL. In dev mode, all state (config, OpenClaw state, logs) lives under `.tmp/desktop/nexu-home/`, fully isolated from the packaged app's `~/.nexu/`. Launchd plists go to `.tmp/launchd/`, runtime-ports.json also lives there.
73
-
- In packaged mode, state lives under `~/.nexu/`, plists under `~/Library/LaunchAgents/`, logs under `~/.nexu/logs/`.
72
+
- Desktop local runtime should not depend on PostgreSQL. In dev mode, all state (config, OpenClaw state, logs) lives under `.tmp/desktop/nexu-home/`, fully isolated from the packaged app. Launchd plists go to `.tmp/launchd/`, runtime-ports.json also lives there.
73
+
- In packaged mode, data is split across two directories (see table below). Launchd plists go to `~/Library/LaunchAgents/`.
74
74
- Local desktop runtime state is repo-scoped under `.tmp/desktop/` in development.
|`~/Library/Application Support/@nexu/desktop/` (Electron `userData`) | OpenClaw runtime state: `runtime/openclaw/state/agents/` (conversations), `runtime/openclaw/state/extensions/` (channel state), `runtime/openclaw/state/skills/`, `runtime/openclaw/state/openclaw.json`, plus Electron internal data (Cache, IndexedDB, etc.) | No (cleaned by uninstall tools) |
82
+
83
+
The split is intentional: `NEXU_HOME` holds lightweight user preferences that should persist across reinstalls; Electron `userData` holds heavy runtime state tied to the app lifecycle. `OPENCLAW_STATE_DIR` is explicitly set by the desktop launcher to point to the `userData` path — do not rely on the controller's default fallback.
75
84
- For startup troubleshooting, use `pnpm logs` to tail dev logs.
76
-
-`pnpm reset-state` is a dev-only cleanup shortcut; it stops the stack and removes repo-local desktop runtime state under `.tmp/desktop/`, but it does not delete packaged app state in `~/.nexu/`.
77
-
- To fully reset local desktop + controller state, stop the stack, remove `.tmp/desktop/`, then remove `~/.nexu/`.
85
+
-`pnpm reset-state` is a dev-only cleanup shortcut; it stops the stack and removes repo-local desktop runtime state under `.tmp/desktop/`, but it does not delete packaged app state.
86
+
- To fully reset local desktop + controller state, stop the stack, remove `.tmp/desktop/`, then remove `~/.nexu/` and `~/Library/Application Support/@nexu/desktop/`.
78
87
- If `pnpm start` exits immediately because `electron/cli.js` cannot be resolved from `apps/desktop`, validate `pnpm -C apps/desktop exec electron --version` and consult `specs/guides/desktop-runtime-guide.md` before changing the launcher flow.
79
88
- Desktop already exposes an agent-friendly runtime observability surface; prefer subscribing/querying before adding temporary UI or ad hoc debug logging.
80
89
- For deeper desktop runtime inspection, use the existing event/query path (`onRuntimeEvent(...)`, `runtime:query-events`, `queryRuntimeEvents(...)`) instead of rebuilding one-off diagnostics.
0 commit comments