Complete initial V3 CRUD migration for Journals and Badges, fix Journals New Entry button, and update TODO integration roadmap.
This commit is contained in:
12
GEMINI.md
12
GEMINI.md
@@ -209,16 +209,16 @@ The activity logging functionality is now working as expected. While the origina
|
||||
|
||||
**Key Accomplishments:**
|
||||
- **Aether API V3 Frontend Implementation:** Created robust TypeScript wrappers for V3: `get_ae_obj_v3`, `get_ae_obj_li_v3`, `get_nested_obj_li_v3`, and `search_ae_obj_v3`. These support the new nested URL structure, hybrid filtering (query params + POST body), and global keyword search (`q` property).
|
||||
- **Journals Module Migration:** Fully migrated `ae_journals` to V3.
|
||||
- **Journals Module Migration:** Partially migrated `ae_journals` to V3 (List and Search).
|
||||
- **Bug Fix (Missing Parent ID):** Discovered that V3 nested routes often omit the parent ID in response objects. Implemented automatic parent ID injection in the data processor (`process_ae_obj__journal_entry_props`) to maintain local Dexie relationships.
|
||||
- **Bug Fix (Illegal Effects):** Fixed a runtime crash caused by using `$effect` inside `onclick` event handlers. Moved logic to direct function calls.
|
||||
- **Events - Badges Module Migration:** Migrated `ae_events__event_badge` to V3 search and list endpoints.
|
||||
- **Bug Fix (New Entry Button):** Fixed a runtime crash on the "New Entry" button in `+layout.svelte` by removing illegal `$effect` calls from the `onclick` handler and fixing incorrect `$derived` variable access.
|
||||
- **Events - Badges Module Migration:** Partially migrated `ae_events__event_badge` to V3 (List and Search).
|
||||
- **Search Optimization:** Refined the `search_query` structure to utilize the backend's new `q` property for global text search and standard `and` filters for specific fields like `badge_type_code` and `print_count`.
|
||||
- **Operator Refinement:** Verified that the backend V3 currently prefers the `like` operator with wildcards over `ilike` or `contains` for certain textual fields.
|
||||
- **Backend Recommendations:** Documented actionable feedback for the FastAPI backend in `documentation/Aether_API_CRUD_V3_beta_recommendations.md`, focusing on "view" selection and hybrid search efficiency.
|
||||
- **Filter Fixes:** Resolved issues with "print status" and "affiliations" filters by reverting to the standard `like` operator (as `ilike` and `contains` were unsupported by the backend) and ensuring `print_count` is included in the persistent schema.
|
||||
- **Documentation & Planning:** Updated `TODO.md` with a comprehensive V3 integration roadmap and documented actionable feedback for the FastAPI backend.
|
||||
|
||||
**Key Learnings:**
|
||||
- **Svelte 5 & Dexie LiveQuery:** Remember that while Svelte 5 runes (`$state`, `$derived`) don't use the `$` prefix, **Dexie `liveQuery` results are observables** and still require the `$` prefix (e.g., `$lq__obj`) to access their reactive value in the template and script.
|
||||
- **API V3 Implicit Context:** When using nested API routes (e.g., `/v3/crud/parent/{id}/child/`), the child objects returned may not contain the `parent_id`. The frontend must proactively inject this ID during processing if it's required for local database indexing or filtering.
|
||||
- **Search Logic Construction:** When building complex V3 `search_query` objects, avoid including empty `and` or `or` arrays, as some backend parsers may strictly validate their presence or content. Only attach these properties if they contain at least one filter.
|
||||
- **Backend Error Propagation:** Always check FastAPI logs when a V3 search returns 0 unexpected results; it often indicates an "Unsupported search operator" or a Pydantic validation error in the hybrid parameter parsing.
|
||||
- **Backend Operator Support:** Always verify supported operators (`like`, `eq`, `gt`, etc.) in the backend FastAPI implementation. Using unsupported operators like `ilike` or `contains` will cause immediate backend `ValueError` crashes.
|
||||
|
||||
Reference in New Issue
Block a user