From ae4b94f1b2d640913f38b1f8bf6ca0e1bd86ad8f Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 31 Mar 2026 16:16:43 -0400 Subject: [PATCH] fix(idaa): expand recovery_meetings search to use default_qry_str from API Backend updated (2026-03-31) to return default_qry_str in event API responses. Frontend now stores it via properties_to_save and searches it in both the local Dexie fast-path filter and the secondary post-API client filter. Previously, the server searched default_qry_str (e.g. day-of-week, recurring_text) while the client only checked name/description/location_text -- causing local results to drop valid matches on revalidation (e.g. searching 'Thursday'). Also adds TODO note to audit other event search pages for the same mismatch. Co-Authored-By: Claude Sonnet 4.6 --- documentation/TODO__Agents.md | 10 +++++++++- src/lib/ae_events/ae_events__event.ts | 1 + src/routes/idaa/(idaa)/recovery_meetings/+page.svelte | 8 ++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/documentation/TODO__Agents.md b/documentation/TODO__Agents.md index ef584375..3ef0d333 100644 --- a/documentation/TODO__Agents.md +++ b/documentation/TODO__Agents.md @@ -82,7 +82,7 @@ lifted and the real pre-existing errors became visible. **Lesson:** A broken ambient declaration can silently hide unrelated errors. If svelte-check suddenly jumps to 0 errors, verify it's not because a bad `.d.ts` replaced a package's types. -**Current state (2026-03-27):** 31 errors, 0 warnings — all `ModalProps.children`. +**Current state (2026-03-31):** 32 errors, 0 warnings — all `ModalProps.children`. - [ ] **[flowbite-svelte] `ModalProps.children` — 31 errors across 26 files.** The flowbite-svelte `Modal` component API changed; `children` is no longer a direct prop (now Svelte snippet-based). @@ -90,6 +90,14 @@ suddenly jumps to 0 errors, verify it's not because a bad `.d.ts` replaced a pac Run `npx svelte-check 2>&1 | grep ModalProps` to get the current list. Fix pattern: replace `children` prop binding with Svelte snippet syntax per flowbite-svelte docs. +- [ ] **[IDAA / Events] Audit `default_qry_str` coverage in other event search pages.** + The backend was updated 2026-03-31 to expose `default_qry_str` in API responses. + Frontend fix applied to Recovery Meetings (`+page.svelte` + `properties_to_save`). + Check all other event search pages that use `db_events.event.filter()` or a secondary + post-API text filter — they may have the same mismatch (local searches `name`/`description` + only while server uses `default_qry_str`). Start with: any route under `/events/` or `/idaa/` + that has a full-text search input. + - [ ] **[package.json] Remove orphaned ShadCN/bits-ui packages.** `shadcn-svelte` and `bits-ui` remain in `package.json` but have no usages — `src/lib/components/ui/` was removed 2026-03-27 (trashed to `~/tmp/gemini_trash/shadcn_components_ui_2026-03-27`). Safe to remove both packages diff --git a/src/lib/ae_events/ae_events__event.ts b/src/lib/ae_events/ae_events__event.ts index ff93fd93..f88bc03f 100644 --- a/src/lib/ae_events/ae_events__event.ts +++ b/src/lib/ae_events/ae_events__event.ts @@ -833,6 +833,7 @@ export const properties_to_save = [ 'attend_url_passcode', 'attend_phone', 'attend_phone_passcode', + 'default_qry_str', 'tmp_sort_1', 'tmp_sort_2', 'file_count', diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte index 16a5c622..c8e7f4f6 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte @@ -131,10 +131,12 @@ async function handle_search_refresh() { const name = (ev.name ?? '').toLowerCase(); const desc = (ev.description ?? '').toLowerCase(); const loc = (ev.location_text ?? '').toLowerCase(); + const dqs = (ev.default_qry_str ?? '').toLowerCase(); return ( name.includes(qry_str) || desc.includes(qry_str) || - loc.includes(qry_str) + loc.includes(qry_str) || + dqs.includes(qry_str) ); } return true; @@ -213,10 +215,12 @@ async function handle_search_refresh() { const name = (ev.name ?? '').toLowerCase(); const desc = (ev.description ?? '').toLowerCase(); const loc = (ev.location_text ?? '').toLowerCase(); + const dqs = (ev.default_qry_str ?? '').toLowerCase(); if ( !name.includes(qry_str) && !desc.includes(qry_str) && - !loc.includes(qry_str) + !loc.includes(qry_str) && + !dqs.includes(qry_str) ) return false; }