docs: update documentation for P7 web UI dashboard completion
- README: add Web UI Dashboard section, update features list with all current capabilities (multi-channel, media pipeline, sandboxing, etc.), expand model providers table, update architecture diagram - CHANGELOG: add P7 entries (dashboard SPA, 4 new gateway handlers) - state.json: add P7 entry with all 6 phases and file lists, update overall_progress to reflect P0-P7 completion - web-ui-dashboard.md: mark as completed with detailed phase outcomes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
**Date:** 2026-02-07
|
||||
**Priority:** P7
|
||||
**Status:** In Progress
|
||||
**Status:** Completed
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -56,53 +56,61 @@ src/gateway/ui/
|
||||
|
||||
## Implementation Phases
|
||||
|
||||
### Phase 1: Backend enhancements
|
||||
- Add `sessions.delete` handler
|
||||
- Add `sessions.switch` handler
|
||||
- Add `system.channels` handler
|
||||
- Add `system.usage` handler
|
||||
- Add streaming `content` events to `agent.send`
|
||||
- Extend `static.ts` for nested paths
|
||||
- Tests for all new handlers
|
||||
### Phase 1: Backend enhancements — DONE
|
||||
- Added `sessions.delete` handler (clears session history)
|
||||
- Added `sessions.switch` handler (switches WS connection to different session)
|
||||
- Added `system.channels` handler (lists active channel adapters and status)
|
||||
- Added `system.usage` handler (aggregated usage stats)
|
||||
- Extended `static.ts` with `.mjs`, `.png`, `.ico`, `.woff2` content types
|
||||
- Wired `channelRegistry` into `GatewayServerConfig` (duck-typed interface)
|
||||
- Note: Streaming `content` events deferred — chat page works with `done` event containing full response
|
||||
|
||||
### Phase 2: SPA shell + WebSocket client
|
||||
- Rewrite `index.html` as SPA shell with hash router and nav
|
||||
- Create `lib/ws-client.js` — promise-based RPC client with reconnect
|
||||
- Create `app.js` — page router, WebSocket lifecycle
|
||||
### Phase 2: SPA shell + WebSocket client — DONE
|
||||
- Rewrote `index.html` as SPA shell with sidebar nav and hash router
|
||||
- Created `lib/ws-client.js` — promise-based JSON-RPC client with auto-reconnect, event streaming
|
||||
- Created `app.js` — page router with lifecycle (render/teardown), connection status indicator
|
||||
- Extended `style.css` with ~500 lines for SPA layout, sidebar, stats grid, chat, sessions, settings
|
||||
|
||||
### Phase 3: Dashboard page
|
||||
### Phase 3: Dashboard page — DONE
|
||||
- Health cards (status, version, uptime, connections, sessions, tools)
|
||||
- Channel status cards
|
||||
- Usage summary (tokens, cost, calls)
|
||||
- Auto-refresh on interval
|
||||
- Channel status cards with colored dots
|
||||
- Usage summary section
|
||||
- Auto-refresh every 10 seconds
|
||||
|
||||
### Phase 4: Chat page
|
||||
- Session selector dropdown
|
||||
- New session button
|
||||
- Real-time streaming text (token by token via `content` events)
|
||||
- Tool events display (collapsible)
|
||||
- Markdown rendering with syntax highlighting
|
||||
- Session history loading on page entry
|
||||
- Input area with send/cancel
|
||||
### Phase 4: Chat page — DONE
|
||||
- Session selector dropdown with new session button
|
||||
- Load history button
|
||||
- Streaming tool events (collapsible with spinner/checkmark)
|
||||
- Markdown rendering with syntax highlighting (marked.js + highlight.js)
|
||||
- Enter to send, Shift+Enter for newline, auto-resizing textarea
|
||||
- Works with `done` event (full response), ready for future `content` streaming events
|
||||
|
||||
### Phase 5: Sessions page
|
||||
- Session list with message count, last activity
|
||||
- Click to view session history
|
||||
- Delete session button
|
||||
- Session detail view with full message history
|
||||
### Phase 5: Sessions page — DONE
|
||||
- Session list table with ID, message count, and actions
|
||||
- Click to view full session history
|
||||
- Delete button with confirmation dialog
|
||||
|
||||
### Phase 6: Settings page
|
||||
- Read-only config view (with redacted secrets)
|
||||
- Editable hook patterns (confirm/log/silent)
|
||||
- Channel status overview
|
||||
- Tool list with descriptions
|
||||
### Phase 6: Settings page — DONE
|
||||
- Editable hook patterns (confirm/log/silent) with save button via `config.patch`
|
||||
- Tool list table with name and description
|
||||
- Channel status grid
|
||||
- Read-only redacted config JSON viewer
|
||||
|
||||
## Estimated Effort
|
||||
## Files Created/Modified
|
||||
|
||||
- Phase 1: Backend — 1 hour
|
||||
- Phase 2: SPA shell — 30 min
|
||||
- Phase 3: Dashboard — 30 min
|
||||
- Phase 4: Chat — 1 hour
|
||||
- Phase 5: Sessions — 30 min
|
||||
- Phase 6: Settings — 30 min
|
||||
- **Total: ~4 hours**
|
||||
### New Files
|
||||
- `src/gateway/ui/app.js` — SPA router
|
||||
- `src/gateway/ui/lib/ws-client.js` — WebSocket RPC client
|
||||
- `src/gateway/ui/pages/dashboard.js` — Dashboard page
|
||||
- `src/gateway/ui/pages/chat.js` — Chat page
|
||||
- `src/gateway/ui/pages/sessions.js` — Sessions page
|
||||
- `src/gateway/ui/pages/settings.js` — Settings page
|
||||
|
||||
### Modified Files
|
||||
- `src/gateway/ui/index.html` — Rewritten as SPA shell
|
||||
- `src/gateway/ui/style.css` — Extended with ~500 lines
|
||||
- `src/gateway/static.ts` — Added content types
|
||||
- `src/gateway/server.ts` — Added `channelRegistry` to config
|
||||
- `src/gateway/handlers/system.ts` — Added `system.channels` and `system.usage`
|
||||
- `src/gateway/handlers/sessions.ts` — Added `sessions.delete` and `sessions.switch`
|
||||
- `src/daemon/index.ts` — Wired channelRegistry into gateway
|
||||
|
||||
Reference in New Issue
Block a user