You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): rich table formatting for list, select preview, consistent color theming #773
--id + search terms narrows to matching conversations ✅
FTS5 indexes message text with unicode61 tokenizer ✅
snippet() function exists in query_builders.py ✅
SearchResult.snippet field populated but not shown in CLI output ⚠️
Real gaps
FTS snippets not surfaced: polylogue list shows conversation titles, not WHERE the search term matched. The snippet data is computed (see query_builders.py:66) but discarded by CLI output formatting.
No within-conversation text search: polylogue messages has role/type filters but no text search. To find specific terms within a conversation, you must paginate through all messages.
No message search highlight: Even polylogue show renders full text without highlighting matched terms.
MCP doesn't expose conversation_id filter: MCPConversationQueryRequest lacks conversation_id field even though the Python API has it.
Slow FTS on large archives: 2s+ per query on 3M messages. The covering index exists but hot-readiness checks may still run exact counts.
Fix candidates
A: Show FTS snippet in list output (1-2 lines, ~20 lines of code)
B: Add --search / --query option to messages for within-conversation text filtering
C: Highlight matched terms in show output
D: Add conversation_id to MCP query request dataclass
E: Move exact FTS readiness counts off hot search path (performance)
Investigation traced the missing FTS snippets to a 42% FTS index gap:
Messages: 3,351,380
FTS indexed: 1,945,629
Gap: 1,405,751 (41.9%)
The readiness check at polylogue/storage/fts/fts_lifecycle.py:check_fts_readiness() correctly blocks the FTS snippet path when the gap exceeds the 1% threshold. But the failure is silent — search falls back to attachment-only path, returning results without message-level match evidence.
Why the gap exists
The FTS index wasn't fully rebuilt after the schema v3→v5 migration. The timer service (polylogue-run.timer) runs polylogue --plain run acquire parse materialize render index hourly, but it hadn't fired since the DB was rebuilt.
Fix applied
Running polylogue run index to rebuild the FTS index. After rebuild, the snippet path should work for all search queries.
Activity
Sinity commentedon May 3, 2026
Found during reverse-chrono audit
Polylogue cannot efficiently search within conversations — only at the conversation level. This blocked the reverse-chronological design spec audit:
--conversationfilter flag on list/search to narrow to a specific convmessagescommand only paginates sequentially — no in-conversation text searchgrepon JSONL filesThese gaps should be tracked as part of the CLI/query UX work.
Sinity commentedon May 3, 2026
Corrected findings after deep investigation
What actually works
--idflag filters by conversation ID prefix ✅--id+ search terms narrows to matching conversations ✅unicode61tokenizer ✅snippet()function exists inquery_builders.py✅SearchResult.snippetfield populated but not shown in CLI outputReal gaps
polylogue listshows conversation titles, not WHERE the search term matched. The snippet data is computed (seequery_builders.py:66) but discarded by CLI output formatting.polylogue messageshas role/type filters but no text search. To find specific terms within a conversation, you must paginate through all messages.polylogue showrenders full text without highlighting matched terms.MCPConversationQueryRequestlacksconversation_idfield even though the Python API has it.Fix candidates
listoutput (1-2 lines, ~20 lines of code)--search/--queryoption tomessagesfor within-conversation text filteringshowoutputconversation_idto MCP query request dataclassSinity commentedon May 3, 2026
Root cause analysis
Investigation traced the missing FTS snippets to a 42% FTS index gap:
The readiness check at
polylogue/storage/fts/fts_lifecycle.py:check_fts_readiness()correctly blocks the FTS snippet path when the gap exceeds the 1% threshold. But the failure is silent — search falls back to attachment-only path, returning results without message-level match evidence.Why the gap exists
The FTS index wasn't fully rebuilt after the schema v3→v5 migration. The timer service (
polylogue-run.timer) runspolylogue --plain run acquire parse materialize render indexhourly, but it hadn't fired since the DB was rebuilt.Fix applied
Running
polylogue run indexto rebuild the FTS index. After rebuild, the snippet path should work for all search queries.Remaining improvements
polylogue statusor health check should report FTS completenesscheck_fts_readinesscould accept a higher threshold for snippet-only mode (snippets don't need perfect recall)feat(cli): rich table for tags, fzf preview for select (#773) (#795)
Sinity commentedon May 4, 2026
Resolved by PR #795. Tags uses rich Table, select has fzf --preview. List output already used rich/tables.
feat(cli): rich table for tags, fzf preview for select (#773) (#795)