Repository navigation
feat(android): pin gateway-backed session search in the sidebar - #124338
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 17, 2026, 1:25 AM ET / 05:25 UTC. ClawSweeper reviewWhat this changesThe PR moves Android session search from a local, toggleable sidebar filter to a pinned sidebar field backed by the shared debounced gateway session browser. Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain Keep open: the current head cleanly reuses the canonical Android session-search policy, but its real-device evidence covers the superseded bottom-sheet design rather than the pinned sidebar now on the branch. Priority: P3 Review scores
Verification
How this fits togetherAndroid’s sidebar receives the active session list and user query from the shell. The shared session-browser state asks the gateway for matches, falls back to cached active sessions offline, and returns selectable sessions to the chat shell. flowchart LR
A[Android sidebar] --> B[Search query]
B --> C[Shared session browser]
C --> D[Gateway session search]
D --> E[Offline cached-session fallback]
E --> F[Filtered session results]
F --> G[Chat session switch]
Before merge
Agent review detailsSecurityNone. PR surfaceOther +26. Total +26 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared search owner and add a redacted current-head Android recording that shows entering a sidebar query, its loading/result state, and switching to a matched session. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature request; the current-head device-validation path is clear, but the submitted recording predates the pinned-sidebar implementation. Is this the best way to solve the issue? Yes. Sharing the Sessions screen’s gateway-backed owner avoids a second search policy while preserving ChatController’s offline fallback and session-safety checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b3ab27607746. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
… sidebar The sidebar header and search field no longer scroll away: they sit above the scrolling sections, and the search field is always visible instead of hidden behind a toggle. Queries now run through the shared session-browser search state (debounced gateway search with offline fallback) instead of a local filter over cached rows, and matching threads replace the section list while a query is active. The in-chat bottom-sheet picker is removed: the compact switcher's All button navigates straight to the Sessions screen again, and the sidebar owns in-context session search. The shared rememberSessionBrowserSearchState extraction from the Sessions screen is kept and gains the sidebar as its second consumer.
3b4bb7b to
490fbfc
Compare
|
Merged via squash.
|
…claw#124338) * fix-android-chat-session-picker * fix-search-all-android-sessions * fix-native-i18n-inventory * fix-android-share-session-browser-policy * fix(android): show loading during session search * refactor(android): move gateway-backed session search into the pinned sidebar The sidebar header and search field no longer scroll away: they sit above the scrolling sections, and the search field is always visible instead of hidden behind a toggle. Queries now run through the shared session-browser search state (debounced gateway search with offline fallback) instead of a local filter over cached rows, and matching threads replace the section list while a query is active. The in-chat bottom-sheet picker is removed: the compact switcher's All button navigates straight to the Sessions screen again, and the sidebar owns in-context session search. The shared rememberSessionBrowserSearchState extraction from the Sessions screen is kept and gains the sidebar as its second consumer. * style(android): fix sidebar import ordering for ktlint --------- Co-authored-by: IWhatsskill <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…claw#124338) * fix-android-chat-session-picker * fix-search-all-android-sessions * fix-native-i18n-inventory * fix-android-share-session-browser-policy * fix(android): show loading during session search * refactor(android): move gateway-backed session search into the pinned sidebar The sidebar header and search field no longer scroll away: they sit above the scrolling sections, and the search field is always visible instead of hidden behind a toggle. Queries now run through the shared session-browser search state (debounced gateway search with offline fallback) instead of a local filter over cached rows, and matching threads replace the section list while a query is active. The in-chat bottom-sheet picker is removed: the compact switcher's All button navigates straight to the Sessions screen again, and the sidebar owns in-context session search. The shared rememberSessionBrowserSearchState extraction from the Sessions screen is kept and gains the sidebar as its second consumer. * style(android): fix sidebar import ordering for ktlint --------- Co-authored-by: IWhatsskill <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
[AI-assisted]
What Problem This Solves
Android already had four session-switching surfaces (sidebar drawer, compact chips row, Threads screen, command palette), and the original shape of this PR added a fifth — an in-chat bottom-sheet picker. Meanwhile the sidebar, the natural in-context switcher, hid its search behind a toggle that scrolled away with the drawer content and only filtered the locally cached session list.
Why This Change Was Made
Maintainer review redirected the PR at the sidebar: the drawer is where operators already switch sessions, so it should own in-context search. This rework keeps the contributor's core extraction — the Sessions screen's debounced gateway-backed search (
rememberSessionBrowserSearchState/resolveSessionBrowserEntries) became a shared owner — and points it at the sidebar instead of a new sheet:sidebarRecentSessionsdrops its local query filter — the shared search owner covers lookup, recents stay a pure pinned-first recency list.Follow-ups filed from the same review: #125059 (sidebar grouping/show-more), #125060 (single-button agent picker).
User Impact
Search is visible the moment the drawer opens, finds sessions beyond the cached recents via the gateway, and switching stays a two-tap drawer flow. A search in progress shows a loading state instead of a premature "no matches", and "All" reaches the full Threads screen in one tap again.
Evidence
Focused session tests (
SessionsScreenSearchTest,SessionFiltersTest,SidebarShellLogicTest,ChatControllerSessionSearchTest), Android ktlint, and native i18n verify pass on the exact head. Codex autoreview: clean, no findings. Live-verified on a physical Pixel 10a against a production gateway (2026.8.1) over LAN: pinned search, debounced gateway results, loading and no-match states, tap-to-switch, and All→Threads navigation, recorded below.Production LOC vs the pre-rework PR: net −308 (sheet removed, shared search reused; sidebar consumes the existing owner).
Before (toggle search scrolls away; local filter; bottom-sheet picker)
pr124338-before.mp4
After (pinned gateway-backed sidebar search; All → Threads)
pr124338-after.mp4