From a1a54403a522b19f622816fdc41d36cbb396246f Mon Sep 17 00:00:00 2001 From: kumarabhirup Date: Thu, 12 Feb 2026 00:29:39 -0800 Subject: [PATCH] Gateway: ship Ironclaw web app as a managed sidecar - Add gateway.webApp config (enabled, port, dev) as the unified toggle for both the Next.js web UI and the built-in control UI - Spawn Next.js app alongside the gateway; stop it on shutdown - Auto-enable webApp in config for new and existing installs - Pre-build Next.js in deploy.sh and ship .next/ in the npm package so installed users get instant startup (no build step) - Gateway skips build when pre-built .next/ exists; builds on first run for dev/git-checkout users - Onboarding "Open the Web UI" now opens the Ironclaw web app - Fix pre-existing Next.js build errors (ES2023 lib, Tiptap v3 types, Suspense boundary, ReportConfig type alignment) - Rename deploy target from openclaw-ai-sdk to ironclaw Co-authored-by: Cursor --- .../components/workspace/markdown-editor.tsx | 2 +- .../workspace/report-block-node.tsx | 18 +- .../components/workspace/slash-command.tsx | 6 +- apps/web/app/workspace/page.tsx | 14 +- apps/web/lib/report-blocks.ts | 23 +-- apps/web/next.config.ts | 4 + apps/web/package-lock.json | 130 +------------ apps/web/package.json | 1 + apps/web/tsconfig.json | 4 +- package.json | 7 +- scripts/deploy.sh | 11 +- .../local/gateway-config.ts | 1 + src/config/types.gateway.ts | 11 ++ src/config/zod-schema.ts | 8 + src/gateway/server-close.ts | 5 + src/gateway/server-runtime-config.ts | 7 +- src/gateway/server-startup.ts | 16 +- src/gateway/server-web-app.ts | 184 ++++++++++++++++++ src/gateway/server.impl.ts | 27 ++- src/wizard/onboarding.finalize.ts | 34 ++-- src/wizard/onboarding.gateway-config.ts | 1 + 21 files changed, 323 insertions(+), 191 deletions(-) create mode 100644 src/gateway/server-web-app.ts diff --git a/apps/web/app/components/workspace/markdown-editor.tsx b/apps/web/app/components/workspace/markdown-editor.tsx index d234861b318..eab8bf03f1e 100644 --- a/apps/web/app/components/workspace/markdown-editor.tsx +++ b/apps/web/app/components/workspace/markdown-editor.tsx @@ -399,7 +399,7 @@ export function MarkdownEditor({ {/* Bubble menu for text selection */} - +
) => void; - deleteNode: () => void; - selected: boolean; -}) { +}: ReactNodeViewProps) { + const configAttr = node.attrs.config as string; const [showSource, setShowSource] = useState(false); - const [editValue, setEditValue] = useState(node.attrs.config); + const [editValue, setEditValue] = useState(configAttr); let parsedConfig: ReportConfig | null = null; let parseError: string | null = null; try { - const parsed = JSON.parse(node.attrs.config); + const parsed = JSON.parse(configAttr); if (parsed?.panels && Array.isArray(parsed.panels)) { parsedConfig = parsed as ReportConfig; } else { @@ -76,7 +72,7 @@ function ReportBlockView({ if (showSource) { handleSaveSource(); } else { - setEditValue(node.attrs.config); + setEditValue(configAttr); setShowSource(true); } }} @@ -128,7 +124,7 @@ function ReportBlockView({