fix: write channel stubs in openclaw config for dashboard rendering (#2657)

Write disabled telegram and whatsapp channel entries during setup so
the OpenClaw dashboard renders proper channel cards instead of showing
"Unsupported type: . Use Raw mode." Users can then configure channels
from the dashboard UI.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ahmed Abushagur 2026-03-15 10:56:42 -07:00 committed by GitHub
parent 6cf748e1b5
commit 9ca71f2da7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.18.8",
"version": "0.18.9",
"type": "module",
"bin": {
"spawn": "cli.js"

View file

@ -418,6 +418,17 @@ async function setupOpenclawConfig(
logWarn("Browser config setup failed (non-fatal)");
}
// Write channel stubs so the dashboard renders channel cards properly,
// even when the user hasn't configured them yet. Without stubs the
// dashboard shows "Unsupported type: . Use Raw mode."
await asyncTryCatchIf(isOperationalError, () =>
runner.runServer(
"export PATH=$HOME/.npm-global/bin:$HOME/.bun/bin:$HOME/.local/bin:$PATH; " +
"openclaw config set channels.telegram.enabled false >/dev/null; " +
"openclaw config set channels.whatsapp.enabled false >/dev/null",
),
);
// Configure Telegram channel if a bot token was provided
if (telegramBotToken) {
const telegramResult = await asyncTryCatchIf(isOperationalError, () =>