fix(idaa): audit and harden IDAA module components and types
- Updated ae_types.ts with missing IDAA-specific fields for Archives and Events (topic_name, archive_on, contact_li_json, etc.) using snake_case. - Refactored bulletin board post filter to safely handle null archive_on dates. - Fixed missing 'data' prop assignment in bulletin board list component to resolve type error. - Corrected core_func.download_export__obj_type method name in recovery meetings export. - Hardened safety checks for contact_li_json in recovery meetings view logic to prevent null property access. - Mapped Jitsi meeting event data to internal snake_case variables and fixed input type assignments. - Updated project documentation (TODO, GEMINI.md, .ae_brief) to reflect IDAA hardening progress.
This commit is contained in:
26
.ae_brief
26
.ae_brief
@@ -1,24 +1,22 @@
|
||||
# Aether Project Brief: aether_app_sveltekit
|
||||
**Last Updated:** 2026-01-22 20:25:17
|
||||
**Last Updated:** 2026-01-26 14:15:00
|
||||
**Current Agent:** mcp_agent
|
||||
|
||||
## 🛠️ What I Just Did
|
||||
- Systematically cleared 133 svelte-check errors (372 down to 239).
|
||||
- Hardened type safety in Analytics, Hosted File Upload, QR Scanner, and Data Store components.
|
||||
- Standardized window.location.reload() calls by removing invalid arguments.
|
||||
- Corrected V3 API update calls in element_ae_crud.svelte to include required keys.
|
||||
- Resolved multiple 'used before declaration' and element assignment type errors.
|
||||
- Deleted legacy 'not_used' files to clean up project structure.
|
||||
- **Hydration Performance:** Eliminated the "white page" delay on refresh by refactoring root and module layouts to be non-blocking.
|
||||
- **SWR Integration:** Implemented Stale-While-Revalidate pattern in Event, Session, and Journal modules.
|
||||
- **Service Worker:** Restored SW registration and added robust asset caching for near-instant UI loads.
|
||||
- **Native Bridge:** Completed Phase 5 automation handlers (PowerPoint/Keynote) and built a visual Telemetry Dashboard.
|
||||
- **Log Cleanup:** Silenced aborted fetch request errors to prevent console spam during navigation.
|
||||
|
||||
## 🚧 Current Blockers
|
||||
None. Core system remains stable.
|
||||
- **IDAA Issues:** Initial reports suggest regressions or bugs in IDAA-specific pages. Investigation pending.
|
||||
|
||||
## ➡️ Exact Next Steps
|
||||
- Continue systematically resolving remaining 239 svelte-check errors.
|
||||
- Investigate ClassValue errors in external library components if they persist.
|
||||
- Restore missing Exhibit module search functions and business logic.
|
||||
- Refactor ae_comp__journal_entry_obj_qry.svelte for dynamic filtering.
|
||||
- Address long-term Service Worker evaluation errors.
|
||||
- Audit `src/routes/idaa/` for reported regressions.
|
||||
- Verify Jitsi meeting integration and report stability.
|
||||
- Restore missing Exhibit module search functions.
|
||||
- Continue resolving the remaining ~250 svelte-check errors.
|
||||
|
||||
---
|
||||
*Generated by ae_brief*
|
||||
*Generated by ae_brief*
|
||||
31
GEMINI.md
31
GEMINI.md
@@ -61,30 +61,29 @@ This project is the frontend UI/UX for the Aether (AE) system, built with Svelte
|
||||
|
||||
## 📝 Development History (Consolidated)
|
||||
|
||||
### Launcher Phase 5 & Performance Sprint (2026-01-26)
|
||||
- **Hydration Optimization:** Implemented Stale-While-Revalidate (SWR) pattern and non-blocking layouts across Sites, Events, and Journals to eliminate "white page" delays.
|
||||
- **Service Worker:** Re-enabled automatic registration and implemented robust asset caching using SvelteKit metadata.
|
||||
- **Native Bridge:** Implemented Phase 5 AppleScript handlers for PowerPoint and Keynote on macOS.
|
||||
- **Telemetry:** Built a modern dashboard in Launcher Config with visual CPU/RAM gauges and animated sync status.
|
||||
- **API Hardening:** Silenced noisy `AbortError` and `NetworkError` logs in background fetches.
|
||||
|
||||
### Launcher Phase 4 & Hardening (2026-01-26)
|
||||
- **Heartbeat Engine:** Implemented V3-compliant heartbeat and room refresh cycles.
|
||||
- **UI Integration:** Migrated heartbeat/sync status from "Secret Monitor" to formal **Launcher Config Drawer**.
|
||||
- **Timezone Fix:** Resolved "future time" issue by standardizing on UTC ISO strings and removing manual 'Z' suffixing in `ae_events__event_device.ts`.
|
||||
- **MySQL Compatibility:** Fixed Error 1292 by formatting heartbeats to `YYYY-MM-DD HH:mm:ss` using `ae_util.iso_datetime_formatter`.
|
||||
- **API V3 Hardening:** Implemented auto-serialization for `_json` fields in V3 CRUD helpers to prevent 'str type expected' validation failures.
|
||||
- **Singleton Consolidation:** Moved `LauncherBackgroundSync` to the root launcher layout to ensure a single execution loop.
|
||||
- **IDAA Jitsi Reports:** Fixed a `TypeError` in report processing and restored filtering logic. Added explicit `x-account-id` headers to resolve 403 Forbidden errors.
|
||||
|
||||
### Hardening & Error Reduction Sprint (2026-01-22)
|
||||
- **Error Reduction:** Systematically cleared ~133 `svelte-check` errors (from 372 to 239) across the entire application.
|
||||
- **Type Hardening:** Resolved ambient module errors in `analytics.svelte`, fixed `onsubmit` mismatches in file uploads, and hardened CodeMirror element casting.
|
||||
|
||||
...
|
||||
---
|
||||
|
||||
## 🧠 Session Context (2026-01-26)
|
||||
- **Status:** Phase 4 Implementation Complete & Verified.
|
||||
- **Status:** Performance Sprint Complete. Moving to IDAA Module Audit.
|
||||
- **Recent Actions:**
|
||||
- Integrated heartbeat/sync observability into formal Config UI.
|
||||
- Fixed `ReferenceError` and `illegal variable name` ($events_sess) errors.
|
||||
- Resolved persistent 400/403 errors in Jitsi and Heartbeat logic.
|
||||
- Eliminated page load delays via SWR and non-blocking background refreshes.
|
||||
- Hardened Service Worker and suppressed aborted fetch logs.
|
||||
- Finalized Native Launcher Phase 5 automation and Telemetry UI.
|
||||
- **Pending Tasks:**
|
||||
- [ ] Implement Phase 5 AppleScript handlers for PowerPoint/Keynote.
|
||||
- [ ] Build Telemetry Dashboard in Launcher Config (CPU/RAM visuals).
|
||||
- [ ] Audit IDAA pages for reported issues.
|
||||
- [ ] Restore Exhibit Search functionality.
|
||||
- [ ] Build standalone Payload Validation tool.
|
||||
|
||||
## 🔗 Resources
|
||||
- **Reference Stubs:** `agents_sync/technical/references/` (Svelte 5, Dexie, FastAPI).
|
||||
|
||||
58
TODO.md
58
TODO.md
@@ -6,54 +6,42 @@ This is a list of tasks to be completed before the next event/show/conference.
|
||||
|
||||
## High Priority (Active Task)
|
||||
|
||||
1. **Aether Native V3 (Launcher):**
|
||||
- [ ] Scaffold new Electron 33+ shell.
|
||||
- [ ] Implement V3 "Zero-Config" bridge between shell and SvelteKit frontend.
|
||||
- [ ] Reference `documentation/NATIVE_APP_V3_REWRITE_PLAN.md` for architectural constraints.
|
||||
1. **IDAA Module Hardening:**
|
||||
- [ ] Audit Jitsi meeting integration for connection stability.
|
||||
- [ ] Investigate reported "issues with IDAA pages" (Current Focus).
|
||||
- [ ] Verify V3 search logic for Recovery Meetings and Archives.
|
||||
|
||||
---
|
||||
|
||||
## Current Priorities (Jan 23, 2026)
|
||||
## Current Priorities (Jan 26, 2026)
|
||||
|
||||
1. **Journal Module (Cleanup):**
|
||||
- [x] **Entry Search Refactor:** Update `ae_comp__journal_entry_obj_qry.svelte` to use dynamic `$journals_loc` values. (Completed 2026-01-23)
|
||||
- [x] **Verify Filters:** Search results correctly respect Enabled/Hidden toggle states. (Completed 2026-01-23)
|
||||
- [x] **Config Sprint:** Added Query Limit configuration to settings modal. (Completed 2026-01-23)
|
||||
2. **Hardening V3 Search (Continued):**
|
||||
- [x] **Event Session Search:** Finalized and verified. (Completed 2026-01-21)
|
||||
- [x] **IDAA Recovery Meetings Search:** Restored functionality. (Completed 2026-01-21)
|
||||
1. **Hydration Performance (Completed Sprint):**
|
||||
- [x] **Non-Blocking Layouts:** Refactored root, events, and journals layouts to fire refreshes in background.
|
||||
- [x] **SWR Implementation:** Individual modules (Event, Session, Journal) now return cached data immediately.
|
||||
- [x] **Service Worker:** Re-enabled and hardened with robust asset caching.
|
||||
2. **Native Launcher Refinement (Phase 5):**
|
||||
- [x] **Office Automation:** Implemented AppleScript handlers for PowerPoint/Keynote.
|
||||
- [x] **Telemetry Dashboard:** Built visual CPU/RAM gauges in Launcher Config.
|
||||
- [x] **Observability:** Heartbeat and Sync status moved to formal Config UI.
|
||||
3. **Hardening V3 Search:**
|
||||
- [ ] **Exhibit Search:** Restore missing search function and logic.
|
||||
- [ ] **Global Rule:** Preserve `ft_qry`, `lk_qry`, and `and_qry` blocks as "sacred" business logic.
|
||||
3. **Service Worker Reliability (Mitigated):**
|
||||
- [x] **Disable Auto-Registration:** Temporarily disabled to stop `TypeError` loop.
|
||||
- [ ] **Root Cause Investigation:** Re-enable SW registration and debug script evaluation failure.
|
||||
4. **Jitsi Module Updates:** Prepare for upcoming demo. Audit `video_conferences/+page.svelte`.
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ DX & Tooling (MCP)
|
||||
- [x] **V3 API Parameter Hardening:** Updated `search_ae_obj_v3` for URL serialization. (Completed 2026-01-21)
|
||||
- [ ] **Enhance `ae_obj_info`**: Include field types, constraints, and default values.
|
||||
- [ ] **Payload Validation**: Create dry-run tool for Pydantic model checking.
|
||||
- [x] **Error Transparency:** Return specific errors in `meta.details`. (Completed 2026-01-19)
|
||||
- [x] **Fetch Noise Reduction:** Silenced AbortErrors in API helpers at log_lvl 0. (Completed 2026-01-26)
|
||||
- [ ] **Payload Validation:** Create dry-run tool for Pydantic model checking.
|
||||
|
||||
---
|
||||
|
||||
## Frontier Journals Module (Vision 2026-01-08)
|
||||
- [x] **Phase 1: Codebase Audit & Schema** (Completed 2026-01-23)
|
||||
- [x] Refactor `ae_comp__journal_entry_obj_id_view.svelte`.
|
||||
- [x] Fix type safety in `[journal_id]/+layout.svelte`.
|
||||
- [x] Stabilize Query logic and UI search behavior in `+page.svelte`.
|
||||
|
||||
## Recent Accomplishments (Jan 23, 2026)
|
||||
- [x] **Journal Stability:** Resolved display issues where entries failed to show on initial load.
|
||||
- [x] **Filter Hardening:** Updated LiveQuery to handle NULL/undefined for Enabled/Hidden flags.
|
||||
- [x] **Config Expansion:** Added dynamic Query Limits (10-1000) to Journal module settings.
|
||||
## Recent Accomplishments (Jan 26, 2026)
|
||||
- [x] **Performance:** Eliminated "white page" delay on refresh across all major modules.
|
||||
- [x] **Native Bridge:** Completed specialized macOS handlers for remote presentation control.
|
||||
- [x] **Stability:** Resolved duplicate export errors and script evaluation failures in Service Worker.
|
||||
|
||||
## Native App Development (2026-01-26)
|
||||
- [x] Phase 2: Organized caching with 2-char subdirectories.
|
||||
- [x] Phase 3: Standardize snake_case bridge and OS command set.
|
||||
- [x] Phase 4: Implement device heartbeat and telemetry loop (Verified UTC timestamps).
|
||||
- [ ] [IN PROGRESS] Move heartbeat/sync visibility from "Secret Monitor" to Launcher Config Drawer.
|
||||
- [x] Phase 5: Implement specialized AppleScript handlers for Office/Keynote. (Completed 2026-01-26)
|
||||
- [ ] [REFINEMENT] Build Telemetry Dashboard in Launcher Config.
|
||||
- [x] Phase 4: Implement device heartbeat and telemetry loop.
|
||||
- [x] Phase 5: Implement specialized AppleScript handlers for Office/Keynote.
|
||||
- [x] Refinement: Built Telemetry Dashboard in Launcher Config.
|
||||
@@ -62,7 +62,7 @@ export interface Event {
|
||||
|
||||
// IDAA Recovery Meetings:
|
||||
// Currently only really used for IDAA
|
||||
contact_li_json?: null | string[]; // full_name, email, phone_mobile, phone_home, phone_office, other_text
|
||||
contact_li_json?: null | any[]; // full_name, email, phone_mobile, phone_home, phone_office, other_text
|
||||
// contact_li_json_ext?: null|string;
|
||||
external_person_id?: null | string;
|
||||
|
||||
|
||||
@@ -400,8 +400,9 @@ export interface ae_Event extends ae_BaseObj {
|
||||
|
||||
conference: boolean;
|
||||
type?: string;
|
||||
name: string;
|
||||
summary?: string;
|
||||
format?: string;
|
||||
description?: string;
|
||||
|
||||
timezone?: string;
|
||||
start_datetime?: string | Date;
|
||||
@@ -418,6 +419,16 @@ export interface ae_Event extends ae_BaseObj {
|
||||
cfg_json?: any;
|
||||
data_json?: any;
|
||||
|
||||
// IDAA Recovery Meetings / Additional fields
|
||||
contact_li_json?: any[];
|
||||
external_person_id?: string;
|
||||
physical?: boolean;
|
||||
virtual?: boolean;
|
||||
recurring?: boolean;
|
||||
recurring_text?: string;
|
||||
attend_url?: string;
|
||||
attend_url_text?: string;
|
||||
|
||||
// Joined view fields
|
||||
event_location_obj_li?: ae_EventLocation[];
|
||||
event_session_obj_li?: ae_EventSession[];
|
||||
@@ -732,11 +743,16 @@ export interface ae_Archive extends ae_BaseObj {
|
||||
account_id_random: string;
|
||||
|
||||
archive_type?: string;
|
||||
topic_id?: string;
|
||||
topic_name?: string;
|
||||
|
||||
content_html?: string;
|
||||
|
||||
original_datetime?: string | Date;
|
||||
original_location?: string;
|
||||
|
||||
archive_on?: string | Date;
|
||||
|
||||
archive_content_count?: number;
|
||||
}
|
||||
|
||||
@@ -752,8 +768,11 @@ export interface ae_ArchiveContent extends ae_BaseObj {
|
||||
content_html?: string;
|
||||
url?: string;
|
||||
|
||||
duration?: string;
|
||||
|
||||
hosted_file_id_random?: string;
|
||||
filename?: string;
|
||||
subdirectory_path?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,12 +54,16 @@
|
||||
}
|
||||
|
||||
// *** Functions and Logic
|
||||
// Updated 2026-01-07
|
||||
// Updated 2026-01-26 (Safety Refactor)
|
||||
let lq__post_obj_li = $derived(liveQuery(async () => {
|
||||
const now = new Date();
|
||||
const results = await db_posts.post
|
||||
.where('account_id').equals($slct.account_id ?? '')
|
||||
.filter((x) => x.archive_on === null || new Date(x.archive_on) > now)
|
||||
.filter((x) => {
|
||||
if (!x.archive_on) return true;
|
||||
const archiveDate = x.archive_on instanceof Date ? x.archive_on : new Date(x.archive_on);
|
||||
return archiveDate > now;
|
||||
})
|
||||
.toArray();
|
||||
return results;
|
||||
}));
|
||||
@@ -223,7 +227,7 @@
|
||||
<!-- <h1>Bulletin Board {$lq__post_obj_li?.length}</h1> -->
|
||||
|
||||
{#if $lq__post_obj_li && $lq__post_obj_li?.length}
|
||||
<Comp__post_obj_li {lq__post_obj_li} />
|
||||
<Comp__post_obj_li {data} {lq__post_obj_li} />
|
||||
{:else}
|
||||
<p>No posts available to show.</p>
|
||||
{/if}
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
</button>
|
||||
{:else}
|
||||
<!-- This checks if the currently logged in Novi user has a matching UUID or email address. -->
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__event_obj?.external_person_id === $idaa_loc.novi_uuid || ($lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json[0]?.email === $idaa_loc.novi_email)}
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__event_obj?.external_person_id === $idaa_loc.novi_uuid || ($lq__event_obj?.contact_li_json && $lq__event_obj.contact_li_json.length > 0 && $lq__event_obj.contact_li_json[0]?.email === $idaa_loc.novi_email)}
|
||||
<button
|
||||
type="button"
|
||||
class="
|
||||
|
||||
@@ -711,8 +711,9 @@
|
||||
if (!confirm('Download exported data Excel file?')) {
|
||||
return false;
|
||||
}
|
||||
// Use snake_case method name 'download_export__obj_type'
|
||||
ae_promises.download__events_export =
|
||||
core_func.handle_download_export__obj_type({
|
||||
core_func.download_export__obj_type({
|
||||
api_cfg: $ae_api,
|
||||
get_obj_type: 'event',
|
||||
for_obj_type: 'account',
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
let domain: null | string = $state(null);
|
||||
|
||||
// Jitsi API & Sound Settings
|
||||
let jitsi_api: any = null;
|
||||
let jitsi_api: any = $state(null);
|
||||
const jitsi_container_id = 'jitsi_meet_external_api_container';
|
||||
let disable_incoming_msg_sound: boolean = $state(true);
|
||||
let disable_participant_joined_sound: boolean = $state(false);
|
||||
@@ -114,10 +114,13 @@
|
||||
|
||||
function add_jitsi_event_listeners(api: any) {
|
||||
// --- Meeting/Participant State Changes ---
|
||||
api.on('videoConferenceJoined', async (data: { id: string; displayName: string; roomName: string }) => {
|
||||
console.log('Jitsi Event: videoConferenceJoined', data);
|
||||
api.on('videoConferenceJoined', async (jitsi_data: { id: string; displayName: string; roomName: string }) => {
|
||||
// Map Jitsi's camelCase to our internal snake_case
|
||||
const { id: participant_id, displayName: participant_name, roomName: jitsi_room_name } = jitsi_data;
|
||||
|
||||
console.log('Jitsi Event: videoConferenceJoined', jitsi_data);
|
||||
meeting_start_time = new Date();
|
||||
if (jitsi_meeting_id === null) jitsi_meeting_id = `${data.roomName}-${Date.now()}`;
|
||||
if (jitsi_meeting_id === null) jitsi_meeting_id = `${jitsi_room_name}-${Date.now()}`;
|
||||
|
||||
// Start duration timer
|
||||
if (duration_timer_id) clearInterval(duration_timer_id);
|
||||
@@ -133,7 +136,7 @@
|
||||
}, 1000);
|
||||
|
||||
// Populate initial participant list
|
||||
meeting_participants.set(data.id, { id: data.id, displayName: data.displayName, role: 'participant' });
|
||||
meeting_participants.set(participant_id, { id: participant_id, displayName: participant_name, role: 'participant' });
|
||||
api.getParticipantsInfo().forEach((p: { participantId: string; displayName: string }) => {
|
||||
if (!meeting_participants.has(p.participantId)) {
|
||||
meeting_participants.set(p.participantId, { id: p.participantId, displayName: p.displayName, role: 'participant' });
|
||||
@@ -371,8 +374,8 @@
|
||||
}
|
||||
|
||||
// Set initial value for the profile editor inputs
|
||||
name_input = display_name;
|
||||
email_input = email;
|
||||
name_input = display_name ?? '';
|
||||
email_input = email ?? '';
|
||||
|
||||
// --- All data fetched, now initialize Jitsi ---
|
||||
await init_jitsi();
|
||||
|
||||
Reference in New Issue
Block a user