feat(filters): panel removal + All-Books field-values fix (faceted plan Phase 8)

- Remove the Phase 7 facet-panel UI: SSR route, facet_panel.templ,
  FacetCountsForView, drawer panel block, panel TS + .facet-* CSS.
  The ENGINE stays (FacetCountsUnderFilters, all-facets endpoint,
  drift guard) — it becomes the Phase 9 builder's machinery.
- Fix the All-Books bug: field-values autocomplete (author/genre/
  tags/narrator/series/language) treats library_id as OPTIONAL —
  absent aggregates every VISIBLE library (family lens in-query);
  explicit out-of-set library_id is now 403, never a silent pass.
  The four scalar Search*Values queries get the nullable shape.
- toast.ts: suggestion fetches are exempt from error toasts
  (console-only) — a failed background hint never interrupts.
- TestFacetPanelPartial deleted with the behavior; TestFieldValuesAll-
  Libraries pins the fix (200 + cross-library aggregation, family
  lens, 403). Contract-pins changelog entry added.
This commit is contained in:
John O'Keefe committed 2026-10-20 12:20:51 -04:00
1 parent f52bb6f073
commit ebb7f4a5b0
14 files changed
+192 -643

No files matched your search

+21
View File
@@ -280,3 +280,24 @@ cover_image_path, has_conflict, format_group, badge`.
- The 14 per-column facet SQL queries are replaced by one
`FacetCountsUnderFilters` UNION-ALL statement; the registry drift
guard now reflects over both generated param structs.
## 2026-10-20 — Filter plumbing: facet-panel partial removed; field-values `library_id` optional
- `GET /media-items/facet-panel` (the SSR partial documented above,
same day) is REMOVED — the panel UX was rejected on scale grounds
and the filter drawer becomes a rule builder with no other mode.
Never contract-pinned while it lived (same-day entry, same-day
removal); `TestFacetPanelPartial` was deleted with the behavior.
The all-facets JSON endpoint and its two shapes are UNCHANGED and
stay pinned; `FacetCountsUnderFilters` and the registry drift guard
keep their roles (the engine outlives the panel).
- `GET /api/media-items/search?field=value` autocomplete
(author/genre/tags/narrator/series/language): `library_id` is now
OPTIONAL — absent means every library VISIBLE to the caller (the
per-user family lens applies inside the query), fixing the All-Books
view's "library_id is required" 400. An explicit out-of-set
`library_id` is now a 403 on this endpoint too (was: silent empty
result for hidden libraries — the silent pass is the anti-pattern
the standing rule forbids). The single-facet
`/api/media-items/facets?facet=X` shape still REQUIRES `library_id`
— that pin is unchanged.