diff --git a/.ae_brief b/.ae_brief index 555144c9..ff29e82e 100644 --- a/.ae_brief +++ b/.ae_brief @@ -1,15 +1,15 @@ # Aether Project Brief: aether_app_sveltekit -**Last Updated:** 2026-01-20 23:41:05 +**Last Updated:** 2026-01-21 20:25:42 **Current Agent:** mcp_agent ## 🛠️ What I Just Did -Finalized 7 documentation files for Aether Native V3: Architecture, Functional Spec, Rewrite Plan, API Payload, Bridge Interface, Deployment Plan, and Automation Scripts. Cross-referenced and audited for data integrity. +Restored V3 text search for Event Sessions, IDAA Recovery Meetings, and Journal Entries. Fixed 'TypeError: obj_li is not iterable' by robustly handling API envelopes. Standardized on 'like' operator for V3 searches. Updated project TODO and documented recent learnings. ## 🚧 Current Blockers -None. Core specs are complete. +IDAA search currently ignores user-defined limits due to over-fetching strategy required for client-side filtering. Journal Entry search filters (enabled/hidden) are currently hardcoded in the UI query component. ## ➡️ Exact Next Steps -1. Scaffold new Electron 33+ project. 2. Implement the V3 bootstrapping/hydration logic. 3. Port the core Event Launcher IPC bridge. +1. Update Journal Entry search to use dynamic filters for 'enabled' and 'hidden'. 2. Implement limit slicing for IDAA search results. 3. Continue hardening specialized search logic for Presenters and Badges. --- *Generated by ae_brief* diff --git a/TODO.md b/TODO.md index fca7ee17..52f9542a 100644 --- a/TODO.md +++ b/TODO.md @@ -4,14 +4,25 @@ This is a list of tasks to be completed before the next event/show/conference. --- +## Tomorrow's Priorities (Jan 22, 2026) + +1. **Journal Entry Search Cleanup:** + - [ ] Update `ae_comp__journal_entry_obj_qry.svelte` to use dynamic `$journals_loc` values for `enabled` and `hidden` parameters instead of hardcoded strings. + - [ ] Verify that the search results correctly respect these filters. +2. **Hardening V3 Search (Continued):** + - [ ] **Event Presenter Search:** Restore specialized business logic. + - [ ] **Event Badge Search:** Restore specialized business logic. + - [ ] **Exhibit Search:** Restore missing search function and logic. + - [ ] **IDAA Result Limit:** Fix the over-fetching issue where the `limit` parameter is ignored after client-side filtering. + +--- + ## Current Priorities (Jan 21, 2026) 1. **Hardening V3 Search (URGENT):** - [x] **Event Session Search:** Finalized and verified. Added `default_qry_str` to V3 body. (Completed 2026-01-21) - [x] **IDAA Recovery Meetings Search:** Restored functionality using V3 `search__event` with `default_qry_str`. (Completed 2026-01-21) - - [ ] **Event Presenter Search:** Restore specialized business logic. - - [ ] **Event Badge Search:** Restore specialized business logic. - - [ ] **Exhibit Search:** Restore missing search function and logic. + - [x] **Journal Entry Search:** Fixed `match` operator error (switched to `like`) and resolved iteration crashes by unwrapping API envelopes. (Completed 2026-01-21) - [ ] **Global Rule:** Preserve `ft_qry`, `lk_qry`, and `and_qry` blocks as "sacred" business logic. Never put non-searchable fields in the POST body. 2. **Service Worker Reliability (Mitigated):** - [x] **Disable Auto-Registration:** Temporarily disabled `serviceWorker.register` in `svelte.config.js` to stop `TypeError` loop. @@ -27,7 +38,7 @@ This is a list of tasks to be completed before the next event/show/conference. - [ ] **Enhance `ae_obj_info`**: Include field types, constraints (NOT NULL), and default values. - [ ] **Payload Validation**: Create a dry-run tool to check payloads against Pydantic models. - [x] **Error Transparency**: Update backend to return specific SQLAlchemy/Pydantic errors in `meta.details`. (Completed 2026-01-19) -- [ ] **Automated Source of Truth**: Generate `V3_OBJECT_MODELS.md` automatically in `agents_sync/Aether/`. +- [ ] **Automated Source of Truth**: Generate \`V3_OBJECT_MODELS.md\` automatically in \`agents_sync/Aether/\`. - [x] **Fix V3 Search for IDAA Recovery Meetings** (Completed 2026-01-20) - [x] **Restore System Lookups** (Completed 2026-01-20) diff --git a/src/lib/ae_journals/ae_journals__journal.ts b/src/lib/ae_journals/ae_journals__journal.ts index 3fdaf075..bc3f3992 100644 --- a/src/lib/ae_journals/ae_journals__journal.ts +++ b/src/lib/ae_journals/ae_journals__journal.ts @@ -173,15 +173,15 @@ export async function load_ae_obj_li__journal({ // Add enabled/hidden filters to search query as V3 search is explicit if (enabled === 'enabled') { - search_query.and.push({ field: 'enabled', op: 'eq', value: true }); + search_query.and.push({ field: 'enable', op: 'eq', value: true }); } else if (enabled === 'not_enabled') { - search_query.and.push({ field: 'enabled', op: 'eq', value: false }); + search_query.and.push({ field: 'enable', op: 'eq', value: false }); } if (hidden === 'hidden') { - search_query.and.push({ field: 'hidden', op: 'eq', value: true }); + search_query.and.push({ field: 'hide', op: 'eq', value: true }); } else if (hidden === 'not_hidden') { - search_query.and.push({ field: 'hidden', op: 'eq', value: false }); + search_query.and.push({ field: 'hide', op: 'eq', value: false }); } if (log_lvl) { @@ -523,15 +523,15 @@ export async function qry__journal({ // Add enabled/hidden filters if (enabled === 'enabled') { - search_query.and.push({ field: 'enabled', op: 'eq', value: true }); + search_query.and.push({ field: 'enable', op: 'eq', value: true }); } else if (enabled === 'not_enabled') { - search_query.and.push({ field: 'enabled', op: 'eq', value: false }); + search_query.and.push({ field: 'enable', op: 'eq', value: false }); } if (hidden === 'hidden') { - search_query.and.push({ field: 'hidden', op: 'eq', value: true }); + search_query.and.push({ field: 'hide', op: 'eq', value: true }); } else if (hidden === 'not_hidden') { - search_query.and.push({ field: 'hidden', op: 'eq', value: false }); + search_query.and.push({ field: 'hide', op: 'eq', value: false }); } ae_promises.load__journal_obj_li = await api diff --git a/src/lib/ae_journals/ae_journals__journal_entry.ts b/src/lib/ae_journals/ae_journals__journal_entry.ts index ff61b841..5751147a 100644 --- a/src/lib/ae_journals/ae_journals__journal_entry.ts +++ b/src/lib/ae_journals/ae_journals__journal_entry.ts @@ -348,6 +348,7 @@ export async function qry__journal_entry({ console.log('qry_str:', qry_str); // Using 'like' with wildcards to ensure compatibility search_query.and.push({ field: 'default_qry_str', op: 'like', value: `%${qry_str.trim()}%` }); + params['lk_qry'] = { 'default_qry_str': qry_str.trim() }; } if (qry_created_on) { diff --git a/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte b/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte index 783c6877..ec19863d 100644 --- a/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte +++ b/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte @@ -73,6 +73,8 @@ if ($journals_trig.journal_entry_qry) { $journals_trig.journal_entry_qry = false; + log_lvl = 1; + if (log_lvl) { console.log( `Triggered: $journals_trig.journal_entry_qry: ${$journals_loc.qry__search_text}` @@ -90,10 +92,10 @@ // qry_priority: null, // qry_type: and_type, - // enabled: $journals_loc.recovery_meetings.qry__enabled, - // hidden: $journals_loc.recovery_meetings.qry__hidden, - // order_by_li: $journals_loc.recovery_meetings.qry__order_by_li, - // limit: $journals_loc.recovery_meetings.qry__limit, + enabled: 'enabled', // $journals_loc.qry__enabled, + hidden: 'not_hidden', // $journals_loc.qry__hidden, + // order_by_li: $journals_loc.qry__order_by_li, + // limit: $journals_loc.qry__limit, // try_cache: try_cache, log_lvl: log_lvl });