Skip to content

feat(search): search all content types with category detail pages - #1353

Merged
everpcpc merged 3 commits into
mainfrom
feat/search-all-content
Nov 28, 2026
Merged

everpcpc merged 3 commits into
mainfrom
feat/search-all-content

Conversation

@everpcpc

@everpcpc everpcpc commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What

Restructures search to match the kmrs web UI (/search + /search/:category):

  • Submitting a query searches Series, Books, Collections, and Read Lists together by default instead of only the persisted browse content type.
  • The search overview shows one horizontal preview strip per non-empty category with its total match count (Series · 23), honoring the active library scope and the searchIgnoreFilters / stored browse options. (Collections and Read Lists apply library scope server-side only; client-local pin prepending and offline list queries stay unscoped, matching the Lists page.)
  • On iOS, category pages open like Dashboard strips — via the section header link or by pulling past the strip's trailing edge and releasing (no trailing View All card). macOS and tvOS keep a cover-sized View All trailing card, and macOS keeps hover scroll arrows.
  • Each category links to a new paginated SearchCategoryDetailView that keeps the query and scope, supports layout/sort/filter/presets and series/book batch selection, and re-queries in place when editing its search field. Popping back preserves the overview without reloading.
  • Unified across the iPhone Search tab, the iPad/macOS Dashboard search overlay, aggregate/library browse searches (including tvOS), and the deep-link search page. Metadata-filtered and fixed-type browse pages keep filtering their own list.
  • Adds a SearchViewModel that reuses the four existing browse view models concurrently (12-item preview window) with GRDB upserts online and exact local match counts offline (countBrowseSeries / countBrowseBooks).
  • Review hardening:
    • Only completed, non-cancelled searches satisfy hasLoaded, so leaving the surface mid-search reloads on return instead of caching partial/empty results.
    • Read-list previews skip automatic-policy member-book hydration (syncAutomaticBooks: false) so a search never stalls all four categories behind unrelated book-page syncs.
    • Preview strips render at most 12 cards even when client-local pins prepend more items.
    • Whitespace-only Dashboard searches are trimmed before presentation.
    • Series/book selections clear when the query or scope changes, so batch actions never target hidden items.
    • The iPhone empty placeholder shows its scope menu only while the iOS 26+ search bar is presented (never duplicating the visible toolbar scope capsule).
    • Category pages rely on each list's own initial .task and only bump refreshTrigger on post-mount scope changes.
  • Updates repo-conventions for the new search boundaries and localizes search.viewAll plus the updated search.empty.hint in all 10 supported languages.

Why

Previously, search only queried whichever of Series or Books was selected in browseContent, so Collections and Read Lists were unreachable from search despite the empty-state hint mentioning them. An all-category overview with drill-down category pages makes every content type discoverable in one search and matches the kmrs web UI.

Validation

  • make format
  • make build (iOS, macOS, and tvOS all build successfully)
  • make localize and ./misc/translate.py list (No missing translations found.)
  • Independent Standards + Spec/correctness review passes (findings addressed in follow-up commits).
  • iPhone 18 Pro simulator (iOS 27) against a live kmrs server:
    • Verified multi-category results (1 → Series · 4 + Books · 4; batch → Series · 23 + Books · 10) and empty/no-results states.
    • Verified library-scope filtering (Test pinned scope vs. All Libraries).
    • Verified opening category detail pages via the header link and via trailing overscroll on a 23-result strip.
    • Verified category pagination/filter/selection chrome and returning to the overview without a reload flash.
    • Verified switching to Dashboard mid-search and returning to Search reloads and renders results.
    • Verified the iPhone Search placeholder shows its scope menu only while the search bar is presented, and leaves it to the toolbar capsule once dismissed.

@everpcpc
everpcpc merged commit 07cfbf3 into main Nov 28, 2026
3 checks passed
@everpcpc
everpcpc deleted the feat/search-all-content branch November 28, 2026 07:58
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