diff --git a/CHANGELOG.md b/CHANGELOG.md index 49fcc6a7d..9af15bc19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ - Control UI: add Docs link, remove chat composer divider, and add New session button. - Control UI: link sessions list to chat view. (#471) — thanks @HazAT - Control UI: queue outgoing chat messages, add Enter-to-send, and show queued items. (#527) — thanks @YuriNachos +- Control UI: drop explicit `ui:install` step; `ui:build` now auto-installs UI deps (docs + update flow). - Telegram: retry long-polling conflicts with backoff to avoid fatal exits. - Telegram: fix grammY fetch type mismatch when injecting `fetch`. (#512) — thanks @YuriNachos - WhatsApp: resolve @lid JIDs via Baileys mapping to unblock inbound messages. (#415) diff --git a/README.md b/README.md index 66a8612d2..d51cbb50a 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,7 @@ git clone https://github.com/clawdbot/clawdbot.git cd clawdbot pnpm install -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run pnpm build pnpm clawdbot onboard --install-daemon diff --git a/docs/index.md b/docs/index.md index 249b90ae4..35332ecf1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -118,8 +118,7 @@ From source (development): git clone https://github.com/clawdbot/clawdbot.git cd clawdbot pnpm install -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run pnpm build pnpm clawdbot onboard --install-daemon ``` diff --git a/docs/install/updating.md b/docs/install/updating.md index 913227a11..061a39874 100644 --- a/docs/install/updating.md +++ b/docs/install/updating.md @@ -59,8 +59,7 @@ From the repo checkout: git pull pnpm install pnpm build -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run pnpm clawdbot doctor pnpm clawdbot health ``` diff --git a/docs/platforms/windows.md b/docs/platforms/windows.md index c74253552..a65534440 100644 --- a/docs/platforms/windows.md +++ b/docs/platforms/windows.md @@ -95,8 +95,7 @@ Follow the Linux Getting Started flow inside WSL: git clone https://github.com/clawdbot/clawdbot.git cd clawdbot pnpm install -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run pnpm build pnpm clawdbot onboard ``` diff --git a/docs/start/clawd.md b/docs/start/clawd.md index c93163519..9dde7d4f1 100644 --- a/docs/start/clawd.md +++ b/docs/start/clawd.md @@ -37,8 +37,7 @@ From source (development): git clone https://github.com/clawdbot/clawdbot.git cd clawdbot pnpm install -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run pnpm build pnpm link --global ``` diff --git a/docs/start/faq.md b/docs/start/faq.md index 6e1e95c8a..06be764b1 100644 --- a/docs/start/faq.md +++ b/docs/start/faq.md @@ -64,8 +64,7 @@ pnpm install pnpm build # If the Control UI assets are missing or you want the dashboard: -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run pnpm clawdbot onboard ``` diff --git a/docs/start/getting-started.md b/docs/start/getting-started.md index b940dd738..f81d70a20 100644 --- a/docs/start/getting-started.md +++ b/docs/start/getting-started.md @@ -135,8 +135,7 @@ If you’re hacking on Clawdbot itself, run from source: git clone https://github.com/clawdbot/clawdbot.git cd clawdbot pnpm install -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run pnpm build pnpm clawdbot onboard --install-daemon ``` diff --git a/docs/start/wizard.md b/docs/start/wizard.md index d399d5b3b..cee53f260 100644 --- a/docs/start/wizard.md +++ b/docs/start/wizard.md @@ -120,7 +120,7 @@ Tip: `--json` does **not** imply non-interactive mode. Use `--non-interactive` ( 9) **Finish** - Summary + next steps, including iOS/Android/macOS apps for extra features. - If no GUI is detected, the wizard prints SSH port-forward instructions for the Control UI instead of opening a browser. - - If the Control UI assets are missing, the wizard attempts to build them; fallback is `pnpm ui:install && pnpm ui:build`. + - If the Control UI assets are missing, the wizard attempts to build them; fallback is `pnpm ui:build` (auto-installs UI deps). ## Remote mode diff --git a/docs/web/control-ui.md b/docs/web/control-ui.md index 348b2f9d2..7d00288c8 100644 --- a/docs/web/control-ui.md +++ b/docs/web/control-ui.md @@ -74,8 +74,7 @@ Paste the token into the UI settings (sent as `connect.params.auth.token`). The Gateway serves static files from `dist/control-ui`. Build them with: ```bash -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run ``` Optional absolute base (when you want fixed asset URLs): @@ -87,8 +86,7 @@ CLAWDBOT_CONTROL_UI_BASE_PATH=/clawdbot/ pnpm ui:build For local development (separate dev server): ```bash -pnpm ui:install -pnpm ui:dev +pnpm ui:dev # auto-installs UI deps on first run ``` Then point the UI at your Gateway WS URL (e.g. `ws://127.0.0.1:18789`). diff --git a/docs/web/index.md b/docs/web/index.md index 89eed6e68..6c4945e59 100644 --- a/docs/web/index.md +++ b/docs/web/index.md @@ -101,6 +101,5 @@ Open: The Gateway serves static files from `dist/control-ui`. Build them with: ```bash -pnpm ui:install -pnpm ui:build +pnpm ui:build # auto-installs UI deps on first run ``` diff --git a/src/gateway/control-ui.ts b/src/gateway/control-ui.ts index 8f69e806a..d2af6c883 100644 --- a/src/gateway/control-ui.ts +++ b/src/gateway/control-ui.ts @@ -157,7 +157,7 @@ export function handleControlUiHttpRequest( res.statusCode = 503; res.setHeader("Content-Type", "text/plain; charset=utf-8"); res.end( - "Control UI assets not found. Build them with `bun run ui:build` (or run `bun run ui:dev` during development).", + "Control UI assets not found. Build them with `pnpm ui:build` (auto-installs UI deps), or run `pnpm ui:dev` during development.", ); return true; } diff --git a/src/infra/control-ui-assets.ts b/src/infra/control-ui-assets.ts index 0b995a0cd..9c46d5a9d 100644 --- a/src/infra/control-ui-assets.ts +++ b/src/infra/control-ui-assets.ts @@ -76,7 +76,7 @@ export async function ensureControlUiAssetsBuilt( return { ok: false, built: false, - message: `${hint}. Build them with \`bun run ui:build\`.`, + message: `${hint}. Build them with \`pnpm ui:build\` (auto-installs UI deps).`, }; } @@ -94,27 +94,7 @@ export async function ensureControlUiAssetsBuilt( }; } - runtime.log("Control UI assets missing; building (ui:build)…"); - - const ensureInstalled = !fs.existsSync( - path.join(repoRoot, "ui", "node_modules"), - ); - if (ensureInstalled) { - const install = await runCommandWithTimeout( - [process.execPath, uiScript, "install"], - { - cwd: repoRoot, - timeoutMs: opts?.timeoutMs ?? 10 * 60_000, - }, - ); - if (install.code !== 0) { - return { - ok: false, - built: false, - message: `Control UI install failed: ${summarizeCommandOutput(install.stderr) ?? `exit ${install.code}`}`, - }; - } - } + runtime.log("Control UI assets missing; building (ui:build, auto-installs UI deps)…"); const build = await runCommandWithTimeout( [process.execPath, uiScript, "build"], diff --git a/src/infra/update-runner.ts b/src/infra/update-runner.ts index bdc25a7d8..68eea79fb 100644 --- a/src/infra/update-runner.ts +++ b/src/infra/update-runner.ts @@ -304,15 +304,6 @@ export async function runGatewayUpdate( timeoutMs, ), ); - steps.push( - await runStep( - runCommand, - "ui:install", - managerScriptArgs(manager, "ui:install"), - gitRoot, - timeoutMs, - ), - ); steps.push( await runStep( runCommand,