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

+1 -14
View File
@@ -62,7 +62,7 @@ templ BookShelf(
<option value="created_at DESC">Date Added</option>
<option value="page_count DESC">Page Count</option>
</select>
<button type="button" @click="filtersOpen = true; loadFacetPanel()" class="btn btn-secondary">
<button type="button" @click="filtersOpen = true" class="btn btn-secondary">
@Icon("filter", "h-4 w-4")
<span>Filters</span>
</button>
@@ -279,19 +279,6 @@ templ BookShelf(
/>
</template>
</div>
<div>
<label class="block text-xs font-semibold uppercase tracking-wide mb-2" style="color: var(--text-secondary)">Browse by facet</label>
<!-- Phase 7: facet values are server data — this partial is
rendered by templ (templates/facet_panel.templ) and fetched
with the CURRENT filter query string on drawer open and
after every apply, so counts are computed under the active
filters. A value click toggles that facet's filter input
(hidden where the drawer has no field) and re-applies the
form — bookshelf.ts owns the click, templ owns the look. -->
<div id="facet-panel" class="space-y-2">
<p class="text-xs" style="color: var(--text-secondary);">Open the filters to browse facet values.</p>
</div>
</div>
</div>
<div class="sticky bottom-0 px-6 py-4 border-t" style="background-color: var(--bg-secondary); border-color: color-mix(in srgb, var(--text-primary) 7%, transparent);">
<button type="submit" @click="filtersOpen = false" class="btn btn-primary w-full">Apply Filters</button>