docs: initialize MS19 Chat & Terminal mission planning (#513)

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #513.
This commit is contained in:
2026-02-26 01:49:40 +00:00
committed by jason.woltje
parent 72c64d2eeb
commit 374ca7ace3
5 changed files with 312 additions and 89 deletions

View File

@@ -50,7 +50,7 @@ Dashboard polish, task ingestion pipeline, agent cycle visibility, deploy + smok
- Dashboard widgets wired to real API data (ActivityFeed, DashboardMetrics, OrchestratorSessions)
- WebSocket emits for job status/progress/step events
- Dashboard auto-refresh with polling + progress bars + step status indicators
- Deployed to Coolify at mosaic.woltje.com, auth working via Authentik
- Deployed to mosaic.woltje.com, auth working via Authentik
- Release tag v0.1.0
### MS16+MS17-PagesDataIntegration (v0.1.1) — Complete
@@ -69,6 +69,31 @@ All pages built + wired to real API data. PRs #470-484 (15 PRs). Issues #466-469
- All 5125 tests passing, CI pipeline #585 green
- Deployed and smoke-tested at mosaic.woltje.com
### MS18-ThemeWidgets (v0.1.2) — Complete
Theme package system, widget registry, WYSIWYG editor, Kanban filtering. PRs #493-505. Issues #487-491.
- 5 built-in themes (Dark, Light, Nord, Dracula, Solarized) as TypeScript theme packages
- ThemeProvider with dynamic CSS variable application and instant switching
- Theme selection UI in Settings with live preview swatches
- Widget definition registry with configurable sizing and schemas
- WidgetGrid dashboard with drag-and-drop layout (react-grid-layout)
- Widget picker drawer for adding widgets from registry
- Per-widget configuration dialog driven by configSchema
- Layout save/load/rename/delete via UserLayout API
- Tiptap WYSIWYG editor for knowledge entries with toolbar
- Markdown round-trip (import/export)
- Kanban board filtering by project, assignee, priority, search with URL persistence
- 1,195 web tests, 3,243 API tests passing
### Bugfix: API Global Prefix (post-MS18) — Complete
PR #507. Fixed systemic 404 on all data endpoints.
- Added `setGlobalPrefix("api")` to NestJS with exclusions for /health and /auth/\*
- Normalized 6 federation controllers to remove redundant api/ prefix
- Fixed rollup CVE (GHSA-mw96-cpmx-2vgc) via pnpm override
## Scope
### In Scope (MS16+MS17 — Pages & Data Integration)
@@ -98,7 +123,7 @@ This is the active mission scope. MS16 (Pages) and MS17 (Backend Integration) ar
18. Team management with shared data spaces and chat rooms (MS20)
19. RBAC for file access, resources, models (MS20)
20. Federation: master-master and master-slave with key exchange (MS21)
21. Federation testing: 3 instances on Coolify (woltje.com domain) (MS21)
21. Federation testing: 3 instances on Portainer (woltje.com domain) (MS21)
22. Agent task mapping configuration: system-level defaults, user-level overrides (MS22)
23. Telemetry: opt-out, customizable endpoint, sanitized data (MS22)
24. File manager with WYSIWYG editing: system/user/project levels (MS18)
@@ -113,7 +138,7 @@ This is the active mission scope. MS16 (Pages) and MS17 (Backend Integration) ar
1. Mobile native app
2. Third-party marketplace for themes/widgets (initial implementation is local package management only)
3. Production deployment to non-Coolify targets
3. Mobile native app deployment targets
4. Calendar system redesign (existing calendar implementation is retained)
## User/Stakeholder Requirements
@@ -257,21 +282,40 @@ This is the active mission scope. MS16 (Pages) and MS17 (Backend Integration) ar
- All pages must render real data from backend APIs
- **Status: COMPLETE (MS16+MS17) — PRs #473-#476. 238+ lines of mock data removed.**
### FR-016: Theme System (Future — MS18)
### FR-016: Theme System (MS18) — COMPLETE
- Support multiple themes beyond default dark/light
- Themes are installable packages from Mosaic Stack repo
- Theme installation and selection from Settings page
- ASSUMPTION: Initial implementation supports dark/light from reference design. Multi-theme package system is a future milestone. Rationale: Foundation must be solid before extensibility.
- 5 built-in themes (Dark, Light, Nord, Dracula, Solarized) as TypeScript theme packages
- ThemeProvider loads themes dynamically, applies CSS variables, instant switching
- Theme selection UI in Settings with live preview swatches
- UserPreference.theme persists selection across sessions
- **Status: COMPLETE (MS18) — PRs #493-495**
### FR-017: Terminal Panel (Future — MS19)
### FR-017: Terminal Panel (MS19)
- Bottom drawer panel, toggleable from header and sidebar
- Multiple tabs (Orchestrator, Shell, Build)
- Real xterm.js terminal with PTY backend via WebSocket
- Multiple tabs: shell sessions, orchestrator agent output, build logs
- Terminal session persistence (create/close/rename tabs)
- Smart terminal operating at project/orchestrator level
- Global terminal for system interaction
- ASSUMPTION: Terminal backend uses node-pty for PTY management, communicating via WebSocket namespace (/terminal). Rationale: node-pty is the standard for Node.js terminal emulation, used by VS Code.
- ASSUMPTION: Terminal sessions are workspace-scoped and stored in PostgreSQL for recovery. Rationale: Consistent with existing workspace isolation pattern.
### FR-018: Settings Configuration (Future — MS20)
### FR-018: Chat Streaming & Master Chat (MS19)
- Complete SSE streaming for token-by-token chat rendering
- Master chat sidebar (ChatOverlay) polish: model selector, conversation search, keyboard shortcuts
- Chat persistence via Ideas API (already implemented)
- ASSUMPTION: Chat streaming uses existing SSE infrastructure in LLM controller. Frontend needs streamChatMessage() completion. Rationale: Backend SSE is already working, only frontend wiring is missing.
### FR-019: Project-Level Orchestrator Chat (MS19)
- Chat context scoped to active project
- Can trigger orchestrator actions: spawn agent, check status, view jobs
- Command prefix system (/spawn, /status, /jobs) parsed in chat
- Agent output viewable in terminal tabs
- ASSUMPTION: Orchestrator commands route through existing web proxy (/api/orchestrator/\*) to orchestrator service. Rationale: Proxy routes already exist and handle auth.
### FR-020: Settings Configuration (Future — MS20)
- All environment variables configurable via UI
- Minimal launch env vars, rest configurable dynamically
@@ -324,17 +368,46 @@ This is the active mission scope. MS16 (Pages) and MS17 (Backend Integration) ar
27. ~~Lint, typecheck, and tests pass~~ DONE
28. ~~Deployed and smoke-tested at mosaic.woltje.com~~ DONE
### MS18 — Theme & Widget System — COMPLETE
29. ~~5+ themes with live preview and instant switching~~ DONE
30. ~~Theme selection UI in Settings with swatches~~ DONE
31. ~~UserPreference.theme persists across sessions~~ DONE
32. ~~WidgetGrid dashboard with drag/resize/add/remove~~ DONE
33. ~~Widget picker UI from registry~~ DONE
34. ~~Per-widget configuration dialog~~ DONE
35. ~~Layout save/load/rename/delete via API~~ DONE
36. ~~Tiptap WYSIWYG editor for knowledge entries~~ DONE
37. ~~Markdown round-trip (import/export)~~ DONE
38. ~~Kanban filtering by project, assignee, priority, search~~ DONE
39. ~~All features support all themes~~ DONE
40. ~~Lint, typecheck, tests pass~~ DONE
### MS19 — Chat & Terminal
41. Terminal panel has real xterm.js with PTY backend
42. Terminal supports multiple named sessions (tabs)
43. Terminal sessions persist and recover on reconnect
44. Chat streaming renders tokens in real-time (SSE)
45. Master chat sidebar accessible from any page (Cmd+Shift+J)
46. Master chat supports model selection and conversation management
47. Project-level chat can trigger orchestrator actions
48. Agent output viewable in terminal tabs
49. All features support all themes
50. Lint, typecheck, tests pass
51. Deployed and smoke-tested
### Full Project (All Milestones)
29. jarvis user logs in via Authentik, has admin access to all pages
30. jarvis-user has standard access at lower permission level
31. Break-glass user has access without Authentik
32. Three Mosaic Stack instances on Coolify with federation testing
33. Playwright tests confirm all pages, functions, theming work
34. No errors during site navigation
35. API documented via Swagger with proper auth gating
36. Telemetry working locally with wide-event logging
37. Mosaic Telemetry properly reporting to telemetry endpoint
52. jarvis user logs in via Authentik, has admin access to all pages
53. jarvis-user has standard access at lower permission level
54. Break-glass user has access without Authentik
55. Three Mosaic Stack instances on Portainer with federation testing
56. Playwright tests confirm all pages, functions, theming work
57. No errors during site navigation
58. API documented via Swagger with proper auth gating
59. Telemetry working locally with wide-event logging
60. Mosaic Telemetry properly reporting to telemetry endpoint
## Constraints and Dependencies
@@ -343,7 +416,7 @@ This is the active mission scope. MS16 (Pages) and MS17 (Backend Integration) ar
3. BetterAuth for authentication — must maintain existing auth flow
4. Authentik as IdP at auth.diversecanvas.com — must remain operational
5. PostgreSQL 17 with Prisma — all settings stored in DB
6. Coolify for deployment — 3 instances needed for federation testing
6. Portainer for deployment — 3 instances needed for federation testing
7. packages/ui is shared across apps — changes affect all consumers
8. Backend API modules already exist for all page data needs — no new API endpoints required for MS16+MS17 scope
@@ -380,6 +453,8 @@ These 19 NestJS modules are already implemented with Prisma and available for fr
| Credentials | `/api/credentials` | Encrypted storage |
| Brain/AI | `/api/brain` | Query/search |
| WebSocket | Real-time | Event broadcasting |
| LLM | `/api/llm/chat` | Chat + SSE streaming |
| Orchestrator Proxy | `/api/orchestrator/*` | Agent mgmt proxy |
| Telemetry | Internal | Logging/monitoring |
## Testing and Verification
@@ -400,7 +475,7 @@ These 19 NestJS modules are already implemented with Prisma and available for fr
| MS15-DashboardShell | 0.0.15 | Design system + app shell + dashboard page | COMPLETE |
| Go-Live MVP | 0.1.0 | Dashboard polish, ingestion, agent visibility, deploy | COMPLETE |
| MS16+MS17-PagesDataIntegration | 0.1.1 | All pages built + wired to real API data | COMPLETE |
| MS18-ThemeWidgets | 0.1.2 | Theme package system, widget registry, dashboard customization | COMPLETE |
| MS18-ThemeWidgets | 0.1.2 | Theme package system, widget registry, WYSIWYG, Kanban filtering | COMPLETE |
| MS19-ChatTerminal | 0.1.x | Global terminal, project chat, master chat session | NOT STARTED |
| MS20-MultiTenant | 0.2.0 | Multi-tenant, teams, RBAC, RLS enforcement, break-glass auth | NOT STARTED |
| MS21-Federation | 0.2.x | Federation (M-M, M-S), 3 instances, key exchange, data separation | NOT STARTED |