-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Summary
Add full-text search and advanced filtering across all agent messages, task descriptions, and team history β so you can instantly find "the moment researcher-3 mentioned rate limiting" in a 500-message team run.
Motivation
After a complex multi-agent run, finding specific information is painful. You have to either read every message or open raw JSON files. A search bar that queries across all teams, agents, and message types would be immediately useful for debugging and review.
Proposed Implementation
Server-side: search endpoint
// GET /api/search?q=rate+limiting&team=my-team&type=message&from=2025-01-01
app.get('/api/search', (req, res) => {
const { q, team, type, from, to, limit = 50 } = req.query;
const results = searchIndex.query(q, { team, type, from, to });
res.json({ results: results.slice(0, limit), total: results.length });
});In-memory search index
Use Fuse.js (fuzzy search, no server dependency):
npm install fuse.jsimport Fuse from 'fuse.js';
// Build index from all inbox JSON files
const documents = buildSearchDocuments(); // flatten all messages + tasks
const fuse = new Fuse(documents, {
keys: [
{ name: 'text', weight: 3 },
{ name: 'summary', weight: 2 },
{ name: 'subject', weight: 2 }, // task subjects
{ name: 'agent', weight: 1 },
{ name: 'team', weight: 1 },
],
threshold: 0.3,
includeScore: true,
includeMatches: true, // for highlighting
});UI component (src/components/SearchPanel.jsx)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Search all messages... [Ctrl+F] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Filters: [All Teams βΎ] [All Types βΎ] [Date Range βΎ] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 42 results for "rate limiting" β
β β
β β researcher-3 β team-lead 2 min ago β
β "...encountered **rate limiting** on the GitHub API β
β after 60 requests per hour..." β
β β
β β coder-1 β researcher-3 14 min ago β
β "...added exponential backoff for **rate limit** β
β errors in the fetch wrapper..." β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Bold-highlighted match snippets
- Click a result β jump to that message in the Inboxes/Communication tab
- Keyboard shortcut:
Ctrl+F/Cmd+Fto open search panel (or integrate into existingCommandPalette) - Filter by: team, agent, message type, date range
Integration with existing Command Palette
The dashboard already has CommandPalette.jsx. Search could be integrated there:
// Add to CommandPalette commands
{ id: 'search', label: 'Search messages', shortcut: 'Ctrl+F', action: () => setSearchOpen(true) }Acceptance Criteria
-
GET /api/search?q=...returns ranked results with match highlights - Fuzzy search works (e.g., "rate limit" matches "rate limiting", "rate-limited")
- Filter by team name
- Filter by message type (status, completion, coordination, etc.)
- Filter by date range
- Match text highlighted in results (bold the matched substring)
- Click result navigates to that message in Inboxes tab
-
Ctrl+Fkeyboard shortcut opens search - Empty state illustration when no results found
- Search index refreshes when new messages arrive (WebSocket update)
- Searches across: inbox messages, task subjects/descriptions, team names
Performance Note
Fuse.js handles up to ~10k documents comfortably in-memory. For very large sessions, consider indexing only the last 7 days by default with an "include all history" toggle.
References
- Fuse.js: https://fusejs.io/
- Existing CommandPalette:
src/components/CommandPalette.jsx - Message type reference:
src/utils/messageParser.js