Repository navigation
#929 Search sessions on Home - #978
Conversation
Search covers Home's pane: a search field (focused, keyboard up), a scope chip that starts at Home's project scope, and Home's rows for sessions whose title matches, with the match highlighted. Ctrl+F opens it; Esc clears the query, then closes. - Domain: SessionRepository.searchSessions sends `search` on v1 (`/session`, `roots=true`) and v2 (`/api/session`, `parentID=null`, `archived=false`), then filters the reply locally so servers that ignore `search` still give correct results. - SessionSearchViewModel: Home rows match on every keystroke; the server search runs after a 250 ms debounce, merges server-only sessions, and keeps local results when it fails. - Design system: Search text input kind (spinner while busy, clear button), list item title highlight, new OpenCodeMenuChip. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Home's Settings button becomes a ⋯ menu that holds Settings for now. HomeMenu (iOS and Android) puts feature entries first, in order, and adds Settings last behind a divider, so Search sessions, Archived sessions and Worktrees each add one entry. The shared overflow menu gains a dividerAbove slot, and on iOS a whole menu row now takes the tap, not just its icon and text. ⌘, / Ctrl+, still open Settings. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add an Archived sessions screen on Android and iOS: Home's scope, grouped
This week / Earlier by archive time, with one-tap Unarchive (snackbar with
Undo), an actions sheet (Unarchive, Open, Delete…) and a live refresh on
session.archived / unarchived / deleted. Session Chat shows an "Archived
<time>" banner with Unarchive.
v2 lists with ?archived=true and restores with PATCH {archived: false}.
v1 can archive but cannot clear time.archived, so a new
supportsArchivedSessions capability hides the feature there.
ArchivedSessionList is shared so search can reuse it for archived results.
The Home ⋯ menu entry lands after the #929 menu foundation.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Search covers Home's pane: field with scope chip, Home's own rows with the title match highlighted, server search per added path (v1 search/roots, v2 search/parentID=null/archived=false, both re-filtered locally), Cmd-F in the Go menu, and Esc clearing the query before closing. Design system: search text input kind with busy spinner and clear button, list item title highlight, below placement for the anchored overflow menu, and OpenCodeMenuChip, each with gallery entries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n Back Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ae8a455. Configure here.
…into claude/929-search-sessions-17ace1 # Conflicts: # ios/OpenCode Mobile/OpenCode Mobile/UI/Main/ProjectListHomeView.swift
Both apps add Search sessions above Settings in the Home ⋯ menu once Home has loaded; it opens search on Home's scope, like ⌘F / Ctrl+F. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…into feature/833-restore-archived-sessions
The ⋯ menu lists "Archived sessions" with "N in <scope>", counted when the menu opens and left out on servers that cannot restore archived sessions. It opens the Archived sessions screen for Home's current scope. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Automated review: 2 finding(s) that 2+ of 3 passes agreed on.
Outside the diff lines:
ios/OpenCode Mobile/OpenCode Mobile/UI/Main/SessionSearchModel.swift:179medium: Scope falling back to All projects does not restart or cancel the running search
4 finding(s) from a single pass, not posted
ios/OpenCode Mobile/OpenCode Mobile/UI/Main/SessionSearchModel.swift:259high: Server rows for worktree-extra paths are dropped (muse-spark-1.3-contributor)ios/OpenCode Mobile/OpenCode Mobile/UI/Main/SessionSearchModel.swift:210medium: Project-scope search omits separately-listed worktrees (muse-spark-1.3-contributor)android/app/src/main/java/dev/opencode/mobile/ui/main/SessionSearchViewModel.kt:231medium: One failed per-path request drops every sibling's server results (glm-5.3-flash)ios/OpenCode Mobile/OpenCode Mobile/UI/Main/SessionSearchModel.swift:111low: "Search all projects" is never offered for a match that exists only on the server in another project (deepseek-v4.1-flash)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.137 · 1 pass(es) stopped early
…sions' into claude/929-search-sessions-17ace1 # Conflicts: # android/app/src/main/java/dev/opencode/mobile/domain/session/V2SessionRemote.kt # android/app/src/main/java/dev/opencode/mobile/ui/components/list/SessionList.kt # android/app/src/main/java/dev/opencode/mobile/ui/main/MainScreen.kt # ios/OpenCode Mobile/OpenCode Mobile/Components/List/SessionList.swift # ios/OpenCode Mobile/OpenCode Mobile/UI/Main/ProjectListHomeView.swift
On servers that list archived sessions (#833), search lists every Home project's archived sessions once on open and matches their titles locally. An "Include archived · N" toggle chip (N in scope) adds them in their own Archived section with an Archived tag; with no match, the empty state offers Include archived when it would find something. The search chip gains a Toggle variant (no chevron, switch semantics). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Home menu: recount the Archived sessions entry once Home's server probe finishes, so it shows on the first open after launch (both apps). - Android overflow menu: size the panel to its widest entry; a divider no longer stretches it to the window. Gallery gains the Home menu shape. - iOS: archived rows drop the long-press overlay that covered the trailing Unarchive button; a tap still opens the actions. - Delete confirmation names the session and says it is deleted from the server for good, from a target the closing sheet cannot clear. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…anges - Android: one failed path no longer drops the other paths' server matches; when every path fails the last answer stays (as on iOS). - Android: a new keystroke keeps the previous server matches until the next answer replaces them, instead of hiding them for the debounce. - Both: when Home's lists in scope change (a project added or removed, or the scope falls back to All projects), search drops the removed projects' server rows and searches again at once. Live updates that keep the same lists do not search again. - Android: switching server closes search, as on iOS. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Undo the overflow menu width change; #976 fixes the divider there. - Session Chat: session.unarchived clears the banner directly, and an archive change since a session read began wins over that read, so a lagging GET no longer brings the banner back (both apps). iOS also clears the banner on rebind. - Archived list: unarchived or deleted rows stay gone while a list still carries their old archive time; Undo rows keep their project, so an unknown directory no longer drops them; one failing project keeps the others listed (both apps). - iOS: subscribe to events before the first load, and report cancellation from ArchivedSessionList. Co-Authored-By: Claude Opus 5.5 <[email protected]>
HorizontalDivider fills the width it is offered, and the panel offered the popup window's width, so a divider stretched the menu across the screen. The panel column now takes its widest row's intrinsic width, and every row fills it, so the whole row takes the tap as on iOS. Adds a grouped preview (subtitles plus divider) on both platforms and an instrumented layout test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…into feature/833-restore-archived-sessions
|
Review triage for be7529a. Fixed (threads answered and resolved): one failed path dropping all server matches (Android), keystrokes hiding server-only matches (Android), stale server rows after Home or server changes (both), and the scope falling back to All projects without a new search (both; this was github-actions' finding outside the diff at Single-pass findings, not changed:
|
…sions' into claude/929-search-sessions-17ace1 # Conflicts: # ios/OpenCode Mobile/OpenCode Mobile/UI/Archived/ArchivedSessionsViewModel.swift
Home's Done pill is server unread state. Unarchive from the Archived screen must not acknowledge it; only opening the session does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Search's chips sit in a row that scrolls sideways. There the title's `weight(1f, fill = false)` had no width to share and collapsed, so the scope and Include archived chips showed only their icons. The title now has a width cap instead of a weight. Adds an instrumented Compose test that puts both chips in a sideways scrolling row and checks their titles show. Co-Authored-By: Claude Opus 5.5 <[email protected]>
main's only new commit is the #976 squash, whose tree matches fa295aa, already merged here in a9d2fac, so this branch's tree is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Dedupe archived sessions after sorting, so a duplicate keeps its newest copy. - A row Undo put back settles against any archive time when unarchived again, since the app never saw the server's time for it. - Android: capture the archive generation before launching the read; the v2 project lookup rethrows cancellation. - iOS: recheck the menu entry with Home's current projects. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Automated review: no finding that 2+ of 3 passes agreed on.
2 finding(s) from a single pass, not posted
ios/OpenCode Mobile/OpenCode Mobile/UI/Main/SessionSearchModel.swift:294high: iOS search never queries v1 worktree lists (muse-spark-1.3-contributor)ios/OpenCode Mobile/OpenCode Mobile/UI/Main/SessionSearchModel.swift:344medium: iOS drops server rows without a matching section (muse-spark-1.3-contributor)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.167
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> # Conflicts: # android/app/src/main/java/dev/opencode/mobile/domain/session/V2SessionRemote.kt
main's tree equals #977's final commit f30175e, merged in the parent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Menu entries kept in order: Search sessions, Archived sessions, Worktrees; Localizable.xcstrings merged by key. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On v1, iOS Home folds the sessions of a project's non-added worktrees into the added path's section, but search only asked the added paths, so a server match in such a worktree was missed (Android already asks these lists). Home now passes those directories to search, which asks them too and files their matches under the added path's section, the way Home shows them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Triage of the latest review summary (the automated review on 19ba2ef).
|
main's tree equals #978's final commit 032ee67, already merged here in a6e1364, so this branch's tree is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>





Summary
Search sessions on Home (#929), on iOS and Android, for v1 and v2 servers. Stacked on #977 (Archived sessions, itself on #976 Home ⋯ menu); merge order #976 → #977 → #978. The design is in the #929 design comment.
supportsArchivedSessions, #833 Restore archived sessions #977): on open, search lists every Home project's archived sessions once through #833 Restore archived sessions #977's archived listing and matches their titles locally. An "Include archived · N" toggle chip (N in scope, off on every open) adds archived matches in their own Archived section with an Archived tag; opening one shows #833 Restore archived sessions #977's archived banner. With no match, the empty state offers Include archived and/or Search all projects, each only when it would find something. Hidden on servers without archive support.SessionRepository.searchSessions(query, directory)behind the domain adapter.GET /session?directory=&search=&roots=true(confirmed in the 1.19.5/doc).GET /api/sessionwithproject/directory,search,parentID=null,archived=false.searchstill gives correct results.SessionSearchViewModel/SessionSearchModel):busycovers the debounce and the request, so the field shows a spinner and "Searching…" shows instead of a premature "No match".Searchtext-input kind: search mark, a clear button, and a spinner whilebusy.titleHighlight.OpenCodeMenuChip, withMenuandTogglevariants.placement: .below.Checks
feature/929-home-overflow-menuandfeature/833-restore-archived-sessions.:app:testDebugUnitTestpasses in full. New:SessionSearchViewModelTest(including Include archived),SessionTitleSearchTest, and v1/v2 search request tests inSessionProtocolRepositoryTest. ktlint is clean on the changed lines.build-for-testing(generic simulator) succeeds. New and changed suites passed in the iOS worktree run (104 tests):SessionSearchModelTests,SessionTitleSearchTests,SessionProtocolRepositoryTests,OpenCodeListItemTitleHighlightTests,OpenCodeKeyboardShortcutTests,OpenCodeKeyboardNavigationTests,OpenCodeEscapeResolverTests. Not re-run on this branch, because slices no longer runxcodebuild test.scripts/check-string-keys.mjspasses.scripts/check-hardcoded-text.mjsfinds nothing in changed files.Evidence
Pending: the shared device verification pass will add it.
Issue
Fixes #929
Risks / Follow-ups
SessionSearchModelTests) compile but were not run; slices no longer runxcodebuild test.🤖 Generated with Claude Code