Search UI files
URL state, filter controls, field registry and mailed-document actions. Server matching is in lib/db/search-store.ts.
System explanation · Choosing checks
Source files
| File | Responsibility / entry points |
|---|---|
src/features/reviews/filter-builder.tsx
|
Field picker, filter drafts and serialization into committed search URLs. SearchField, DEFAULT_FILTER, controlClass, actionClass, committedFilters, parseSearchFilters … |
src/features/reviews/full-search-controls.tsx
|
Search text and stacked-filter controls for the full results page. FullSearchControls |
src/features/reviews/search-fields.ts
|
Typed searchable field registry, safe paths, choices and raw/display
extraction. SearchField, searchFields, validSearchField, isKnownSearchField, getSearchField, searchPath … |
src/features/reviews/search-filters.ts
|
Validated filter/sort shapes and backward-compatible sort parsing. searchFiltersSchema, SearchFilter, searchSortsSchema, SearchSort, parseSearchSorts |
src/features/reviews/search.helpers.ts
|
Eastern appointment formatting, command POST helper and mailed-document metadata
construction. formatAppointmentEastern, PostReviewCommandResult, postReviewCommand, buildMailedDocument |
src/features/reviews/mail-attach.tsx
|
Admin mail desk cell that names, uploads and attaches incoming PDFs one at a
time. MailAttachCell |
src/features/reviews/search.tsx
|
Results page, URL-driven fetches and admin mailed-document attachment. SearchLoading, ReviewSearch |
Tests
| File | Responsibility / entry points |
|---|---|
src/features/reviews/search-fields.test.ts
|
Checks search fields. Example: “registry includes empty optional fields and nested repeated metadata”. |
src/features/reviews/search.helpers.test.ts
|
Checks search.helpers. Example: “appointment display preserves Eastern wall time without browser timezone conversion”. |