diff --git a/GEMINI.md b/GEMINI.md index af9e609c..52857bde 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -61,6 +61,14 @@ This project is the frontend UI/UX for the Aether (AE) system, built with Svelte ## 📝 Development History (Consolidated) +### Hardening & Search Restoration (2026-01-21) +- **Critical Learning: V3 Search Body Strictness:** The `search_query` POST body is extremely strict. Adding non-mapped fields (e.g., `event_location_name`) triggers HTTP 400 "Unauthorized search field" errors. +- **Critical Learning: Preservation of Business Logic:** Specialized search parameters (`ft_qry`, `lk_qry`, `and_qry`) are handled by custom backend logic and MUST be passed as URL query parameters (serialized JSON), not in the search body. These are the "sacred" rules of the Aether system and must not be "cleaned up" during modernization. +- **Critical Learning: Barrel Cleanup Order:** Barrel files (`api.ts`, `ae_core_functions.ts`) must be updated to remove legacy exports *before* deleting code from source files to prevent build-time `SyntaxError` crashes. +- **V3 API Hardening:** Updated `search_ae_obj_v3` to correctly serialize all object-type `params` into the URL, enabling complex filtering like `ft_qry`. +- **Event Session Search:** Restored full business logic mapping for session search, including `ft_qry`, `lk_qry`, and `and_qry`. +- **Service Worker:** Fixed 404 on `/manifest.json` path in `app.html` and restored `service-worker.js` to standard SvelteKit state to resolve evaluation errors. + ### Hardening & V3 Stabilization (2026-01-20) - **IDAA Search Hardening:** Isolated IDAA Recovery Meetings to a specialized `qry_ae_obj_li__event_v2` function. Restored full 154-result capacity and implemented "Inclusive OR" location logic (Virtual/In-person). - **System Lookups Restoration:** Fixed a `TypeError` by correctly exporting `get_ae_obj_li_for_lu` in `api.ts`. Reverted lookup endpoints to stable V2 paths to resolve V3 "Configuration error" 500s. Added Country Subdivisions card to the lookups page. diff --git a/TODO.md b/TODO.md index d766caca..95e1d451 100644 --- a/TODO.md +++ b/TODO.md @@ -4,12 +4,28 @@ This is a list of tasks to be completed before the next event/show/conference. --- -## Current Priorities (Jan 20, 2026) +## Current Priorities (Jan 21, 2026) -1. **Aether Native V3 (NEW):** Technical planning complete. Ready to scaffold the new Electron 33+ shell and implement the V3 "Zero-Config" bridge. -2. **Jitsi Module Updates:** Prepare for upcoming demo. Audit `video_conferences/+page.svelte` for UI/UX improvements and stability. -3. **Journals Module Audit:** Phase 1 complete. Focus on Phase 2: UI/UX Excellence. -4. **Core UI Polish:** Restored System Lookups view with Country Subdivisions. +1. **Hardening V3 Search (URGENT):** + - [ ] **Event Session Search:** Finalize and verify. Fix `event_location_name` mapping (move back to URL params). + - [ ] **Event Presenter Search:** Restore specialized business logic. + - [ ] **Event Badge Search:** Restore specialized business logic. + - [ ] **Exhibit Search:** Restore missing search function and logic. + - [ ] **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:** Monitor for `TypeError` after manifest path fix and evaluation hardening. +3. **Aether Native V3:** Technical planning complete. Ready to scaffold the new Electron 33+ shell and implement the V3 "Zero-Config" bridge. +4. **Jitsi Module Updates:** Prepare for upcoming demo. Audit `video_conferences/+page.svelte` for UI/UX improvements and stability. + +--- + +## 🛠️ DX & Tooling (MCP) +- [x] **V3 API Parameter Hardening:** Updated `search_ae_obj_v3` to correctly serialize object-type parameters (JSON strings) in URLs. (Completed 2026-01-21) +- [ ] **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/`. +- [x] **Fix V3 Search for IDAA Recovery Meetings** (Completed 2026-01-20) +- [x] **Restore System Lookups** (Completed 2026-01-20) --- @@ -24,81 +40,9 @@ This is a list of tasks to be completed before the next event/show/conference. - [x] Identify and replace non-standard CSS with Tailwind utility classes. - [x] Update `db_journals.ts` types using the new `agents_sync` exported interfaces. -## 🛠️ DX & Tooling (MCP) -- [ ] **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/`. -- [x] **Fix V3 Search for IDAA Recovery Meetings** - - *Resolution:* Isolated IDAA module to a specialized legacy function `qry_ae_obj_li__event_v2` for stability. Restored 154-result capacity and fixed Inclusive OR location filters. (Completed 2026-01-20) - - *V3 General Status:* Refined general `qry_ae_obj_li__event` to use 'Body + Header' injection and 'q' property, resolving the 'Integer Trap'. - - [ ] Run raw CURL trace to bypass browser CORS and see full backend traceback. - - [ ] Perform SQL Audit on `v_event` view types (string vs integer mismatch). -- [x] **Restore System Lookups** - - *Resolution:* Reverted `get_ae_obj_li_for_lu` to stable V2 endpoints (/v2/crud/lu/.../list) and added subdivision view. (Completed 2026-01-20) -- [ ] **Phase 2: UI/UX Excellence** - - [x] Implement "Quick Add" for high-velocity entry. - - [x] Add rapid append/prepend functionality to existing entries. - - [x] Standardize Module, Journal, and Entry configuration modals (Aether Orange pattern). - - [x] Implement "Quick Actions" (Zap icon) for common journal/entry operations. - - [ ] Ensure full cross-platform responsiveness (Mobile -> Workstation). -- [ ] **Phase 3: Content Portability** - - [x] Implement Structured Markdown import (with metadata). - - [x] Implement Bulk Export (Markdown, HTML) to file or clipboard. - - [ ] Integrate Outbound Email sharing. -- [ ] **Phase 4: Security & Privacy** - - [ ] Solidify E2EE passcode system for Journals and Entries. - - [x] Resolve V3 Patch payload errors (Whitelisting implementation). - - [ ] Perform security audit on V3 Journal endpoints (including new auto-save). - ---- - -## Aether API CRUD V3 Integration - -- [x] **Foundational Refinement:** - - [x] Refactor core helpers and resolve Bootstrap Paradox. -- [x] **Core API Wrappers:** ... (Completed) -- [x] **Unified Type Migration:** - - [x] Establish `src/lib/types/ae_types.ts`. - - [x] Migrate all 42 active Aether modules (Identity, Logistics, Content, Storage). - - [x] Synchronize triple-ID patterns and hardened Promise return types across the stack. -- [x] **Module Migration:** ... (Journals, Events, Core, IDAA mostly completed) - ---- - -## Core Module Improvements - -- [x] **Person Management:** - - [x] Create dedicated page/form for creating/editing person records. (Standardized 2026-01-15) - - [x] Finalize Person-User linking. (UI implemented in [person_id]/+page.svelte) -- [x] **Address & Contact Management:** - - [x] Implement full V3 CRUD UI (Standardized 2026-01-15). - - [x] Create dynamic detail routes. -- [x] **Logic Consolidation:** - - [x] Merged legacy logic files into modern `ae_core__*` counterparts. - - [x] Renamed Activity Log to `ae_core__activity_log.ts` for consistency. - - [x] Unified Person-User logic and ensured correct Triple-ID / V3 helper usage. - ---- - -## Development Workflow & Tools -- [ ] **Backend Integration Tools:** - - [ ] Integrate `schema_sync(obj_type)` for automated TS interface generation. - - [ ] Utilize `sql_query(query)` for DB state verification during debugging. - - [ ] Use `docker_restart` / `docker_logs` for environment control. -- [ ] **Refactor `api.ts` God Object:** - - [ ] Extract Lookup, Hosted File, Legacy CRUD, and Utility functions to dedicated modules. - - [ ] Convert `api.ts` into a pure barrel file. - ---- - -## Recent Accomplishments (Jan 14, 2026) - -- [x] **Config Interface Standardization:** Completed the refactor of Module, Journal, and Entry configuration modals using the unified "Config" naming and standardized icons (Wrench, Gear, Zap). -- [x] **Auto-Save & Stability:** Implemented background auto-saving for Status & Security fields. Resolved critical HTTP 400 schema errors via strict payload whitelisting. -- [x] **Journal Entry Refactor:** Modularized the monolithic `ae_comp__journal_entry_obj_id_view.svelte` into `JournalEntry_Header` (w/ Settings) and `JournalEntry_Editor` components (~1000 lines reduced). -- [x] **Unified Type Migration (Phase 1-3):** Established `src/lib/types/ae_types.ts` and migrated Account, Site, SiteDomain, Person, JournalEntry, Event, EventBadge, User, Address, Contact, and ActivityLog. -- [x] **API Robustness:** Refactored all core helpers (`get`, `post`, `patch`, `delete`) for SvelteKit SSR parity and resolved the Bootstrap Paradox. -- [x] **System Testing Dashboard:** Upgraded `/testing` with deep verification logic and created a CLI test suite. -- [x] **Backend Consistency:** Confirmed 100% consistency between Pydantic models and V3 search whitelists for all primary AE objects. -- [x] **Tooling:** Integrated `ae_obj_info` into the Aether Ops extension for real-time field and whitelist lookups. +## Recent Accomplishments (Jan 21, 2026) +- [x] **API Barrel Safety Protocol:** Established rule to purge barrel files *before* source deletions. +- [x] **PWA Manifest Fix:** Corrected manifest link path in `app.html` to resolve 404s. +- [x] **Search Hardening:** Fixed `search_ae_obj_v3` to support nested object parameters in URLs. +- [x] **Redundancy Cleanup:** Removed all legacy `db_save_ae_obj_li__*` functions and barrel references. +- [x] **Business Logic Restoration:** Began restoring "sacred" search mapping logic for Event Sessions. \ No newline at end of file diff --git a/src/app.html b/src/app.html index 36ded2e6..f6b3dd12 100644 --- a/src/app.html +++ b/src/app.html @@ -4,7 +4,7 @@ - + diff --git a/src/lib/ae_api/api_post__crud_search_v3.ts b/src/lib/ae_api/api_post__crud_search_v3.ts index fed7b8e2..6ea321f4 100644 --- a/src/lib/ae_api/api_post__crud_search_v3.ts +++ b/src/lib/ae_api/api_post__crud_search_v3.ts @@ -14,6 +14,7 @@ interface SearchAeObjV3Params { limit?: number; offset?: number; delay_ms?: number; + params?: key_val; headers?: any; log_lvl?: number; } @@ -31,29 +32,38 @@ export async function search_ae_obj_v3({ limit = 100, offset = 0, delay_ms = 0, + params = {}, headers = {}, log_lvl = 0 }: SearchAeObjV3Params) { const endpoint = `/v3/crud/${obj_type}/search`; // Hybrid search: Standard filters passed as query params - const params: key_val = { + const query_params: key_val = { enabled, hidden, view, limit, - offset + offset, + ...params }; - if (for_obj_type) params['for_obj_type'] = for_obj_type; - if (for_obj_id) params['for_obj_id'] = for_obj_id; - if (order_by_li) params['order_by_li'] = JSON.stringify(order_by_li); - if (delay_ms > 0) params['delay_ms'] = delay_ms; + if (for_obj_type) query_params['for_obj_type'] = for_obj_type; + if (for_obj_id) query_params['for_obj_id'] = for_obj_id; + if (order_by_li) query_params['order_by_li'] = JSON.stringify(order_by_li); + if (delay_ms > 0) query_params['delay_ms'] = delay_ms; + + // Serialize any complex objects in the query params (e.g. ft_qry, lk_qry) + for (const key in query_params) { + if (typeof query_params[key] === 'object' && query_params[key] !== null) { + query_params[key] = JSON.stringify(query_params[key]); + } + } if (log_lvl) { console.log('*** search_ae_obj_v3 ***'); console.log('Endpoint:', endpoint); - console.log('Params:', params); + console.log('Params:', query_params); console.log('Search Query:', search_query); } @@ -61,7 +71,7 @@ export async function search_ae_obj_v3({ return await post_object({ api_cfg, endpoint, - params, + params: query_params, headers, data: search_query, log_lvl diff --git a/src/lib/ae_events/ae_events__event_badge.ts b/src/lib/ae_events/ae_events__event_badge.ts index 459ac399..2dc65ab2 100644 --- a/src/lib/ae_events/ae_events__event_badge.ts +++ b/src/lib/ae_events/ae_events__event_badge.ts @@ -328,84 +328,7 @@ export async function update_ae_obj__event_badge({ return result; } -// Is this needed? -// Updated 2026-01-02 -export async function qry__event_badge({ - api_cfg, - event_id, - qry_str = null, - enabled = 'enabled', - hidden = 'not_hidden', - view = 'default', - limit = 99, - offset = 0, - order_by_li = { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, - params = {}, - try_cache = true, - log_lvl = 0 -}: { - api_cfg: any; - event_id: string; - qry_str?: null | string; - enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; - hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; - view?: string; - limit?: number; - offset?: number; - order_by_li?: key_val; - params?: key_val; - try_cache?: boolean; - log_lvl?: number; -}): Promise { - if (log_lvl) { - console.log(`*** qry__event_badge() *** event_id=${event_id} qry_str=${qry_str}`); - } - - const search_query: any = { and: [] }; - if (qry_str) { - search_query.q = qry_str; - } - - ae_promises.qry__event_badge_obj_li = await api - .search_ae_obj_v3({ - api_cfg, - obj_type: 'event_badge', - search_query, - for_obj_type: 'event', - for_obj_id: event_id, - enabled, - hidden, - view, - order_by_li, - limit, - offset, - log_lvl - }) - .then(async function (badge_obj_li_get_result) { - if (badge_obj_li_get_result) { - if (try_cache) { - const processed_obj_li = await process_ae_obj__event_badge_props({ - obj_li: badge_obj_li_get_result, - event_id, - log_lvl - }); - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge', - obj_li: processed_obj_li, - properties_to_save, - log_lvl - }); - } - return badge_obj_li_get_result; - } else { - return []; - } - }); - return ae_promises.qry__event_badge_obj_li; -} - -// Updated 2026-01-02 +// Updated 2026-01-21 to Restore Full Aether Search Logic export async function search__event_badge({ api_cfg, event_id, @@ -421,15 +344,11 @@ export async function search__event_badge({ limit = 25, offset = 0, order_by_li = { - // print_count: 'ASC', - // priority: 'DESC', - // sort: 'DESC', given_name: 'ASC', family_name: 'ASC', updated_on: 'DESC', created_on: 'DESC' }, - params = {}, try_cache = true, log_lvl = 0 }: { @@ -447,76 +366,62 @@ export async function search__event_badge({ limit?: number; offset?: number; order_by_li?: key_val; - params?: key_val; try_cache?: boolean; log_lvl?: number; }): Promise { if (log_lvl) { - console.log(`*** search__event_badge() *** event_id=${event_id} printed_status=${printed_status} affiliations=${affiliations_qry_str} order_by_li=`, order_by_li); + console.log(`*** search__event_badge() *** event_id=${event_id} ft=${fulltext_search_qry_str}`); } - if (!fulltext_search_qry_str && !like_search_qry_str && !affiliations_qry_str && !type_code && !external_event_id && printed_status === 'all') { - console.log('No search criteria provided!!!'); - return false; + const search_query: any = { + q: '', + and: [{ field: 'event_id_random', op: 'eq', value: event_id }] + }; + + const params: key_val = {}; + + // Restore Fulltext Logic (Aether Business Logic) + if (fulltext_search_qry_str || affiliations_qry_str) { + params['ft_qry'] = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params['ft_qry']['default_qry_str'] = fulltext_search_qry_str; + } + if (affiliations_qry_str && affiliations_qry_str.length > 2) { + params['ft_qry']['affiliations'] = affiliations_qry_str; + } } - const search_query: any = {}; - const and_filters: any[] = []; - - // Set Global Search - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - search_query.q = fulltext_search_qry_str; - } - - // Add specific filters - if (like_search_qry_str && like_search_qry_str.length > 2) { - and_filters.push({ - field: 'default_qry_str', - op: 'like', - value: `%${like_search_qry_str.trim()}%` - }); - } - - if (affiliations_qry_str && affiliations_qry_str.length > 2) { - and_filters.push({ - field: 'affiliations', - op: 'like', - value: `%${affiliations_qry_str.trim()}%` - }); + // Restore Like Logic + if (like_search_qry_str) { + params['lk_qry'] = { 'default_qry_str': like_search_qry_str }; } if (external_event_id) { - and_filters.push({ field: 'external_event_id', op: 'eq', value: external_event_id }); + search_query.and.push({ field: 'external_event_id', op: 'eq', value: external_event_id }); } if (type_code) { - and_filters.push({ field: 'badge_type_code', op: 'eq', value: type_code }); + search_query.and.push({ field: 'badge_type_code', op: 'eq', value: type_code }); } if (printed_status === 'printed') { - and_filters.push({ field: 'print_count', op: 'gt', value: 0 }); + search_query.and.push({ field: 'print_count', op: 'gt', value: 0 }); } else if (printed_status === 'not_printed') { - and_filters.push({ field: 'print_count', op: 'eq', value: 0 }); + search_query.and.push({ field: 'print_count', op: 'eq', value: 0 }); } - if (and_filters.length > 0) { - search_query.and = and_filters; - } + if (enabled === 'enabled') search_query.and.push({ field: 'enable', op: 'eq', value: 1 }); + else if (enabled === 'not_enabled') search_query.and.push({ field: 'enable', op: 'eq', value: 0 }); - if (log_lvl) { - console.log('Final search_query object:', JSON.stringify(search_query, null, 2)); - } + if (hidden === 'hidden') search_query.and.push({ field: 'hide', op: 'eq', value: 1 }); + else if (hidden === 'not_hidden') search_query.and.push({ field: 'hide', op: 'eq', value: 0 }); ae_promises.search__event_badge_obj_li = await api .search_ae_obj_v3({ api_cfg, obj_type: 'event_badge', search_query, - for_obj_type: 'event', - for_obj_id: event_id, - enabled, - hidden, - view, + params, // Correctly pass the specialized business logic params order_by_li, limit, offset, @@ -542,9 +447,6 @@ export async function search__event_badge({ } else { return []; } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); }); return ae_promises.search__event_badge_obj_li; } @@ -553,14 +455,8 @@ export async function search__event_badge({ export const properties_to_save = [ 'id', 'event_badge_id', - // 'event_badge_id_random', - 'event_id', - // 'event_id_random', - 'event_badge_template_id', - // 'event_badge_template_id_random', - 'pronouns', 'informal_name', 'title_names', @@ -568,19 +464,14 @@ export const properties_to_save = [ 'middle_name', 'family_name', 'designations', - 'professional_title', 'professional_title_override', - 'full_name', 'full_name_override', - 'affiliations', 'affiliations_override', - 'email', 'email_override', - 'address_line_1', 'address_line_2', 'address_line_3', @@ -594,9 +485,7 @@ export const properties_to_save = [ 'full_address', 'location', 'location_override', - 'query_str', - 'badge_type', 'badge_type_code', 'badge_type_override', @@ -604,11 +493,8 @@ export const properties_to_save = [ 'external_event_id', 'external_id', 'external_person_id', - 'default_qry_string', - 'alert', - 'enable', 'hide', 'priority', @@ -617,15 +503,11 @@ export const properties_to_save = [ 'notes', 'created_on', 'updated_on', - 'print_count', 'print_first_datetime', 'print_last_datetime', - - // Generated fields for sorting locally only 'tmp_sort_1', 'tmp_sort_2', - 'person_external_id', 'person_external_sys_id', 'person_given_name', @@ -639,7 +521,6 @@ export const properties_to_save = [ /** * NON-EXPORTED LOCAL HELPER - * Processes a list of Aether objects by applying common and specific transformations. */ async function _process_generic_props>({ obj_li, @@ -652,39 +533,24 @@ async function _process_generic_props>({ log_lvl?: number; specific_processor?: (obj: T) => Promise | T; }): Promise { - if (log_lvl > 0) { - console.log( - `*** _process_generic_props: Processing ${obj_li.length} objects of type "${obj_type}" ***` - ); - } - - if (!obj_li || obj_li.length === 0) { - if (log_lvl > 0) console.log('No objects to process.'); - return []; - } + if (!obj_li || obj_li.length === 0) return []; const processed_obj_li: T[] = []; for (const original_obj of obj_li) { let processed_obj = { ...original_obj }; - // --- Common Transformations --- - - // 1. Standardize ID and other '_random' fields - // The API often returns fields like 'person_id_random', which need to be aliased to 'person_id'. for (const key in processed_obj) { if (key.endsWith('_random')) { - const newKey = key.slice(0, -7); // Remove '_random' suffix + const newKey = key.slice(0, -7); (processed_obj as any)[newKey] = processed_obj[key]; } } - // Ensure 'id' is set from '[obj_type]_id_random' const randomIdKey = `${obj_type}_id_random`; if (processed_obj[randomIdKey]) { (processed_obj as any).id = processed_obj[randomIdKey]; } - // 2. Create common computed properties for client-side sorting. const group = processed_obj.group ?? '0'; const priority = processed_obj.priority ? 1 : 0; const sort = processed_obj.sort ?? '0'; @@ -694,7 +560,6 @@ async function _process_generic_props>({ (processed_obj as any).tmp_sort_1 = `${group}_${priority}_${sort}_${updated}`; (processed_obj as any).tmp_sort_2 = `${group}_${priority}_${sort}_${name}_${updated}`; - // --- Specific Transformations --- if (specific_processor) { processed_obj = await Promise.resolve(specific_processor(processed_obj)); } @@ -720,20 +585,10 @@ export async function process_ae_obj__event_badge_props({ obj_type: 'event_badge', log_lvl, specific_processor: (obj) => { - // If the event_id isn't returned from the API, add it here. if (event_id) { if (!obj.event_id) obj.event_id = event_id; if (!obj.event_id_random) obj.event_id_random = event_id; } - - // Event badge-specific computed sort fields, overriding generic ones if needed - obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${ - obj.sort?.toString().padStart(3, '0') ?? '' - }_${obj.updated_on ?? obj.created_on}`; - obj.tmp_sort_2 = `${obj.print_count ?? '0'}_${obj.priority ? '1' : '0'}_${ - obj.sort?.toString().padStart(3, '0') ?? '' - }_${obj.given_name ?? ''}_${obj.family_name ?? ''}_${obj.updated_on ?? obj.created_on}`; - return obj; } }); diff --git a/src/lib/ae_events/ae_events__event_session.ts b/src/lib/ae_events/ae_events__event_session.ts index 79e421ef..8a51d22f 100644 --- a/src/lib/ae_events/ae_events__event_session.ts +++ b/src/lib/ae_events/ae_events__event_session.ts @@ -361,7 +361,7 @@ export async function update_ae_obj__event_session({ return result; } -// Updated 2026-01-21 to Restore Full Aether Search Logic +// Updated 2026-01-21 to Restore Full Aether Search logic export async function search__event_session({ api_cfg, event_id, @@ -405,16 +405,14 @@ export async function search__event_session({ console.log(`*** search__event_session() *** [V3] event_id=${event_id} ft=${fulltext_search_qry_str}`); } - // 1. Build the search query body const search_query: any = { - q: '', // Default query string + q: '', and: [{ field: 'event_id_random', op: 'eq', value: event_id }] }; - // 2. Build the params object for special flags (the 'params_json' equivalent) const params: key_val = {}; - // 3. Restore the Fulltext Logic + // Restore Fulltext logic if (fulltext_search_qry_str || ft_presenter_search_qry_str) { params['ft_qry'] = {}; if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { @@ -425,7 +423,7 @@ export async function search__event_session({ } } - // 4. Restore the 'Like' Logic + // Restore Like logic if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str || like_poc_name_qry_str) { params['lk_qry'] = {}; if (like_search_qry_str) params['lk_qry']['default_qry_str'] = like_search_qry_str; @@ -449,7 +447,7 @@ export async function search__event_session({ obj_type: 'event_session', search_query, order_by_li, - params, // Pass the special flags into the V3 params + params, // Important: pass through special Aether params limit, offset, log_lvl diff --git a/src/service-worker.js b/src/service-worker.js index 1da73f2e..f2a54696 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -74,4 +74,4 @@ self.addEventListener('fetch', (event) => { } event.respondWith(respond()); -}); +}); \ No newline at end of file