Skip to content

feat: search assistant messages and mark named sessions#8

Merged
brtkwr merged 1 commit into
mainfrom
feat/searchable-assistant-and-named-rows
Jun 22, 2026
Merged

feat: search assistant messages and mark named sessions#8
brtkwr merged 1 commit into
mainfrom
feat/searchable-assistant-and-named-rows

Conversation

@brtkwr

@brtkwr brtkwr commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

What

Two search/topic UX gaps from the codebase review.

1. Assistant messages weren't searchable

The list filter matched user messages only, but the HITS column and preview highlighting already counted all messages including Claude's. So a conversation was unfindable by something only Claude said (a root-cause explanation, code Claude wrote, an error it quoted), even though the HITS count and >>> preview markers implied it was searchable. buildItems now includes assistant text in searchText (and the precomputed searchLower), so the filter agrees with HITS/preview.

2. Named sessions looked identical to first-message rows

Since #3, the TOPIC column shows the session name (custom / AI title) when present, else the first user message. Both rendered the same, so you couldn't tell a curated name ("Refactor auth flow") from a truncated opening line ("hey can you look at this bug where…"). Named rows now get a leading marker.

Notes

  • Search scope decision was confirmed: include assistant content (the more useful direction for a search tool). Trade-off is a larger searchText/searchLower per conversation; bounded by --max-age/--max-size as before.
  • The ✎ glyph is ambiguous-width, so a named row may sit one cell narrow on CJK-width terminals - cosmetic only, and truncate is rune-safe (from fix: render multibyte text without corrupting UTF-8 #4).

Tests

  • TestBuildItems now asserts assistant text is in searchText (would fail under the old user-only code).
  • TestFormatListItemNamedSessionMarker - named row shows ✎, first-message fallback does not.
  • go test -cover = 69.0%.

Two search/topic UX gaps from the codebase review:

- The list filter only matched user messages, but the HITS column and
  preview highlighting already counted all messages - so a conversation
  was unfindable by something only Claude said, while the UI implied it
  was searchable. buildItems now includes assistant text in searchText
  (and searchLower), making the filter consistent with HITS/preview.

- Named sessions (custom/ai title) and rows that fall back to the first
  user message looked identical in the TOPIC column. Named rows now get
  a leading ✎ marker so a curated name is distinguishable from a
  truncated opening line.
@brtkwr brtkwr merged commit 4e9e468 into main Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant