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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
**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.
|
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
|
- [ ] **[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).
|
`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.
|
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.
|
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`
|
- [ ] **[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
|
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
|
(trashed to `~/tmp/gemini_trash/shadcn_components_ui_2026-03-27`). Safe to remove both packages
|
||||||
|
|||||||
@@ -833,6 +833,7 @@ export const properties_to_save = [
|
|||||||
'attend_url_passcode',
|
'attend_url_passcode',
|
||||||
'attend_phone',
|
'attend_phone',
|
||||||
'attend_phone_passcode',
|
'attend_phone_passcode',
|
||||||
|
'default_qry_str',
|
||||||
'tmp_sort_1',
|
'tmp_sort_1',
|
||||||
'tmp_sort_2',
|
'tmp_sort_2',
|
||||||
'file_count',
|
'file_count',
|
||||||
|
|||||||
@@ -131,10 +131,12 @@ async function handle_search_refresh() {
|
|||||||
const name = (ev.name ?? '').toLowerCase();
|
const name = (ev.name ?? '').toLowerCase();
|
||||||
const desc = (ev.description ?? '').toLowerCase();
|
const desc = (ev.description ?? '').toLowerCase();
|
||||||
const loc = (ev.location_text ?? '').toLowerCase();
|
const loc = (ev.location_text ?? '').toLowerCase();
|
||||||
|
const dqs = (ev.default_qry_str ?? '').toLowerCase();
|
||||||
return (
|
return (
|
||||||
name.includes(qry_str) ||
|
name.includes(qry_str) ||
|
||||||
desc.includes(qry_str) ||
|
desc.includes(qry_str) ||
|
||||||
loc.includes(qry_str)
|
loc.includes(qry_str) ||
|
||||||
|
dqs.includes(qry_str)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -213,10 +215,12 @@ async function handle_search_refresh() {
|
|||||||
const name = (ev.name ?? '').toLowerCase();
|
const name = (ev.name ?? '').toLowerCase();
|
||||||
const desc = (ev.description ?? '').toLowerCase();
|
const desc = (ev.description ?? '').toLowerCase();
|
||||||
const loc = (ev.location_text ?? '').toLowerCase();
|
const loc = (ev.location_text ?? '').toLowerCase();
|
||||||
|
const dqs = (ev.default_qry_str ?? '').toLowerCase();
|
||||||
if (
|
if (
|
||||||
!name.includes(qry_str) &&
|
!name.includes(qry_str) &&
|
||||||
!desc.includes(qry_str) &&
|
!desc.includes(qry_str) &&
|
||||||
!loc.includes(qry_str)
|
!loc.includes(qry_str) &&
|
||||||
|
!dqs.includes(qry_str)
|
||||||
)
|
)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user