Search Match Engine
Search runs entirely on the client against the Dexie cache, so it works offline (Product Brief §1.1). The engine lives in src/lib/search/.
Pieces
Section titled “Pieces”normalize.ts—fold(s)normalizes text (case/diacritics) for accent-insensitive matching;isMatchable(query)gates whether a query is searchable (e.g. non-empty after folding).match.ts—match(...)produces aMatchOutcomeover the match fieldsMatchField = 'title' | 'notes' | 'step', withMatchOptions/SearchResulttypes.search.ts—search(...)is the top-level entry that runs the matcher across the cached Task set (title, notes, and child Step titles) and returns rankedSearchResults.snippet.ts—snippet(text, query, max = 80)builds a highlighted excerpt around the match for result display.
Search spans the Tasks a user can see (owned + member Lists), matching across a Task’s title, its notes, and its Steps’ titles. Because it reads the local cache, results are instant and available offline; there is no server search endpoint on the hot path.
Related: Offline Outbox & Optimistic Writes (the cache it searches), Create-Form & Search Triggers (UI entry, deferred guide).