diff --git a/documentation/TODO__Agents.md b/documentation/TODO__Agents.md index 1ce33635..310a022a 100644 --- a/documentation/TODO__Agents.md +++ b/documentation/TODO__Agents.md @@ -41,6 +41,8 @@ lead record look like in the DB? - **Input Field Audit:** Several input fields are missing `name`/`id` attributes or `data-testid`. Known examples: badge override fields in `ae_comp__badge_obj_view.svelte`; template name input in `ae_comp__badge_template_form.svelte`. Matters for: accessibility, autofill, label associations, and test targeting. (For tests, use `getByLabel()` rather than `input[value*=...]` which only checks the HTML attribute, not the Svelte-bound DOM property.) ## ✅ Completed Recently +- [x] **[Svelte]** **`state_referenced_locally` warning fixes (2026-03-09):** Resolved 10 Svelte 5 warnings where `$state`/`$props()` variables were read in top-level synchronous script code instead of inside a reactive closure. Fixed by moving `if (browser) { ... }` blocks and timezone-loading blocks into `onMount`. Files: `archives/[archive_id]/+page.svelte`, `archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte`, `archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte`, `bb/[post_id]/+page.svelte`. Note: 42 similar warnings remain in `recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte` and `..._v2.svelte` — same pattern, fix next session. +- [x] **[TypeScript]** **Sign In/Out TS errors fixed (2026-03-09):** `user_id` and `person_id` in `e_app_sign_in_out.svelte` were implicitly typed `null` from `$state(null)`, causing assignment errors. Explicitly typed as `string | null`. - [x] **[UI]** **Firefly Theme:** Created `AE_Firefly` dark/light theme. Primary=teal (~184°), Secondary=amber (~90°), Tertiary=indigo (~277°), Surface=moonlit slate. Files: `src/ae-firefly.css`, `src/app.css`, `src/lib/elements/e_app_theme.svelte`, `src/lib/ae_core/ae_stores.ts`. Set as app default in stores. (2026-03-06, branch `ae_app_3x_llm`) - [x] **[UI]** **Pres Mgmt Visual Redesign:** Full redesign of Events Presentation Management pages using Firefly theme tokens. Hero card layout, info chips (time=teal, room=indigo), skeleton loading states, dark-mode-safe colors throughout. 5 files: `session_view.svelte`, `ae_comp__event_session_obj_li.svelte`, `ae_comp__event_presentation_obj_li.svelte`, `pres_mgmt/+page.svelte`, `[session_id]/+page.svelte`. (2026-03-06, branch `ae_app_3x_llm`) - [x] **[Docs]** **UI Design System Docs:** Created two cheatsheet/reference docs: `documentation/GUIDE__AE_UI_Style_Guidelines.md` (design philosophy, color token rules, forbidden classes, Skeleton v3→v4 migration table, transitions, dark mode rules, a11y checklist) and `documentation/AE__UI_Component_Patterns.md` (hero cards, content cards, table rows, list item cards, info chips, empty state panels, warning/error banners, file upload zones, section wrappers, modals, muted text, QR code pattern). (2026-03-06) diff --git a/src/lib/app_components/e_app_sign_in_out.svelte b/src/lib/app_components/e_app_sign_in_out.svelte index 8d48350c..77f16e5a 100644 --- a/src/lib/app_components/e_app_sign_in_out.svelte +++ b/src/lib/app_components/e_app_sign_in_out.svelte @@ -43,7 +43,7 @@ let url_user_email = $state(untrack(() => data?.url?.searchParams?.get('user_email'))); $effect(() => { - // NOTE: Sync URL params to state. + // NOTE: Sync URL params to state. // We use untrack to prevent infinite loops if navigation triggers within this effect. // WARNING: Ensure this doesn't clobber user-entered data during background URL updates. untrack(() => { @@ -57,9 +57,9 @@ let ae_promises: key_val = {}; let trigger: null | boolean = $state(null); // Use $state to ensure reactivity - let user_id = $state(null); // Use $state to ensure reactivity + let user_id: string | null = $state(null); // Use $state to ensure reactivity let user_obj: key_val = $state({}); // Use $state to ensure reactivity - let person_id = $state(null); // Use $state to ensure reactivity + let person_id: string | null = $state(null); // Use $state to ensure reactivity let person_obj: key_val = $state({}); // Use $state to ensure reactivity $effect(() => { diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte index d77d10c6..e5fee8e4 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte @@ -9,8 +9,7 @@ let log_lvl: number = 2; // *** Import Svelte specific - import { onDestroy } from 'svelte'; - import { browser } from '$app/environment'; + import { onMount, onDestroy } from 'svelte'; // *** Import other supporting libraries import { Modal } from 'flowbite-svelte'; @@ -282,7 +281,7 @@ } }); - if (browser) { + onMount(() => { console.log('Browser environment detected.'); // NOTE: Use data[data.account_id].slct.archive_id (from load / URL params), @@ -297,7 +296,7 @@ ); window.parent.postMessage({ scroll_to: 0 }, '*'); // This should be in pixels } - } + }); onDestroy(() => { log_lvl = 1; diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte index 60f0b8dc..162498e5 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte @@ -1,5 +1,6 @@