Skip to content

feat: add WebUI control panel#212

Open
harperaa wants to merge 3 commits intoqwibitai:mainfrom
harperaa:feat/webui
Open

feat: add WebUI control panel#212
harperaa wants to merge 3 commits intoqwibitai:mainfrom
harperaa:feat/webui

Conversation

@harperaa
Copy link
Copy Markdown

Summary

  • Adds a full web control panel at localhost:3100, built with Lit + Vite and served by Fastify in the main process
  • 11 tabs across 4 groups: Chat, Dashboard (Overview, Channels), Operations (Groups, Messages, Tasks, Sessions), System (Skills, Config, Logs, Debug)
  • Web chat spawns container agents and streams responses via WebSocket
  • Full CRUD for skills, CLAUDE.md editor with per-group scope, task management, session management
  • Dark theme with teal accent, production build: 125KB JS + 20KB CSS

Changes

Backend (src/webui/):

  • Fastify HTTP server with REST API + WebSocket
  • 11 API route files: overview, channels, groups, messages, tasks, sessions, chat, skills, config, logs, debug
  • LogBuffer ring buffer (2000 entries) for in-memory log API
  • GroupQueue.getState() for debug visibility
  • New db functions: getMessagesForGroup, storeChatMessage, deleteSession, getDbStats, getTaskRunLogs

Frontend (ui/):

  • Separate package with Lit + Vite, no shadow DOM
  • 11 view files, API client with WebSocket auto-reconnect
  • Forked OpenClaw CSS (base, components, layout)

Modified existing files:

  • src/config.ts: added WEBUI_PORT, WEBUI_HOST
  • src/index.ts: wire startWebServer() with processWebChat callback
  • src/logger.ts: added LogBuffer transport
  • src/db.ts: added 5 new query functions
  • src/group-queue.ts: added getState() method
  • package.json: added fastify, @fastify/websocket, @fastify/static, @fastify/cors

Test plan

  • npm run build compiles without errors
  • cd ui && npm install && npm run build builds frontend
  • Server starts and UI accessible at http://localhost:3100
  • Navigate each tab and verify data loads
  • Send a chat message and verify container spawns and response streams back
  • Test skills CRUD (create, edit, toggle, delete)
  • Test CLAUDE.md editor (save changes)
  • Verify logs page shows in-memory log entries

🤖 Generated with Claude Code

Add a full web control panel accessible at localhost:3100, built with
Lit + Vite and served by a Fastify server running in the main process.

Backend (src/webui/):
- Fastify HTTP server with REST API + WebSocket
- 11 API endpoints: overview, channels, groups, messages, tasks,
  sessions, chat, skills (full CRUD), config, logs, debug
- WebSocket for live events and chat streaming
- LogBuffer ring buffer (2000 entries) for in-memory log API
- GroupQueue.getState() for debug visibility
- New db functions: getMessagesForGroup, storeChatMessage,
  deleteSession, getDbStats, getTaskRunLogs

Frontend (ui/):
- 11 tabs in 4 groups: Chat, Dashboard, Operations, System
- Web chat spawns container agent, streams response via WebSocket
- Skills management with create, edit, toggle, delete
- CLAUDE.md editor with per-group scope selector
- Dark theme with teal accent, forked from OpenClaw CSS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@harperaa harperaa requested a review from gavrielc as a code owner February 13, 2026 20:15
Describe the built-in web control panel: tab layout, how it works
(Fastify + Lit, same process), chat pipeline, and rebuild instructions.
Update architecture diagram and key files list to include webui.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create WebUIChannel implementing Channel interface (like Telegram/WhatsApp)
- Register web@chat as group alias for main, route through standard message loop
- Remove processWebChat special path from server deps
- Add TelegramChannel with bot API support
- Log chatJid and prompt in container spawn log for external watcher support
- Auto-scroll chat to bottom on new messages

Co-Authored-By: Allen Harper <allen@openclaw.dev>
@TomGranot
Copy link
Copy Markdown
Collaborator

@gavrielc — This adds a full WebUI control panel (Lit + Vite + Fastify, 11 tabs). It has merge conflicts with #307's changes to index.ts/config.ts/db.ts. Before the author invests time rebasing — does a web UI fit the project direction?

@TomGranot
Copy link
Copy Markdown
Collaborator

WebUI control panel — we're not adding a web UI at this stage. Closing.

@Andy-NanoClaw-AI Andy-NanoClaw-AI added PR: Feature New feature or enhancement Status: Blocked Blocked by merge conflicts or dependencies labels Mar 5, 2026
@gavrielc gavrielc requested a review from gabi-simons as a code owner March 6, 2026 10:17
@Andy-NanoClaw-AI
Copy link
Copy Markdown
Collaborator

Hey @harperaa 👋 A full web control panel with 11 tabs is an incredibly ambitious contribution — the scope of work here is impressive!

That said, this is a large addition that significantly departs from NanoClaw's lean-and-simple architecture, and it now has merge conflicts with the current codebase. It hasn't seen maintainer engagement in a while.

We plan to close this soon, but you're absolutely welcome to open a fresh PR against main to revive the discussion — a lightweight version of this idea might find more traction! 🙌

@Andy-NanoClaw-AI Andy-NanoClaw-AI added the Status: Pending Closure PR flagged for closure during triage label Mar 7, 2026
@harperaa
Copy link
Copy Markdown
Author

harperaa commented Mar 7, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Feature New feature or enhancement Status: Blocked Blocked by merge conflicts or dependencies Status: Pending Closure PR flagged for closure during triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants