Search messages across every bot and room - #186
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A roster of bots, threads that live for weeks, and no way to find anything: the sidebar box only filtered bots by name. - server/search.ts + GET /api/search?q=&bot=&kind=&limit=: a linear scan over every bot task and room thread (threads are in memory once touched; an index would be premature). Matches text and, for activity chips, the tool name — "which bot ran that migration" is a tool-name question. Each hit carries a windowed snippet with the match offset and whether it sits on the visible branch. - Sidebar: from two characters the box also shows a Messages section — avatar, task title, highlighted snippet, time, an "other version" tag for hits off the visible branch. A click lands on the message: select the bot or room, switch to the task if needed, switch the version ONLY when the hit is off the visible branch (that rewinds the leaf and marks the session stale, so never idly), then scroll to and flash it. - focusMessage state + useFocusMessage: rows carry data-mid; works in ChatView and GroupView. Item 1.7 of docs/plans/agent-harness-upgrades-v2.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 28 minutes Limit details: You’ve used all 3 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Comment |
main's #192 moved transcripts to SQLite and shipped its own /api/search (a LIKE scan) plus a basic "In conversations" list. Reconciled so there is one search: main's endpoint and data path stay; my in-memory scan (server/search.ts) is dropped. On top of main's endpoint: activity chips are searchable by tool name (json_extract on the row), each hit carries the match offset for highlighting, room attribution, and whether it sits on the visible branch. The sidebar keeps this PR's SearchResults UI (highlighted snippet, "other version" tag, land on the message with the right task and branch, scroll + flash) in place of main's inline list. Also drops a stray plan-doc copy that had been committed here by mistake. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Superseded by #213, which preserves this PR’s useful transcript search and exact-message landing while integrating it with the newer Cmd+K palette and bounded transcript windows. #213 also addresses the review findings around stale focus replay, deleted conversations, fallback highlighting, and duplicate landing logic, and has now merged green. |
In plain language
Before: the sidebar search only filtered bots by name. A phrase said three weeks ago in some bot's task was unfindable.
What changes in the app: type two or more characters in the sidebar search and a Messages section appears with hits from every bot's tasks and every room — bot, task title, highlighted snippet, time. Tool runs are searchable too ("which bot ran that migration"). Click a hit and you land on that message: right bot, right task, right version of the conversation (it switches the branch only if the hit is on an old version), scrolled to and briefly highlighted.
In plain terms
A roster of bots, threads that live for weeks, and no way to find anything — the sidebar search only filtered bots by name. Now it also finds messages across every bot's tasks and every room, and clicking a hit lands you on that message: right bot, right task, right branch.
Changes
server/search.ts+GET /api/search?q=&bot=&kind=&limit=— linear scan over every bot task and room thread (threads are already in memory once touched; an index would be premature). Matches text and, for activity chips, the tool name — so "which bot ran that migration" works. Each hit: owner, task title, role/kind, windowed snippet with match offset,onActivePath.POST /active-branchonly when the hit is off the visible branch (that rewinds the leaf and marks the provider session stale, so it's never done idly) → scroll to and flash the message. Search box clears.focusMessagestate +useFocusMessagehook; message rows carrydata-mid(they'redisplay: contentswrappers, so the hook scrolls/highlights the child). Works in ChatView and GroupView.Not in scope: fuzzy/regex, an index, searching inspector logs, in-thread find (⌘F).
Item 1.7 of
docs/plans/agent-harness-upgrades-v2.md.Test plan
server/search.test.ts(6): case-insensitive across bots and rooms newest-first; active-path flag on a branched thread; tool-name + text search for activity with kind filter; bot filter + limit; snippet windowing/ellipsis and match offset; empty querypnpm typecheckclean;pnpm vitest rungreen (65 files, 533 passed)yinfinds hits in two of one bot's tasks; clicking switches task and scrolls/flashes; activity hits show the wrench; hits off the visible branch switch versions🤖 Generated with Claude Code