355fe4e908
With a day's sessions the list was a flat, unsearchable wall in recency
order, so the chat the operator wanted was the one that could not be
found, and sessions of one repository were scattered through it.
Narrow the list as the operator types and keep same-repository chats
together, using the control and empty-state patterns the other lists
already use:
- ChatListFilter.kt adds the one pure derivation: sessionMatchesQuery /
filterChatSessions match a case-insensitive substring over a session's
title and directory, a blank query narrows nothing, and the survivors
keep their incoming (recency) order. groupChatSessionsByDirectory groups
the narrowed list by directory, each group keeping that order and the
groups ordered by their first (most recent) session, so the top still
leads with the newest activity.
- ChatState.sessionQuery (set through ChatStore.searchSessions /
AppViewModel.setChatSessionQuery) is a display narrowing only: the
server's list, open conversations and the activity marks are untouched.
filteredSessions is visibleSessions narrowed by the query.
- ChatListPane renders the existing FilterMenu with one OutlinedTextField
and a Clear search reset (the pipelines/runs filter pattern), shows a
directory heading per group only when more than one directory is
present, and renders the shared EmptyState ("No chats match ...") with
a Clear search action when nothing matches. The trailing New chat
action is never hidden while the list is narrowed, and every row still
shows its directory.
Tests (ChatListFilterTest, 9 cases): the match rule over title and
directory, that a narrowing preserves the recency order, grouping by
directory (order by the first session, order kept inside a group, a
single directory yields one group, a blank directory groups too), and
through the store that searching narrows filteredSessions, clearing
restores the full list, the server's list is untouched and a filtered
session still reports its activity mark.
Checked before commit: android/README.md was updated in this change with
the behaviour, tests and evidence. The packaged authoring skill references
(internal/author/skill/references/) document the Pipelines server, its
chat_* protocol surface and authoring, none of which changed - this is a
client-side narrowing over the already-listed sessions - so none needed
updating, and the internal/author/install.go managed reference inventory
is unchanged. No repository template or root/topic doc describes the
Android session list, so none was stale.
android/ only; no dependency added beyond the already-declared
material-icons-extended; no run is started from the app.