cc3ac9a43d
Phase 1: Backend plugin kommunikation (13 files, 10 tables, REST API, WebSocket, RBAC, DMS Bridge, Participant Registry, Mini-App Registry, Search Provider) Phase 2: AI plugins as participants (ai_assistant + ai_proactive dock as participants, heartbeat job) Phase 3: system_notif plugin (system events → chat messages, pinned System room) Phase 4: Frontend MessageSidebar (replaces AISidebar, same design, comm API client, WebSocket hook, commStore) Phase 5: Rich Content Block Renderer (11 components: Markdown, HTML, Image, Audio, Video, File, ActionCard, ContactCard, MiniApp, BlockRenderer) BasePlugin: added services property + _container in on_activate
2.7 KiB
2.7 KiB
Test Report — Phase 4: Unified Messaging Frontend
Task
Implement MessageSidebar replacing AISidebar with comm API backend integration.
Files Created/Modified
New Files
src/store/commStore.ts— Zustand store for conversations, messages, typing, unread countssrc/api/comm.ts— API client covering all/api/v1/comm/*endpoints (conversations, messages, reactions, read state, mini-apps, block types)src/hooks/useCommWebSocket.ts— WebSocket hook with auto-reconnect, ping, streaming, typing indicatorssrc/components/layout/MessageSidebar.tsx— Main sidebar component (716 lines) replicating AISidebar design exactly
Modified Files
src/store/uiStore.ts— AddedmessageSidebarCollapsed+toggleMessageSidebar; replaced mock notifications with empty array; keptaiSidebarCollapsedfor backward compatsrc/components/layout/AppShell.tsx— ReplacedAISidebarimport withMessageSidebarsrc/components/layout/TopBar.tsx— ReplacedopenAISidebarProactivewithtoggleMessageSidebar
TypeScript Compilation
Command: npx tsc --noEmit
src/pages/Dms.tsx(553,13): error TS2322: ... onRangeSelect does not exist on type FileExplorerProps
src/pages/Dms.tsx(647,15): error TS2322: ... onRangeSelect does not exist on type FileExplorerProps
Result: All new/modified files compile cleanly. Only 2 pre-existing errors in Dms.tsx (unrelated to this task — onRangeSelect prop missing on FileExplorerProps type).
Smoke Test Description
- Build:
npx tsc --noEmitexits with only pre-existing Dms.tsx errors (0 new errors from this task) - Design fidelity: MessageSidebar uses identical icons (robotIcon, bellIcon, bulbIcon, teamIcon, chatBubbleIcon), identical ResizablePanel (320px initial, 240-600 range, handleSide=left), identical mobile/desktop structure (collapsed icon strip → expanded resizable panel + mobile overlay)
- API integration: comm.ts uses same
apiGet/apiPost/apiPatch/apiDeletefromclient.tsasai.ts— consistent with existing conventions - WebSocket: Auto-reconnect with exponential backoff, ping interval, handles message.new, conversation.updated, message.streaming, typing events
- Store: commStore provides conversations, messages per conversation, typing users, unread counts with all setter methods
- uiStore: messageSidebarCollapsed defaults to true (same as aiSidebarCollapsed), toggleMessageSidebar works, mock notifications replaced with empty array
What Was NOT Tested
- Live API calls (requires running backend with kommunikation plugin)
- WebSocket connection (requires authenticated session)
- Visual rendering (requires dev server + browser)
- These require runtime verification in a subsequent phase