- Add 21-06-SUMMARY.md documenting search filtering and keyboard shortcut - Advance STATE.md to ready_for_verification, 100% progress - ROADMAP.md phase 21 marked Complete (7/7 summaries)
3.3 KiB
3.3 KiB
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 21-chat-foundation | 06 | chat |
|
|
|
|
|
|
Phase 21 Plan 06: Chat Search and Cmd+K Shortcut Summary
Gap closure for HIST-02 (conversation search) and INPUT-07 (Cmd+K keyboard shortcut): server-side ilike filtering on conversation titles with a debounced search input, plus Cmd+K to open chat panel and focus search.
What Was Built
Task 1: Server-side search and agentId filtering
chatService.listConversationsextended withsearch?: stringandagentId?: stringopts; addsilike(chatConversations.title, '%term%')andeq(chatConversations.agentId, id)conditions when providedGET /companies/:companyId/conversationsroute extractssearchandagentIdfromreq.querychatApi.listConversationsserializessearchandagentIdas URL query paramsuseChatConversationsacceptsopts?: { search?: string }, includes search in queryKey (triggers refetch on change), passes to API
Task 2: Search input UI and Cmd+K shortcut
ChatConversationListrenders a search input with Search icon (left) and clear X button (right); 300ms debounce; passes debouncedSearch touseChatConversationsChatConversationListlistens fornexus:focus-chat-searchcustom window event to focus the inputuseKeyboardShortcutsaddsonSearch?: () => voidtoShortcutHandlers; Cmd+K/Ctrl+K handler is placed BEFORE the input-guard early return (fires globally)LayoutwiresonSearchto open chat panel if closed, then dispatchesnexus:focus-chat-searchviarequestAnimationFrame
Verification Results
- TypeScript: no new chat-related errors in server or UI (pre-existing plugin-sdk errors in plugins.ts are out of scope)
- All tests pass: chat-service (21), chat-routes (11), ChatMarkdownMessage (4), ChatInput (6) — 42 total
- Search input present with placeholder "Search conversations..."
- Cmd+K handler on
metaKey || ctrlKey+kin useKeyboardShortcuts - Route passes search/agentId params
Deviations from Plan
None — plan executed exactly as written. Used the simpler custom-event approach (suggested as ALTERNATIVE in plan) rather than forwardRef/useImperativeHandle, as plan explicitly recommended this path.
Known Stubs
None.