Commit Graph

2125 Commits

Author SHA1 Message Date
Scott Idem
590139e63a New style option for Axonius 2026. Set as default for them as well in their site config.
Also general style clean ups
2026-04-08 10:21:08 -04:00
Scott Idem
372d79df2b docs(idaa): track contact_li_json_ext search gap + message sent to backend
- TODO__Agents.md: added task for contact search — backend to whitelist
  contact_li_json_ext in event search, frontend to add OR condition in
  search__event() and update local IDB fast-path filter. Blocked on backend.

- CLIENT__IDAA_and_customized_mods.md: documented the search architecture
  gap under Recovery Meetings — what default_qry_str contains, why
  contact_li_json is unsearchable as raw JSON, what contact_li_json_ext is
  and what needs to happen to enable contact name/email search.

Backend agent notified via ae_send_message 2026-04-08.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 00:20:59 -04:00
Scott Idem
c979454d84 docs(idaa): update IDAA doc with staff editing rules, Contact 1 convention, test coverage
- Added Section 4 'Staff Editing Rules': documents per-object behavior when
  trusted/admin staff edit member content. BB Post external_person_id is readonly
  for non-admin staff; Post Comment preserves existing record identity; Recovery
  Meeting external_person_id is intentionally editable for ownership reassignment.
  Clarifies that staff identity only fills when the record has no existing linkage.

- Added Section 5 'Recovery Meetings — Contact 1 Convention': states the business
  rule that Contact 1 is nearly always the same person as external_person_id (the
  meeting owner). Documents the distinction between ownership link vs. display contact.

- Added race condition defense note to Section 3 Implementation Patterns: creation
  buttons and edit submit handlers must scavenge from localStorage when the Svelte
  store is briefly null on mount.

- Updated test coverage table: Recovery Meetings now has substantial Playwright
  coverage (idaa_recovery_meeting_edit.test.ts). Noted pending BB Post/Comment tests.

- Updated Last Verified date to 2026-04-07.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 22:41:49 -04:00
Scott Idem
8d30e01ad4 fix(idaa): harden identity linkage in BB post and comment edit handlers
Three targeted fixes following code review of the Novi UUID linkage commit:

1. ae_idaa_comp__post_obj_id_edit.svelte — Add localStorage scavenge fallback
   in handle_submit_form() for external_person_id / full_name / email.
   WHY: The form input falls back to $idaa_loc.novi_uuid at render time only.
   On a race-condition mount where the store was null, the input captures an
   empty string.  Without this, a subsequent PATCH on a legacy post (no
   external_person_id) would overwrite the field with an empty string, permanently
   breaking the Novi linkage for that record.  The scavenge re-checks the live
   store and then localStorage before submitting.

2. ae_idaa_comp__post_options.svelte — Fix double alert() on creation failure.
   WHY: The .catch() handler alerted the user and reset 'creating'.  The
   .finally() block then ran unconditionally and fired a second alert when
   final_id was null (which it always is on failure).  User saw two dialogs.
   Fixed by removing the duplicate alert from .finally() — it now only resets
   the 'creating' flag, which .catch() may have already done (harmless reset).

3. ae_idaa_comp__post_comment_obj_id_edit.svelte — Remove 'log_lvl = 1' mutation.
   WHY: log_lvl is a $bindable prop.  Assigning to it inside handle_submit_form()
   unconditionally mutated the parent binding on every single form submission,
   overriding the caller's logging preference.  This was debug code accidentally
   left in.  Removed; the existing 'if (log_lvl)' guard is sufficient.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 22:23:33 -04:00
Scott Idem
f2765d6a5e feat(idaa): enforce mandatory Novi UUID linkage for member content
CRITICAL IDENTITY FIX:
Ensures all member-generated content (Meetings, Posts, Comments) is explicitly linked to the creator's Novi UUID via 'external_person_id' at the moment of creation.

Changes:
- Added 'external_person_id' to creation payloads in Recovery Meetings and BB Posts.
- Implemented 'identity scavenging' from localStorage in submit handlers to prevent race conditions where Svelte stores are briefly null.
- Refactored Post Comment edit component to robustly initialize and save creator identity.
- Added 'The Novi UUID Rule' to IDAA documentation to mandate this pattern for future development.
- Added Playwright test to verify creation linkage and fixed a version-mismatch bug in the test auth helper.

Note: Archives and Archive Content are excluded as they do not require member ownership.
2026-04-07 22:07:53 -04:00
Scott Idem
ef45a0ca0f feat(badges): TC modal centering, positioning, and allow-tracking toggle
- Center modal horizontally; position 10vh from top instead of centered vertically
- Add Allow/Do-not-allow toggle buttons inside the TC modal so attendees
  can set their lead scanning preference while reading the terms
- Buttons reflect current DB value on open and use solid color fills
  (green/red) so selection state is unambiguous in light and dark mode
- Save & Close calls existing save_field('allow_tracking') then closes;
  Cancel closes without saving

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 20:29:41 -04:00
Scott Idem
b01478a87f More layout and style clean up and related. 2026-04-07 19:04:27 -04:00
Scott Idem
f34074cdd6 Cleaning up the styles and some permissions 2026-04-07 18:53:22 -04:00
Scott Idem
ae9cdaf9f1 badges: per-tier search limits — result cap + min chars, config UI
Add anonymous/auth/trusted search constraints to BadgesRemoteCfg with
conservative defaults (anon: 15 results / 3 chars, auth: 25 / 2,
trusted+: 150 / 1). Configurable per event via mod_badges_json.

- BadgesRemoteCfg + BadgesLocState: 6 new fields with defaults
- sync_config__event_badges: mirrors new fields from mod_badges_json
- +page.svelte: effective_search_limits derived by tier using $ae_loc
  cumulative flags; enforces min_chars guard and result cap on both
  local IDB path and API call
- ae_comp__badge_search: effective_min_chars derived same way; blocks
  search trigger below threshold; shows dynamic hint text
- Fallback broad search (SCENARIO 2) suppressed for non-trusted users
  so no results show on page load without a query
- config/+page.svelte: Search Limits section with 3-column number
  inputs (Anonymous / Auth / Trusted+) for result limit and min chars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 18:08:10 -04:00
Scott Idem
be0b8baf62 Re-organizing things. 2026-04-07 15:54:01 -04:00
Scott Idem
93fea0d165 Making custom changes just for Axonius badge printing next week 2026-04-07 14:59:23 -04:00
Scott Idem
988ba75df3 feat(badges): cfg_json hide toggles for title/affiliations/location; wire renderer 2026-04-07 14:28:10 -04:00
Scott Idem
34bf823987 chore(badges): save in-progress changes — background_image_path, cfg_json support, template form TS fix, view boolean fixes 2026-04-07 13:57:02 -04:00
Scott Idem
1e178c14e7 leads: lead detail UX overhaul — notes editor, priority star, profile card cleanup
- Replace admin field editor with direct TipTap + Save Notes button for exhibitor notes;
  show Add Notes button when notes are empty (no dead placeholder)
- Add one-click priority star toggle in header (always visible, no edit mode required)
- Remove Exhibit Context card (exhibitors don't need to see their own booth name)
- Move Captured By into profile card with human-readable labels
  (shared_passcode → "Booth (Shared)", access type codes → Staff/Admin)
- Add location row (city/state + country) to profile card
- Gate Remove button to edit mode only to prevent accidental taps
- Fix button position stability: Edit/View always rightmost (same screen position),
  Remove grows in from left — prevents double-tap accidents
- Add unsaved-changes guard (beforeNavigate) covering both notes and custom question form
- Custom questions form: hide Save when no questions configured, show
  "Configure in Manage Tab" link instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:42:55 -04:00
Scott Idem
50e83502ff leads: UX improvements — manage tab, sign-in flow, notes editor, filter
- leads_api_access toggle in Admin Tools (manager only)
- Account Status section for end users (payment/licenses/API badges + CSV export button)
- Sign-out fix: use Object.fromEntries instead of delete on PersistedState proxy
- Shared passcode sign-in redirects directly to Manage tab (their role is config, not capture)
- Manage tab section reorder: Account Status → Lead Retrieval Config → Booth Profile → Access & Security → App Settings
- Filter dropdown: replace abstract "My Leads" with direct identity options (All / Booth (Shared) / per-licensee); auto-resolves and migrates stale 'my' values
- Lead detail: replace Element_ae_obj_field_editor notes with direct TipTap editor + Save Notes button; Add Notes button on empty state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 19:25:38 -04:00
Scott Idem
10e9206ca4 fix(leads): persist licensed auth across reloads; manage tab UX fixes
**Session persistence bug** — leads_loc_defaults was missing __version: 1.
store_versions.ts wipes ae_leads_loc when parsed.__version !== 1 (always true
when the field is absent), so every page reload cleared auth_exhibit_kv and
forced re-login. Adding __version: 1 to both the interface and defaults fixes
this for all auth types.

**Manage tab fixes:**
- Description: collapsed by default with ChevronDown/Up toggle — same pattern
  as session_view.svelte. Avoids long promo copy dominating the manage screen.
- Staff Passcode: removed duplicate green plain-text display for admins; the
  Element_ae_obj_field_editor already shows the value (was showing twice).
- Booth Identifier: replaced static read-only display with Element_ae_obj_field_editor
  so the booth code (exhibit.code) is editable inline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 17:19:35 -04:00
Scott Idem
f95243a9c7 fix(leads): disable sign-in submit until exhibit loads; add licensed-user auth tests
Prevents silent no-op when user clicks submit before lq__exhibit_obj is ready
(exhibit not yet written to Dexie). Button now shows 'Loading...' spinner while
the exhibit record is resolving, eliminating the two-tap workaround needed on
first page load.

Also adds 7 Playwright tests for licensed user sign-in (leads_licensed_signin.test.ts)
covering success path, wrong credentials, email/identity tagging on captured leads,
identity isolation between staff members, and returning-session bypass.

Helpers: attach_leads_routes/setup_leads_test_page now accept exhibit_overrides
(e.g. license_li_json) to inject licensed users into mocked API responses.
seed_leads_loc import added to leads_auth.test.ts multi-exhibit test.

Total leads test coverage: 29 tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 17:04:57 -04:00
Scott Idem
d340bbbe94 test: seed ae_leads_loc; update badge tests and helpers; docs: note Leads migration 2026-04-03 17:47:10 -04:00
Scott Idem
a952c5ddbe docs(leads): document Leads store migration and payment UI fix; note tests update 2026-04-03 17:33:23 -04:00
Scott Idem
7f79c1857a leads: event-level payment config + Stripe key migration
- New /events/[event_id]/leads/config page: administrator UI for
  mod_exhibits_json. Controls leads_require_payment toggle and Stripe
  keys (publishable key + buy button IDs per license tier).

- leads_require_payment (mod_exhibits_json) now gates all billing UI:
  header CreditCard button in exhibit +page.svelte and Licenses & Billing
  accordion in ae_tab__manage.svelte. Default false (client covers costs).

- Stripe keys migrated from site_cfg_json to mod_exhibits_json (per-event).
  ae_comp__exhibit_payment accepts them as optional props; falls back to
  site_cfg_json for events not yet migrated.

- Fixed "My Leads" bug for shared-passcode users: search_params now maps
  licensee_email 'my' → 'shared_passcode' literal (not kv.key passcode
  string) so filters correctly match stored external_person_id values.

- Event settings: Exhibits section replaced with config link + raw JSON
  fallback, matching pres_mgmt/badges pattern.

- Docs updated: README.md, MODULE__AE_Events_Exhibitor_Leads.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 12:36:36 -04:00
Scott Idem
48c5515131 Updated to do list 2026-04-03 01:39:55 -04:00
Scott Idem
c8eb904eb0 Minor style fix and char change 2026-04-02 21:34:49 -04:00
Scott Idem
d80202e35b Style clean up. Making things nicer again. 2026-04-02 21:31:58 -04:00
Scott Idem
055bbd9ffd events(settings): add modules config page and settings link 2026-04-02 20:01:15 -04:00
Scott Idem
0e0fc071c7 events: center module hub cards (flex-wrap + fixed card width) 2026-04-02 19:58:25 -04:00
Scott Idem
5971ca6143 fix: use file_count_all + is_null for sessions-without-files query
Two corrections to the qry_files filter:
1. Switch from file_count to file_count_all — covers files on presentations
   and presenters under the session, not just direct session files.
2. Switch "without files" from eq:0 to is_null — the view uses a LEFT JOIN
   so sessions with no files get NULL, never 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 19:08:43 -04:00
Scott Idem
cf7203daaf fix: implement qry_files filter in search__event_session (sessions with/without files)
qry_files was accepted as a parameter but never applied to the search query,
causing the "Sessions With/Without Files" report toggle to always return all
sessions regardless of the setting.

When qry_files !== null, automatically switch to the 'alt' view
(v_event_session_w_file_count) which exposes file_count, then add:
  true  → file_count > 0  (sessions with files)
  false → file_count = 0  (sessions without files)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 18:58:39 -04:00
Scott Idem
0ca2408111 Updated to do list again 2026-04-02 18:44:56 -04:00
Scott Idem
62ae376e67 chore(pkg): add runed (PersistedState) to fix svelte-check 2026-04-02 18:41:18 -04:00
Scott Idem
034e25d6c4 chore(pkg): remove orphaned shadcn-svelte and bits-ui 2026-04-02 18:38:32 -04:00
Scott Idem
08fdb2bddf chore(docs): prune fully-completed subsections from TODO__Agents.md 2026-04-02 18:26:44 -04:00
Scott Idem
84875d1daa Moving older files around. 2026-04-02 18:21:39 -04:00
Scott Idem
09757d249c chore(docs): archive completed TODO items to TODO__Agents__ARCHIVE_2026-03.md and tidy main TODO 2026-04-02 18:20:03 -04:00
Scott Idem
fae4bba037 Commenting out alert/notice for now. 2026-04-02 18:19:13 -04:00
Scott Idem
7b2694e9b7 fix(lead): remove invalid 'fill' prop from Star icon 2026-04-02 18:15:52 -04:00
Scott Idem
e27ff2c67f Limit who can create a new badge. This may need to change later. 2026-04-02 18:11:54 -04:00
Scott Idem
c198ca2454 chore(badges): remove legacy badge_id_only_search; sync remote badges config into badges_loc; docs update 2026-04-02 18:03:23 -04:00
Scott Idem
0ab8b936ce badges(runtime): honor mod_badges_json flags (badge_id_only search, QR toggle, add/upload/mass-print gating) 2026-04-02 17:23:35 -04:00
Scott Idem
4a5b4bf7cd badges(config): fix duplicate keys and initialize draft when mod_badges_json missing; update settings button style 2026-04-02 17:06:23 -04:00
Scott Idem
1935564645 Quick version bump again. 2026-04-02 16:30:34 -04:00
Scott Idem
fface58751 fix: add default_qry_str to db_events Event interface, remove incorrect global augment
The field exists on the DB object but was missing from the TypeScript interface,
causing a false error in recovery_meetings search. Added it to db_events.ts where
it belongs. Removed the incorrect global DOM Event augment from the temp augments
file (was patching the wrong interface).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 16:04:49 -04:00
Scott Idem
4a1b0dac86 pres_mgmt config: remove legacy launcher option, add back button + dirty state to config UI
- Remove show__launcher_link_legacy from PressMgmtRemoteCfg, PresMgmtLocState, and
  pres_mgmt_loc_defaults — the Flask/legacy launcher is retired
- Sync function now hardcodes hide__launcher_link_legacy=true (always hidden)
- Config page: back button to pres_mgmt, save buttons disabled until changes made
- Fix {#each} key expressions in config page
- Migrate e_app_access_type and element_manage_event_file_li to pres_mgmt_loc store
- Add temporary svelte type augments file (src/types/)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 15:53:55 -04:00
Scott Idem
fd9e5f6dc0 pres_mgmt: migrate to typed PersistedState store, canonical config schema
Replaces untyped $events_loc.pres_mgmt (svelte-persisted-store) with a
dedicated pres_mgmt_loc (runed PersistedState) backed by a fully typed
PresMgmtLocState interface and PressMgmtRemoteCfg for the server-side JSON.

Key changes:
- ae_events_stores__pres_mgmt_defaults.ts: canonical interfaces + defaults
  covering all hide__/show__ fields, labels, report prefs, query filters,
  and lock_config sync fields; qry_enabled uses 'not_enabled' (matches API)
- ae_events_stores__pres_mgmt.svelte.ts: new PersistedState store
- ae_events__event.ts: sync_config__event_pres_mgmt() rewired to write
  directly to pres_mgmt_loc.current; launcher link inversion preserved
- All 26+ pres_mgmt templates migrated from $events_loc.pres_mgmt.* to
  pres_mgmt_loc.current.*
- New config UI at (pres_mgmt)/pres_mgmt/config/ — manager + edit mode only
- Event settings page: removed embedded pres_mgmt form, links to config page
- event_page_menu: Config button visible only when manager_access + edit_mode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 15:27:12 -04:00
Scott Idem
21f0fe69af Quick version bump 2026-04-02 15:03:01 -04:00
Scott Idem
01c895f7ba feat(pres_mgmt): make session start/end datetime editable in edit mode
start_datetime and end_datetime were visible as chips but had no edit control.
Added two datetime-local field editors shown in edit_mode below the display chip:

- Converts stored "YYYY-MM-DD HH:mm:ss" → "YYYY-MM-DDTHH:MM" for the input
  (safe because dayjs has no timezone plugin — times are stored as local time)
- Falls back to event start date + 08:00/09:00 when session datetime is null,
  so staff only need to adjust the time rather than retype the full date
- Editors are side-by-side in a flex-wrap row with min-width so they wrap on mobile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 13:56:06 -04:00
Scott Idem
3a4c4a1e64 feat(pres_mgmt): make session code editable in edit mode
The code badge was display-only — replaced with a field editor so staff
can correct session codes without going to a separate admin view.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 13:46:39 -04:00
Scott Idem
75664ad2e1 feat(pres_mgmt): restore location and description editing in session view
Event location (FK lookup) and description were both visible in the session
view but had no edit controls — lost during V3 migration. Restored both:

- event_location_id: select dropdown populated from this event's location list
  (liveQuery on db_events.location filtered by event_id from the session object)
- description: textarea editor shown directly in edit_mode (no collapse needed
  when actively editing)

Also added event_location_id to editable_fields__event_session, which was
missing and would have caused backend rejections on PATCH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 13:44:00 -04:00
Scott Idem
2a5adda6cb idaa/video_conferences: restrict invite button to trusted_access staff only
The Jitsi invite dialog can expose backend room URLs and paths.
Previously invite was gated on is_moderator (any Novi group moderator).

Now restricted to $ae_loc.trusted_access (IDAA staff in Aether) so
regular member moderators cannot send invites. All other toolbar
buttons are unchanged.
2026-04-02 13:27:05 -04:00
Scott Idem
be3634d750 No longer allow regular attendees to send an invite. The moderators may be next. 2026-04-02 13:11:23 -04:00
Scott Idem
fd5d5e371b idaa/video_conferences: issue JWT to all verified Novi users
Previously only moderators received a JWT; non-moderators joined
anonymously. Now all verified Novi users get a JWT with the
is_moderator flag set appropriately, allowing the Jitsi server to
enforce authentication and respect context.user.moderator for
all participants.

Also adds JWT payload decode logging (client-side, signature not
verified) so the moderator flag and user identity can be confirmed
in the browser console during testing.
2026-04-02 12:51:05 -04:00