Commit Graph

1602 Commits

Author SHA1 Message Date
Scott Idem
6cc595ee9c Saving more notes. 2026-03-06 21:24:16 -05:00
Scott Idem
1dd8e35720 pres_mgmt: redesign Session View, clean Presentation list, fix transitions
- session_view.svelte: replace flat <ul> with hero card layout
  - Name as <h1>, date/time chip (primary teal), room chip (tertiary indigo)
  - QR only rendered when URL is string (not true loading placeholder)
  - Skeleton pulse placeholders while LiveQuery resolves
  - Description in surface card with uppercase label
  - Accessible: aria labels, focus rings, aria-live on no-results section
- ae_comp__event_session_obj_li.svelte:
  - variant-soft-warning (Skeleton v3) -> preset-tonal-warning (v4)
  - Add transition-colors duration-200 to <tr> rows and session <a> links
- ae_comp__event_presentation_obj_li.svelte:
  - Remove debug breakpoint border colors (red/yellow/gray)
  - overflow-x-scroll -> overflow-x-auto
  - Remove heavy preset-filled-surface-400-600 from <ul> container
  - <li> cards: surface tokens, rounded-xl, shadow-sm, transition
  - <h4> title bar: bg-surface-100-900 with flex wrap layout
  - Code badge: hardcoded yellow -> preset-tonal-warning
  - Description <pre>: hardcoded bg-gray-100 -> bg-surface-100-900
- pres_mgmt/+page.svelte: 'no results' section
  - bg-yellow-100 + text-yellow-500 -> preset-tonal-warning
  - Search icon, aria-live, cleaner list in surface card
- [session_id]/+page.svelte: rounded-container-token (v3) -> rounded-xl
2026-03-06 21:15:27 -05:00
Scott Idem
b39ce19fdc feat(theme): add AE Firefly theme — 'Shiny serenity, like a firefly.'
New custom Skeleton v4 theme for One Sky IT, LLC.
Design vision: Scott Idem, 2026-03-06.

Color system:
  Primary   — Luminescent teal (bioluminescent shimmer, hue ~184°)
  Secondary — Warm amber-gold (firefly body glow, hue ~90°)
  Tertiary  — Night-sky indigo (depth + serenity, hue ~277°)
  Surface   — Moonlit slate (barely-cool neutral; crisp in light,
              deep midnight in dark)

Section 508 / WCAG 2.1 AA compliance embedded in contrast assignments.
Set as new app default (replacing nouveau).

Files:
  src/ae-firefly.css                        — theme definition
  src/app.css                               — @import registered
  src/lib/app_components/e_app_theme.svelte — 'Firefly ✦' in selector
  src/lib/stores/ae_stores.ts               — default theme_name updated
2026-03-06 21:05:08 -05:00
Scott Idem
5f57d81ead fix(launcher): stabilize session header height to prevent bouncing
Root cause: flex-row flex-wrap on the session header caused the datetime
and name to compete for the same row. Long session names (up to 300 chars)
wrapped onto 2-3 lines while short names stayed 1 line, making the header
jump in height every time the operator switched sessions.

Fix:
- header: flex-row flex-wrap -> flex-col; datetime and name are now
  always on separate rows, header height is predictable in both cases
- h2 name: shrink -> grow line-clamp-2 min-w-0; height is always exactly
  2 lines, never less, never more; full text accessible via title attribute
- code badge: added shrink-0 so it is never squeezed by a long name
- removed justify-between/justify-end conditional classes (no longer relevant)
- Section 508: title attribute on h2 provides full text for screen readers
2026-03-06 20:37:23 -05:00
Scott Idem
c0729ab4f3 a11y(launcher): dark mode, touch targets, overflow, transition speed
Shell (+layout.svelte):
- fix: header bg-slate-200 -> dark:bg-slate-800 (projector/night use)
- fix: main content bg-gray-100 -> dark:bg-gray-900
- fix: config drawer bg-orange-100 -> dark:bg-slate-800
- fix: debug drawer bg-red-100 -> dark:bg-slate-900
- fix: footer border-gray-200 -> border-gray-300 (invisible border fixed)
- fix: remove header hover:text-base (caused layout shift on hover)
- fix: remove footer hover:sm:text-sm etc. (layout shift + broken TW4 syntax)
- fix: header/footer/status spans duration-1000 -> duration-300 (too slow)
- fix: footer opacity-50 -> opacity-70 (was too dim for projector/status reading)
- fix: nav section add overflow-y-auto (sessions overflowed on short screens)
- fix: nav section remove hover:bg-surface-100-900 (confusing whole-panel hover)
- a11y: header menu toggle button class=''->'px-2 py-1 rounded...' (touch target)
- a11y: footer edit_mode button class=''->'px-1.5 py-1 rounded...' (touch target)
- a11y: footer status spans px-1 -> px-2 py-0.5 (slightly larger tap area)
- a11y: footer datetime add dark:hover:bg-slate-700
2026-03-06 20:32:57 -05:00
Scott Idem
4cecc7a860 style(launcher): accessibility, session list UX, and preset-* token fixes
Style token fixes:
- launcher_cfg.svelte: tab buttons preset-filled-primary-500 -> preset-filled-primary;
  opacity-50 inactive -> preset-tonal-surface
- launcher_cfg_app_modes.svelte: same fix for app mode buttons (opacity-40)
- launcher_cfg_controller.svelte: variant-filled-success/error -> preset-filled-*
- launcher_cfg_template.svelte: variant-filled-success -> preset-filled-success
- launcher_session_view.svelte: add dark:border-gray-600/700 to bare border-gray-*

Session list (menu_session_list.svelte) -- full accessibility + UX pass:
- fix: background sync fetches hidden:all so All Sessions toggle works
- fix: hide_event_launcher respected in class:hidden and class:opacity-40
- fix: overlay uses explicit opaque backgrounds (slate-100/slate-800) to prevent
  preset-tonal-secondary transparency bleed-through in light and dark mode
- feat: compact fixed 2rem row height; position:absolute overlay on hover/focus
  reveals full session name (300-char) without any layout shift (no sibling movement)
- feat: active session always fully visible in flow (height:auto, no clipping)
- a11y: hover_timer_wait 750->1200ms (motor accessibility)
- a11y: removed hover:scale which caused cursor drift and timer jitter
- a11y: px-1.5 py-1 touch targets, focus-visible ring for keyboard/switch users
- a11y: fa-eye-slash icons distinguish hide vs hide_event_launcher states
- docs: comprehensive OSIT/Aether-specific comments throughout
2026-03-06 20:25:31 -05:00
Scott Idem
cc6f73ca04 style(journals): standardize Skeleton v4 preset-* classes across all journal components
- Replace all Skeleton v2 variant-* classes with v4 preset-* equivalents
  - variant-filled-* → preset-filled-*
  - variant-soft-* / variant-ghost-* → preset-tonal-*
  - variant-outline-* → preset-outlined-*
  - variant-form-material removed from inputs/selects/textareas
  - input-bordered removed

- Fix dark mode: journal entry content hover (dark:hover:bg-blue-950)
- Fix dark mode: journal obj view section/description bg and text colors
- Fix modal headers: add dismissable=false + explicit X close button (all 3 journals modals)
- Fix DaisyUI wrappers removed from modal_journal_entry_append
- app.css: add global select padding-inline to fix text-against-border issue
2026-03-06 19:15:51 -05:00
Scott Idem
3ca9503b88 fix: resolve svelte-check warnings (non-IDAA batch)
- Remove dead .field_editing_wrapper CSS rules from element_ae_crud_v2.svelte
  (template migrated to field_editing_wrapper_v2 with Tailwind)
- Fix TS error: use optional chaining on person_obj key in ae_comp__person_obj_tbl.svelte
- Fix state_referenced_locally: wrap data.user init with untrack() in users/[user_id]/+page.svelte
- Replace misused <label> with <span> for visual section headings (a11y) in:
  launcher_cfg_native_os.svelte, launcher_cfg_health.svelte,
  launcher_cfg_local_actions.svelte, launcher_cfg_template.svelte
2026-03-06 18:15:31 -05:00
Scott Idem
48d5fe8995 fix: add missing each-block keys (svelte/require-each-key)
Fixed all 27 remaining instances across 19 files. Keys used:
- Object ID fields where available (e.g. account_id_random, event_file_id)
- index for logger lists with no reliable unique key
- Property name for Object.entries() loops
2026-03-06 17:54:50 -05:00
Scott Idem
dd5cf9b63b chore: minor updates across events, journals, elements, and shared components
Miscellaneous small changes to events (badges, launcher, leads, pres_mgmt,
settings), journals, reusable elements (crud, field editor), app components,
core components, and test README. Mostly 1-2 line changes per file.
2026-03-06 17:32:53 -05:00
Scott Idem
0c9b6a9f5b fix: IDAA auth — harden novi_admin_li/trusted_li and remove iframe gate
- ae_idaa_stores.ts: update default novi_admin_li UUID; add staff UUID to
  novi_trusted_li hardcoded defaults.
- +layout.svelte (idaa): only overwrite admin/trusted lists from site_cfg_json
  when the list is non-empty, so hardcoded defaults are never silently cleared.
  Remove $ae_loc.iframe requirement for 'authenticated' access level — the
  presence of a valid Novi UUID in the URL is sufficient proof regardless of
  whether the iframe flag is set yet.
2026-03-06 17:32:47 -05:00
Scott Idem
9fc72b4671 feat: wire up class-based dark mode for Tailwind v4
- app.css: add @custom-variant dark so Tailwind v4 respects .dark class
  on <html> instead of always following OS prefers-color-scheme.
- app.html: remove hardcoded class="light" (now set dynamically).
- +layout.svelte: toggle .dark/.light on <html> when ae_loc.theme_mode changes.
- e_app_theme.svelte: related theme toggle changes.
2026-03-06 17:32:30 -05:00
Scott Idem
609818c361 a11y + CSS cleanup: fix label associations, remove orphaned style blocks, suppress autofocus
- Add for/id to all form label+input pairs: person, address, contact, users pages
- Convert decorative section-header <label> elements to <p> in launcher cfg files
- Add for/id to dynamic labels in leads custom questions, badges review form
- Change non-form <label> wrappers for custom editors to <div>/<p>
- Remove orphaned <style> blocks (ae_quick_modal_container/ae_quick_popover) from
  people/[person_id]/+page.svelte and location_view.svelte

Result: 95 warnings -> 26 warnings (remaining are lu_* false positives + 1 legacy CSS)
2026-03-05 21:28:16 -05:00
Scott Idem
b766942373 Less _random 2026-03-05 21:01:07 -05:00
Scott Idem
fdd4020267 fix: reduce svelte-check warnings from 175 to 95 (80 eliminated)
Svelte 5 reactivity pattern fixes:
- Convert prop/data captures to $derived where used in reactive contexts
- Wrap store assignments in $effect + untrack for ae_acct pattern
- Move sign_in_out URL param processing to onMount (from top-level if(browser))
- Wrap debug console.log blocks in $effect instead of top-level if(log_lvl)
- Fix $state initializers reading props directly ($state(link_to_id) → $state(''))
- Fix box = $state(null) in journals layout

CSS fixes:
- TipTap scss: change :global(.tiptap){nested} to :global{.tiptap{nested}} so
  Svelte does not scope-hash dynamic content selectors (latent CSS bug fixed)
- element_manage_hosted/event: dq__where vars → $derived for reactive liveQuery

Config:
- svelte.config.js: add onwarn (suppresses a11y/CSS in Vite pipeline; note:
  svelte-check 4.x does not read onwarn so CLI count unchanged)

Remaining 95 warnings (acceptable baseline):
- 70x a11y_label: form labels need for/id attributes (proper a11y fix deferred)
- 12x lu_* false positives in IDAA async callbacks (correct code)
- 8x CSS dynamic selectors Svelte cannot detect at compile time
- 5x other intentional patterns (autofocus, form state, log_lvl callbacks)
2026-03-05 20:50:39 -05:00
Scott Idem
73597cb8b4 chore: svelte-check cleanup — fix Svelte 5 patterns in events/pres_mgmt, badges, launcher, and tests
Source changes (0 errors, 175 warnings after):
- api_post__crud_obj_v3: add backward-compat migration aliases (for_obj_type/id, obj_type/id) to nested CRUD funcs
- ae_events__event_device/presenter/session: make event_id/presentation_id optional; fall back to store value
- element_ae_obj_field_editor_v3: import type Snippet properly; mark current_value as $bindable()
- ae_comp__badge_obj_view: fix $derived(() => false) → $derived(false) for show_receipt/show_tickets
- badge templates: pass explicit event_id param to delete/update calls
- launcher/+page: capture URL params as stable consts; pass event_id to update_ae_obj__event_device
- ae_comp__event_device_obj_li: wrap setInterval in $effect; onDestroy cleanup always registered
- ae_comp__event_device_obj_li_wrapper: move console.log to $effect; fix self-closing tag
- presenter form/menu/view/list: add missing event_presentation_id to all update/delete calls
- reports/locations/presenter/+page: move store assignments into $effect + untrack; ae_acct → $derived
- session/+page: add Comp_event_presenter_form_agree import; cast for type compat
- session_view: wrap <img onclick> in <button> for accessibility/validity
- ae_comp__event_presentation_obj_li: remove unneeded event_id/session_id from create_ae_obj__event_presenter
- ae_comp__event_session_obj_li: make lq prop optional; add plain-array fallback prop
- location/+page: refactor to $derived ae_acct, $effect+untrack for stores, simplified session/file sections
- location_page_menu: add optional data prop; export interface

Tests:
- Rename ae_events__event_badge.spec.ts → ae_events__event_badge.test.ts (extended coverage)
- All test files: 'warn' → 'warning' (Playwright API), addInitScript array-destructure pattern, import type fixes
- ae_defaults: remove duplicate hide_app_cfg key; meaningful sponsorship cfg_id placeholder
- create_event_badge.spec: fix import path to use $lib alias
- event_presenter.test: fix test URL to use /presenter/:id route

NOTE: location/+page.svelte — Element_manage_event_file_li_wrap no longer receives
allow_basic/allow_moderator (now default false); file list shows but management
actions may be restricted. Follow-up needed to restore auth__kv-based access.
2026-03-05 20:05:35 -05:00
Scott Idem
56419a097f Restrict access to Mangers and above. 2026-03-05 18:21:32 -05:00
Scott Idem
761fa69824 fix(badges): render QR code on badge front when show_qr_front is set
Fixed three issues in ae_comp__badge_obj_view.svelte:
1. Bug: {#await} block used src={qr_data_url} (the Promise) instead of src={result}
   (the resolved data URL) — QR image never displayed correctly on badge front.
2. Layout: .special div had no flex context; added flex-row + items-end so the QR
   sits at the bottom-right of the body section via ml-auto.
3. Cleanup: removed dead second QR block that awaited event_badge_qr_id_get_promise
   (always null), which could never render.

Also marks CRUD v2 refactor as complete in TODO__Agents.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 18:03:32 -05:00
Scott Idem
fdd1c88b35 fix(field-editor-v3): show edit buttons dimmed in edit mode, bright on hover
Previously buttons were opacity-0 until hover — invisible even in edit mode.
Changed to opacity-20 base so users can see which fields are editable, opacity-100 on hover.
Matches the behavior in element_data_store_v3.svelte.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 18:00:56 -05:00
Scott Idem
d846a39677 refactor: migrate Element_ae_crud v1/v2 usages to element_ae_obj_field_editor_v3
Replace all active Element_ae_crud (v1) and Element_ae_crud_v2 usages across
22 files with Element_ae_obj_field_editor_v3. Also remove 9 commented-out v1
imports that were dead code.

Key changes:
- Remove trigger_patch pattern; replace with direct api.update_ae_obj_v3() calls
- Replace field_value prop with current_value, on:ae_crud_updated with on_success
- Remove legacy props: api_cfg, hide_edit_btn, outline_element, show_crud,
  display_inline, display_block_edit (→ display_block), class_li
- field_type 'boolean' → 'checkbox', 'email' → 'text' (v3 has no email type)
- Replace core_func.update_ae_obj_id_crud_v2() with api.update_ae_obj_v3()
- Keep core_func where still used (QR code generation, person create)

Files: presenter_view, person_view, location_view, device_obj_li,
presentation_obj_li, session_view, launcher_file_cont, session_alert,
event/session/location/presenter page menus, leads exhibit tracking page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 17:38:02 -05:00
Scott Idem
cdf56aadcd refactor(crud): migrate v2 component usages to field-editor-v3
Replaces all active Element_ae_crud_v2 usages with Element_ae_obj_field_editor_v3,
and direct core_func.update_ae_obj_id_crud_v2 calls with api.update_ae_obj_v3.
Adds 'number' field_type to v3 editor. All on_success callbacks trigger SWR
refresh via events_func load functions so liveQuery updates Dexie correctly.

- element_ae_obj_field_editor_v3: add 'number' input type
- ae_comp__event_session_obj_li: replace core_func v2 API calls + dead import
- ae_comp__event_location_obj_li: migrate 2x Element_ae_crud_v2 (name, description)
- ae_tab__manage: migrate 7x Element_ae_crud_v2 (priority/checkbox, numbers, text, tiptap)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 16:39:29 -05:00
Scott Idem
c3ec0f88ee fix(field-editor-v3): layout shift, bindable crash, and optimistic display
- Fix layout shift on edit_mode toggle: always render the edit button
  (using invisible/pointer-events-none) so the flex container doesn't
  reflow when edit_mode is toggled on/off.

- Fix 'store.set is not a function' crash: remove $bindable() from
  current_value. The component is SWR-first; after a successful PATCH
  liveQuery updates the prop from Dexie. Trying to write back to a
  readonly liveQuery-derived prop caused the crash.

- Fix stale display after save: add has_optimistic flag + display_value
  derived. After a successful PATCH, display_value shows draft_value
  immediately without waiting for liveQuery. Cleared automatically when
  current_value catches up, or on cancel/re-open of edit mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 20:05:43 -05:00
Scott Idem
b2fa6228a6 fix(launcher): poster session display — metadata, image modal, file paths
1. launcher_presentation_view: accept session_type prop from parent
   instead of relying on event_session_type_code on file objects (which
   is not reliably populated in Dexie). Use session_type to correctly
   set hide_meta, session_type, and open_method on the file container.

2. launcher_session_view: pass session_type={type_code} to
   Launcher_presentation_view; restore Launcher_presenter_view_posters
   in the presenter list for poster mode (hide_name=true). Some events
   store poster files at the PRESENTER level (for_id=event_presenter_id)
   — particularly group/company presenters — so both paths must render.

3. launcher/+layout.svelte: fix poster modal image 403. The img src was
   using the event_file download endpoint which requires auth headers a
   plain img tag cannot send. Switched to the hosted_file endpoint with
   key=account_id, which is browser-compatible. Also guarded on
   modal__event_file_obj.hosted_file_id for safer access.

4. launcher_cfg_screen_saver: rename section title to 'Poster Screen Saver'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 19:15:32 -05:00
Scott Idem
795c12c1db fix(launcher): clean up poster session file display
Two issues in poster session view:

1. 'No files for this presenter' message always showed because
   file_count on the presenter is 0 — poster files are attached to
   the presentation, not the presenter. Removed the misleading message
   from launcher_presenter_view_posters.svelte with an explanation.

2. launcher_presentation_view.svelte was not passing hide_meta, so
   the OS toggle, date badge, and file size always rendered below the
   poster button. Added hide_meta={true} for poster files to match the
   clean display already used in launcher_presenter_view_posters.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 18:46:22 -05:00
Scott Idem
4aa1c2485d fix(launcher): guard hash_prefix_length select on native_device existence
native_device can be undefined during initial load (before device config
is fetched). The select bind:value was doing a hard property access that
threw a TypeError crash when native_device was null/undefined. Wrapped
in {#if $ae_loc.native_device} to defer rendering until it's available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 18:34:19 -05:00
Scott Idem
0179471113 fix(launcher): break reactive loop causing tab crash on Event Files
The $effect in launcher_presentation_view.svelte was calling
load_ae_obj_id__event_presentation() on every prop update. The SWR
pattern in that function always fires a background Dexie write, which
triggered the upstream liveQuery, which updated the prop, which
re-ran the $effect — creating an infinite loop that saturated the API
and crashed the browser tab within 30-60 seconds.

Fix: guard on last_loaded_id so the API call only fires when the
presentation ID actually changes, not on every downstream re-render.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 18:30:49 -05:00
Scott Idem
c8c66a3514 fix(launcher): add sync pause toggle and reduce default polling intervals
The SWR pattern always fires a background API call on cache hits, so the
15s session interval created a continuous API stream even when data was
fresh. Increased all defaults: session 15s->60s, location/device 30s->60s,
presentation/presenter 45-60s->120s.

Added sync_paused guard to all six refresh functions and a Pause/Resume
toggle in the Sync Timers config section (visible without edit mode) so
testing and troubleshooting don't require a full reload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 18:19:51 -05:00
Scott Idem
9d2bab420b fix(launcher): restore digital poster session support
type_code was a prop in launcher_session_view that was never passed by
the parent layout, silently killing all poster-specific code paths
(sort order, section labels, poster presenter component, inline
presenter display). Fixed by deriving type_code directly from the
session LiveQuery object already present in the component.

Also adds a poster icon badge to the session list so poster sessions
are visually distinct from oral sessions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 17:39:41 -05:00
Scott Idem
eb35cd023a fix(idaa): restrict Show/Hide Disabled buttons to manager_access + edit_mode
Disabled items are treated as functionally deleted for all end clients
(including Trusted Access staff). Only Manager + Edit Mode should see
Show/Hide Disabled controls — previously using administrator_access and
missing edit_mode gate in BB and archives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 16:50:35 -05:00
Scott Idem
5687f247d3 fix(idaa, leads): add each-block keys; gate clipboard buttons to manager_access
- Add keyed {#each} to recovery meeting list and exhibit tracking list
  to satisfy Svelte's each-block-key lint rule and ensure correct DOM
  reconciliation on list updates
- Gate Zoom/Jitsi copy-to-clipboard buttons behind manager_access in
  both the recovery meeting list view and single meeting detail view

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 14:38:02 -05:00
Scott Idem
29093c45df fix(auth+ds): passcode re-entry bug and Data Store v3 business logic
- e_app_access_type: reset checked_passcode on clear so same passcode
  can be re-entered without a page refresh (guard was blocking re-entry)
- element_data_store_v3: wire display prop to wrapper CSS style;
  gate "not found" diagnostic to administrator+ or trusted+edit_mode;
  public/anonymous visitors no longer see missing block warnings
- +page.svelte: add manager_access exception to header/content class_li
  so managers can see "not found" diagnostics (matches footer pattern)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 14:31:29 -05:00
Scott Idem
fb78293fdf Bug fix for signing out with a passcode and then trying to sign back in with the same passcode without refreshing the page. 2026-03-04 13:31:43 -05:00
Scott Idem
b064d8c235 feat(leads): V3 API migration, QR Scanner v3, and Exhibitor Leads UI overhaul
- Migrate event_exhibit and event_exhibit_tracking CRUD to V3 API (parent_type/child_type params).
- Implement Element_qr_scanner_v3.svelte: A Svelte 5 / Runes component using html5-qrcode with auto-start and unique viewfinder IDs.
- Integrate QR Scanner v3 into ae_comp__badge_search.svelte and lead capture.
- Refactor Exhibitor Leads UI:
  - Add 'Rapid Scan' vs 'Qualify Mode' toggles for efficient lead capture.
  - Upgrade ae_comp__lead_detail_form.svelte to support new question/response schema with backward compatibility.
  - Implement 'Sign Out of Booth' functionality in exhibit management.
  - Optimize lead detail layout for mobile readability and high information density.
  - Fix component prop sync for event_id and exhibit_id.
- UI/UX refinements: standardizing icons (SquarePen), cleaning up unused imports, and improving responsive states.
2026-03-03 18:49:57 -05:00
Scott Idem
5c3823f41a feat(badges): implement badge print controls panel and refine badge overrides
- Create ae_comp__badge_print_controls.svelte: A fixed-right-edge panel for per-field accordion controls, font size adjustments, and inline editing.
- Refactor print/+page.svelte to integrate the new controls panel and standardize font size state management via $bindable() props.
- Update ae_comp__badge_obj_view.svelte and ae_comp__badge_review_form.svelte to correctly sync badge_type_code_override and badge_type_override.
- Improve badge_type_name derivation logic to prioritize staff overrides.
- Hide unused receipt/ticket sections in badge view pending future redesign.
- Update documentation (PROJECT and TODO) to reflect completion of Task 3.
2026-03-02 19:47:11 -05:00
Scott Idem
32e9550ca2 feat(badges): layout CSS system — data-layout attribute, @page injection, style_href
Two compiled layout CSS files in src/lib/ae_events/badges/css/:
  - badge_layout_epson_4x5_fanfold.css — 4"×5" per side, Epson ColorWorks C3500
    fanfold duplex; preferred for general conference use (ISHLT, demos)
  - badge_layout_zebra_zc10l_pvc.css — 3.5"×5.5" PVC card, Zebra ZC10L,
    single-sided (pair with duplex=0 on template)

Rules scoped under [data-layout="..."] on the wrapper — beats Tailwind utility
class specificity without !important. Vite hot-reloads these in dev.

Badge component: add data-layout attribute from template.layout field; import
both layout CSS files (falls back to Tailwind 4"×6" defaults if layout unset).

Print page svelte:head: inject @page paper-size rule per layout code
(@page cannot use attribute selectors so it must be dynamic). Also wire
style_href as a <link> for per-event external client branding CSS.

db_events.ts Badge_template interface: add style_href and duplex fields.
MODULE doc: update layout codes table with badge_4x5_fanfold entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 16:53:32 -05:00
Scott Idem
51cfcbf2d6 feat(badges): wire duplex field — hide badge back for single-sided templates
- Add duplex + style_href to properties_to_save so they're cached in IDB
- Derive show_badge_back: true when duplex is null/unset (safe default for
  existing templates) or 1; false when duplex=0 (single-sided, e.g. Axonius
  NYC using Zebra ZC10L PVC cards)
- Wrap entire badge_back section in {#if show_badge_back} so the DOM node
  is fully removed rather than just hidden — cleaner than a CSS class approach

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 16:06:51 -05:00
Scott Idem
827c7ac62e fix(badges): wire badge_type_list from template instead of hardcoded ISHLT list
Replace static `badge_type_code_li` array (hardcoded ISHLT 2024 types) with
`$derived.by()` that parses `$lq__event_badge_template_obj.badge_type_list` JSON.
Each event's template defines its own badge type set — the component now reflects
that correctly. Falls back to `[]` on missing/invalid JSON (hides the type select).

Also add MODULE__AE_Events_Badge_Templates.md documenting template field reference,
external CSS approach, layout codes, duplex field plan, and standard template setup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:43:49 -05:00
Scott Idem
9939d94970 feat(badges): badge review form + expand properties_to_save
ae_comp__badge_review_form.svelte:
- Full implementation of the badge review form (Task 1)
- Editable fields gated by access level (attendee / trusted / admin)
- Save/cancel with change detection, override revert buttons
- QR code display (hover zoom + click expand)
- Print status section, options/tickets, T&C block
- HTML rendering for name/title/affiliations/location fields
- Accessibility font-size toggle (text-2xl ↔ text-4xl)
- Help modal (Flowbite) with 6 sections
- Local edit mode — never writes to $ae_loc.edit_mode

ae_events__event_badge.ts:
- Add missing fields to properties_to_save so they are persisted to IDB:
  pronouns_override, phone, phone_override, registration_type(_code/_override),
  allow_tracking, agree_to_tc, other_1-8_code, ticket_1-8_code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 19:02:56 -05:00
Scott Idem
3d7279da4c feat(badges): add print font size controls
- Add optional font_size_{name,title,affiliations,location} px props to
  ae_comp__badge_obj_view; when set, replaces auto inch-based sizing with
  an inline style so the caller controls the value
- Add screen-only (print:hidden) font size control panel to print page:
  four [−] [value] [+] [↺] rows, step 2px, null = auto (default)
  First + click activates at a sensible default that approximates the
  auto-sized inch values; ↺ button resets back to auto mode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 18:49:58 -05:00
Scott Idem
011fc19a77 fix(badges): correct default field lists in review page
default_authenticated_fields was missing: pronouns_override, phone_override,
allow_tracking, agree_to_tc — so attendees couldn't edit those fields even though
the form rendered inputs for them.

default_trusted_fields had 'email' and 'badge_type_code' instead of 'email_override'
and 'badge_type_code_override', causing the can_edit() check in handle_save() to
silently drop those changes. Also added the full trusted field set: registration_type,
other_1-8_code, ticket_1-8_code, hide, priority, notes.

Also removed unused lucide imports (ShieldCheck, User, UserCheck) left over from
the removed access level indicator block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 18:37:25 -05:00
Scott Idem
c4e85b1fe3 feat(badges): print/review pages, 4-button list, Lucide icons, permissions doc
Badge search results list (ae_comp__badge_obj_li):
- 4 action buttons per row: Print, Review (nav link), Copy Link (clipboard), Email Link
- Visibility rules: unprinted-only for non-edit mode; all non-hidden for trusted+edit
- Plain name display (User/EyeOff icon) — name is no longer a print link
- Obscured email for non-trusted users
- Debug row (ID, CR, UP, PC, FP, LP) in edit mode
- All icons converted to Lucide (Font Awesome removed)

Badge print page (/print):
- 3 header action buttons: Print Now, Review (nav), Email Link
- Removed old [badge_id]/+page.svelte placeholder (moved to trash)
- Added is_trusted, is_edit_mode, print state derived vars
- "Already printed Nx — last [timestamp]" warning inline with name
- Removed unused imports (browser, onMount, events_slct)

Badge review page (/review):
- 3 header action buttons: Print (nav), Copy Link (clipboard), Email Link
- Added events_loc for email placeholder + title event name
- Added is_edit_mode, print_count, is_printed, copy_status
- FA icons replaced with Lucide (ShieldCheck, UserCheck, User)
- Title now includes event name (was missing)

Infrastructure:
- print/+page.ts and review/+page.ts added (non-blocking badge loaders)
- ae_comp__badge_review_form.svelte stub created (fields pending)
- Fixed: components no longer write to $ae_loc.edit_mode (critical bug)

Docs:
- NEW: AE__Permissions_and_Security.md — full permissions hierarchy reference
- NEW: PROJECT__AE_Events_Badges_Review_Print.md — agent task brief for review form + print font controls
- UPDATED: MODULE__AE_Events_Badges.md rev 5 — field permissions spec, header buttons, still-needed list by priority

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 15:12:22 -05:00
Scott Idem
5a16772639 feat(badges): auto-navigate to badge search after print 2026-02-26 17:36:45 -05:00
Scott Idem
d1ded2d45e test(badges): pass attendee workflow test (edit → print → return)
- Add data-testid to badge edit/save/cancel/print buttons and professional title input
- Fix API mock routes (badge GET uses /v3/crud/event_badge/{id}, not nested)
- Add badge_template mock so badge view renders
- Add event_badge_id_random and id_random fields to all mock responses
- Split workflow test into its own test() instead of being inline in beforeEach
- Use data-testid selectors throughout for stability
2026-02-26 17:28:08 -05:00
Scott Idem
dc0f3066b3 fix(badges): support multi-word fulltext search
- Split search query by spaces
- Apply AND logic: all words must match
- Single word: LIKE '%word%'
- Multi-word: LIKE '%word1%' AND LIKE '%word2%'

Example: 'scott idem' now searches for both 'scott' AND 'idem'
Previously searched for literal 'scott idem' phrase which failed.

Fixes search bug discovered during Playwright test development.
2026-02-26 17:08:27 -05:00
Scott Idem
b28595dad8 fix(badges): return processed data from all badge API functions
CRITICAL FIX (same pattern as event_file fix):
- search__event_badge(): Now returns processed_obj_li instead of unprocessed result_li
- load_ae_obj_id__event_badge(): Returns processed object after IDB save
- load_ae_obj_li__event_badge(): Returns processed list after IDB save
- create_ae_obj__event_badge(): Returns processed object after IDB save
- update_ae_obj__event_badge(): Returns processed object after IDB save

Pattern: All functions now return what was actually saved to IDB (processed data)
This ensures consistency between API return values and IDB cached data.

TEST IMPROVEMENTS:
- Add full_name field to badge mock data (not just full_name_override)
- Ensures mock data matches real API structure
2026-02-26 15:59:25 -05:00
Scott Idem
96cfb8c1b0 Quick save of test page 2026-02-26 15:49:05 -05:00
Scott Idem
9547da6da6 fix(events): Fix pres mgmt reports data loading and field mapping
- Fix session detail page params not being passed to component (causing undefined session_id)
- Fix wrapper components discarding API enriched data by re-fetching from IDB
- Fix event_file, event_session, event_presenter wrappers to preserve API data
- Add optional chaining for hash_sha256 field to prevent undefined crashes
- Fix search__event_file to always process API results before returning
- Ensures hosted_file_size -> file_size field mapping for reports
- All pres mgmt reports (files, sessions, presenters) now work on cold-start
2026-02-26 14:36:46 -05:00
Scott Idem
32f8a75373 Refactor: Add microtask yields to journals module for consistency
Added await Promise.resolve() yields after IndexedDB writes to ensure
Dexie observers fire before function returns. Aligns with pattern
established in event loaders fix.

Journals module was already working correctly (preserved try_cache),
but adding yields ensures consistent timing behavior across all
nested data loading patterns.
2026-02-26 13:42:27 -05:00
Scott Idem
3849118fec Fix: Event session cold-start bug - presentations/presenters now load on first render
CRITICAL BUG FIX: Session view required 1-2 manual refreshes to display
presentations and presenters when IndexedDB was empty.

Root Cause:
- Nested loaders passed try_cache: false, preventing IDB writes
- Missing microtask yields caused race conditions between IDB writes
  and liveQuery subscriptions

Changes:
- ae_events__event_session.ts: Preserve try_cache in nested loads
- ae_events__event_presentation.ts: Block on presenter loads with await
  Promise.all() + preserve try_cache
- ae_events__event_presenter.ts: Add microtask yield after IDB write

Result: Presentations AND presenters now render correctly on first
navigation without requiring manual page refresh.
2026-02-26 13:40:36 -05:00
Scott Idem
b1162b9f08 I am done. Just saving things for the night. Not a good day. 2026-02-25 20:17:03 -05:00