feat(android): Phase 1 search screen with family-simple filters #1119
Loading…
Reference in a new issue
No description provided.
Delete branch "ux-android-search"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements spec 055 task T006 — Phase 1: Search screen for the Android app.
What you get
TimelineScreen.ktstays a single, obvious hunk).search, plussearchMedia/{mediaItemId}so a result tap opens the existingMediaViewerScreenover the search result list without touching the timeline's viewer route.Favoriten(toggle),Jahr(year picker, newest → 1970),Person(picker fed byGET /api/person-assignments/people). Every active filter is its own removable chip; "Filter zurücksetzen" clears the row.Raw token syntax gets no UI, but does not break: the box text goes to
quntouched and the server parsesperson:"…",year:2023,from:/to:,album:"…",favorite:.Filter findings (worth knowing before merge)
filters.personFiltersdoes not echopersonIdparameters.SearchService.filterSummaryis built from the parsed tokens only, so it lists nothing unless the user actually typedperson:"Name". The chips therefore keep filter state in the ViewModel instead of re-reading it back from the response.unmatchedTokenscarries only unmatchedperson:tokens. Unmatchedalbum:tokens arrive separately inunmatchedAlbumTokens, and either one makes the whole query return zero items (AND semantics). Both lists are merged into the hint.year:is the only token that needs a conflict guard.year:combined with theyearparameter — andfrom:/to:combined with it — is a hard 400, so a typed period token suppresses the parameter.favorite:needs no guard (the token simply wins server-side), andpersonIdis documented to AND together withperson:tokens.Risks / limits
GET /api/searchaccepts nocursorand capslimitat 100, so a broad query truncates silently. Recorded as ISSUE-122.q≥ 2 characters, so chips with an empty box show the "type at least two letters" hint instead of browsing by filter.MemoriesApp, outside the NavHost) because navigation-compose gives every destination its ownViewModelStore. It resets on session change so one family member's search never lingers under another's login.high) — found while wiring this up:NavHostscopes each destination to its ownNavBackStackEntrystore (verified in the navigation-compose 2.10.2 bytecode,LocalOwnersProvider), so the PHOTOS and MEDIA_DETAIL destinations get differentTimelineViewModelinstances and the comment claiming otherwise is wrong. Deliberately not fixed here — the timeline lane owns those files — but the search lane avoids the same trap by hoisting its ViewModel.Verification
cd apps/android && ./gradlew :app:testDebugUnitTest :app:assembleDebug— BUILD SUCCESSFUL, 189 tests, 0 failures, 0 skipped (35 new:SearchViewModelTest18,SearchQueryTest7,SearchJsonTest5,HttpSearchApiTest5).Rebased onto
origin/main(2362ef77) before pushing. Not merging — for review.09744e71e17510a9ea8b