feat: web admin dashboard — phase 1 prototype #48

Open
nazim wants to merge 15 commits from nazim/cobot:feat/web-admin into main
Contributor

Web Admin Dashboard + Plugin Enhancements

Web Admin (Starlette + HTMX + Pico CSS)

Plugin-contributed admin dashboard. Plugins extend via web_panels(), web_settings(), web_routes().

Plugin Extension Map

Plugin Capability Implements Extension Points Web CLI
config config panel
ppq llm llm.chat, llm.models panel + settings
ollama llm llm.chat, llm.models
communication communication.* panel
session communication.* session.*
nostr communication session.receive/send panel + settings identity, relays, dm, inbox
telegram session.* telegram.command/callback
wallet wallet panel + settings balance, address, pay
tools tools panel + settings list, run
security security panel + settings
knowledge knowledge, tools memory.* panel + settings
logger loop.on_message/after_send/on_error panel + settings
compaction loop.transform_history
persistence loop.on_message/after_send
soul loop.transform_system_prompt
memory memory.* store, get, search
memory_files memory.*
loop loop loop.*
pairing telegram.command/callback, filedrop.verify list, approve, reject, revoke
web loop (self)

Dashboard Styling

  • Background matched to logo (#0d0f14)
  • SVG logo in sidebar (from docs/logo.svg)

CLI Commands Added

  • cobot wallet balance|address|pay <invoice>
  • cobot nostr identity|relays|dm <recipient> <message>|inbox [--since N]
  • cobot tools list|run <command> [-t timeout]

Tests

  • 139 unit tests passing
  • 36 Playwright e2e tests (gracefully skipped when playwright not installed)

Dependencies

Web admin requires: starlette, jinja2, uvicorn (optional — graceful fallback)

## Web Admin Dashboard + Plugin Enhancements ### Web Admin (Starlette + HTMX + Pico CSS) Plugin-contributed admin dashboard. Plugins extend via `web_panels()`, `web_settings()`, `web_routes()`. ### Plugin Extension Map | Plugin | Capability | Implements | Extension Points | Web | CLI | |--------|-----------|------------|-----------------|-----|-----| | `config` | config | — | — | panel | — | | `ppq` | llm | `llm.chat`, `llm.models` | — | panel + settings | — | | `ollama` | llm | `llm.chat`, `llm.models` | — | — | — | | `communication` | — | — | `communication.*` | panel | — | | `session` | — | `communication.*` | `session.*` | — | — | | `nostr` | communication | `session.receive/send` | — | panel + settings | `identity`, `relays`, `dm`, `inbox` | | `telegram` | — | `session.*` | `telegram.command/callback` | — | — | | `wallet` | wallet | — | — | panel + settings | `balance`, `address`, `pay` | | `tools` | tools | — | — | panel + settings | `list`, `run` | | `security` | security | — | — | panel + settings | — | | `knowledge` | knowledge, tools | — | `memory.*` | panel + settings | — | | `logger` | — | `loop.on_message/after_send/on_error` | — | panel + settings | — | | `compaction` | — | `loop.transform_history` | — | — | — | | `persistence` | — | `loop.on_message/after_send` | — | — | — | | `soul` | — | `loop.transform_system_prompt` | — | — | — | | `memory` | — | — | `memory.*` | — | `store`, `get`, `search` | | `memory_files` | — | `memory.*` | — | — | — | | `loop` | loop | — | `loop.*` | — | — | | `pairing` | — | `telegram.command/callback`, `filedrop.verify` | — | — | `list`, `approve`, `reject`, `revoke` | | `web` | loop | — | — | (self) | — | ### Dashboard Styling - Background matched to logo (`#0d0f14`) - SVG logo in sidebar (from `docs/logo.svg`) ### CLI Commands Added - `cobot wallet balance|address|pay <invoice>` - `cobot nostr identity|relays|dm <recipient> <message>|inbox [--since N]` - `cobot tools list|run <command> [-t timeout]` ### Tests - 139 unit tests passing - 36 Playwright e2e tests (gracefully skipped when playwright not installed) ### Dependencies Web admin requires: `starlette`, `jinja2`, `uvicorn` (optional — graceful fallback)
feat: web admin dashboard — phase 1 prototype (#43)
Some checks failed
CI / lint (pull_request) Successful in 9s
E2E Tests / e2e (pull_request) Failing after 3s
CI / test (3.11) (pull_request) Successful in 22s
CI / test (3.12) (pull_request) Successful in 23s
CI / test (3.13) (pull_request) Successful in 26s
CI / build (pull_request) Successful in 10s
34a4d32591
Plugin-contributed admin dashboard using Starlette + HTMX + Jinja2.

Base class additions:
- web_panels() → dashboard cards (structured data, framework renders)
- web_settings() → config UI declarations
- web_routes() → custom API endpoints (auto-namespaced)

Data types: WebPanel, WebSetting, WebRoute

Web plugin (cobot/plugins/web/):
- Starlette app as loop plugin (runs alongside main loop)
- Collects contributions from all plugins on start
- Dashboard page with HTMX auto-refresh panels
- Settings page with generated forms
- Panel content rendered as HTML fragments (kv, table, log, markdown)
- Pico.css for styling, ~14KB HTMX, zero build step

Plugin contributions (3 plugins wired up):
- logger: live log stream panel + log level setting
- ppq: LLM status panel (model, API key, base URL) + settings
- communication: channel status table

Config: web.enabled, web.host (default 127.0.0.1), web.port (default 8080)
Dependencies: starlette, uvicorn, jinja2 (optional — graceful fallback)
test: add 34 Playwright e2e tests for web admin plugin
Some checks failed
CI / test (3.11) (pull_request) Failing after 13s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 14s
E2E Tests / e2e (pull_request) Failing after 3s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
506c54543e
Tests cover:
- Dashboard: page load, nav, category headers, KV/table/log/markdown panels, dark theme
- Settings: page load, grouped by plugin, number/bool/select/secret inputs, help text, restart warnings
- API: panels list, panel content (all kinds), error handling, 404, settings list/save, custom routes
- Navigation: dashboard <-> settings
- Edge case: empty dashboard/settings with no plugin contributions

Uses mock plugins contributing panels, settings, and custom routes.
Requires: starlette, jinja2, uvicorn, playwright, pytest-playwright
fix: clearer web plugin startup messages
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
E2E Tests / e2e (pull_request) Failing after 2s
CI / lint (pull_request) Successful in 8s
CI / test (3.12) (pull_request) Failing after 13s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
106203cc7b
- Missing deps: '⚠️ Not starting — starlette not installed'
- Success: '🌐 Admin dashboard ready at http://...'
- Include uvicorn in the starlette error hint
fix: WebPlugin._registry not set when started by real registry
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
E2E Tests / e2e (pull_request) Failing after 3s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 13s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
b14f84505c
_collect_contributions() now falls back to get_registry() if _registry
wasn't explicitly set (e.g. in tests). Fixes AttributeError on cobot run.
fix: static/ dir missing crashes startup
Some checks failed
CI / test (3.11) (pull_request) Failing after 12s
E2E Tests / e2e (pull_request) Failing after 2s
CI / lint (pull_request) Successful in 10s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
3e0e37ad42
- Add .gitkeep to static/ so git tracks the empty directory
- Make static mount conditional (skip if dir doesn't exist)
fix: web admin server not actually listening
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
E2E Tests / e2e (pull_request) Failing after 3s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 13s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
c03d6ce6ba
The web plugin declared 'loop' capability but run() was never called —
the main agent loop doesn't dispatch loop plugins yet (needs PR #34).

Fix: add start_background() method that creates a background asyncio task,
and call it from agent.run_loop() for all loop-capable plugins.

This is a bridge until the loop plugin architecture is merged.
nazim force-pushed feat/web-admin from c03d6ce6ba
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
E2E Tests / e2e (pull_request) Failing after 3s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 13s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
to b0f04e4d06
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
2026-02-20 18:17:26 +00:00
Compare
fix: start loop plugins (web admin) in stdin mode too
Some checks failed
CI / test (3.11) (pull_request) Failing after 12s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 13s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
064aa2e7db
run_stdin only talked to the first loop plugin. Now all other
loop-capable plugins (like web admin) run as background tasks,
so the dashboard is available in both --stdin and normal mode.
fix: cli.py calls run_loop_sync but agent.py has run_sync
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
CI / lint (pull_request) Successful in 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
4d1ef873eb
Also fixes stdin mode — both modes now start all loop plugins.
ui: sidebar layout + per-plugin settings navigation
Some checks failed
CI / test (3.11) (pull_request) Failing after 12s
CI / lint (pull_request) Successful in 10s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
edddc686c1
- Replace top nav with persistent left sidebar (220px)
- Dashboard and Settings as prominent sidebar links with icons
- Settings page: plugin list in sidebar, click to show only that plugin
- Auto-selects first plugin when visiting /settings
- URL-addressable: /settings/mock-table shows only mock-table settings
- Added 2 new Playwright tests (plugin navigation, sidebar visible)
- Updated existing tests for new layout (36 total e2e tests)
feat: add logo + web panels for wallet/nostr/tools/security/knowledge/config plugins
Some checks failed
CI / test (3.11) (pull_request) Failing after 12s
CI / lint (pull_request) Failing after 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
dd3edda3c7
style: match dashboard background to logo (#0d0f14)
Some checks failed
CI / test (3.11) (pull_request) Failing after 11s
CI / lint (pull_request) Failing after 9s
CI / test (3.12) (pull_request) Failing after 14s
CI / test (3.13) (pull_request) Failing after 14s
CI / build (pull_request) Has been skipped
E2E Tests / e2e (pull_request) Successful in 9s
5bb73eeaa0
fix: skip playwright e2e tests when playwright not installed
Some checks failed
CI / lint (pull_request) Failing after 9s
CI / test (3.11) (pull_request) Successful in 20s
CI / test (3.12) (pull_request) Successful in 22s
E2E Tests / e2e (pull_request) Successful in 11s
CI / test (3.13) (pull_request) Successful in 23s
CI / build (pull_request) Has been skipped
5784d09872
style: ruff format new web panel methods
All checks were successful
CI / lint (pull_request) Successful in 10s
CI / test (3.11) (pull_request) Successful in 20s
CI / test (3.12) (pull_request) Successful in 21s
E2E Tests / e2e (pull_request) Successful in 10s
CI / test (3.13) (pull_request) Successful in 22s
CI / build (pull_request) Successful in 7s
4dceff2db6
feat: add CLI commands for wallet, nostr, and tools plugins
All checks were successful
CI / lint (pull_request) Successful in 10s
CI / test (3.11) (pull_request) Successful in 21s
CI / test (3.12) (pull_request) Successful in 23s
E2E Tests / e2e (pull_request) Successful in 10s
CI / test (3.13) (pull_request) Successful in 23s
CI / build (pull_request) Successful in 7s
1a68c69a93
wallet: balance, address, pay
nostr: identity, relays, dm, inbox
tools: list, run
All checks were successful
CI / lint (pull_request) Successful in 10s
CI / test (3.11) (pull_request) Successful in 21s
CI / test (3.12) (pull_request) Successful in 23s
E2E Tests / e2e (pull_request) Successful in 10s
CI / test (3.13) (pull_request) Successful in 23s
CI / build (pull_request) Successful in 7s
This pull request has changes conflicting with the target branch.
  • cobot/agent.py
  • cobot/plugins/logger/plugin.py
  • cobot/plugins/web/plugin.py
  • cobot/plugins/web/templates/base.html
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feat/web-admin:nazim-feat/web-admin
git switch nazim-feat/web-admin
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ultanio/cobot!48
No description provided.