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
45 lines
2.7 KiB
Markdown
45 lines
2.7 KiB
Markdown
# Test Report — Phase 4: Unified Messaging Frontend
|
|
|
|
## Task
|
|
Implement MessageSidebar replacing AISidebar with comm API backend integration.
|
|
|
|
## Files Created/Modified
|
|
|
|
### New Files
|
|
1. `src/store/commStore.ts` — Zustand store for conversations, messages, typing, unread counts
|
|
2. `src/api/comm.ts` — API client covering all `/api/v1/comm/*` endpoints (conversations, messages, reactions, read state, mini-apps, block types)
|
|
3. `src/hooks/useCommWebSocket.ts` — WebSocket hook with auto-reconnect, ping, streaming, typing indicators
|
|
4. `src/components/layout/MessageSidebar.tsx` — Main sidebar component (716 lines) replicating AISidebar design exactly
|
|
|
|
### Modified Files
|
|
5. `src/store/uiStore.ts` — Added `messageSidebarCollapsed` + `toggleMessageSidebar`; replaced mock notifications with empty array; kept `aiSidebarCollapsed` for backward compat
|
|
6. `src/components/layout/AppShell.tsx` — Replaced `AISidebar` import with `MessageSidebar`
|
|
7. `src/components/layout/TopBar.tsx` — Replaced `openAISidebarProactive` with `toggleMessageSidebar`
|
|
|
|
## 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 --noEmit` exits 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/apiDelete` from `client.ts` as `ai.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
|