Commit Graph

10 Commits

Author SHA1 Message Date
Scott Idem
cbc94babe0 fix(pres_mgmt): Location column ignored admin's Hide Location setting
Same bug pattern as the earlier POC column fix. The Session Search
results table's Location column prop only ever read the local-only,
never-synced hide__session_li_location_field — never the admin-synced
hide__session_location (Config page > Session Field Visibility > Hide
Location). Column always showed regardless of that setting or
permission level.

Fixed in pres_mgmt/+page.svelte:
  hide__session_location || hide__session_li_location_field

The other two usages of this component already hardcode
hide__session_location={true} correctly (you're already on that
location's own page, showing its name again would be redundant).

Logged in PROJECT__AE_Events_PressMgmt_Config_Cleanup.md with a note to
audit other hide__* fields for the same gap if more reports come in.

svelte-check: 0 errors, 0 warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 14:10:54 -04:00
Scott Idem
af2236eea4 fix(pres_mgmt): remove lock_config — sync is now fully unconditional
lock_config made roughly half of sync_config__event_pres_mgmt()'s fields
conditional: they only updated in a given browser if lock_config happened
to be true at the exact moment that browser last synced. A field's local
value therefore depended on the history of saves, not the current setting
— undebuggable from the UI, and easy to corrupt by toggling Lock Config
off even briefly during testing. This was the actual root cause of the
"POC column / Hide POC sometimes works" reports.

Checked the DB: every event, old and new, already had lock_config: true.
The "unlocked, per-browser preference" use case it was built for has
never actually been used in practice.

- Removed lock_config from PressMgmtRemoteCfg, PresMgmtLocState, the
  sync function (no more conditional block — every field syncs
  unconditionally now, same as labels/Require Agreements always did),
  and the Config page UI (no more System section)
- Old DB records with a lock_config key are simply ignored, same as any
  other removed key — no migration needed
- Moved the now-fully-orphaned ae_comp__event_settings_pres_mgmt_form.svelte
  to ~/tmp/agents_trash (zero imports anywhere; the settings page already
  links to the canonical Config page) — completes Step 5 from the
  cleanup doc
- Marked PROJECT__AE_Events_PressMgmt_Config_Cleanup.md complete — all
  Implementation Steps and known regressions resolved

svelte-check: 0 errors, 0 warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 13:56:27 -04:00
Scott Idem
e5c141e765 fix(pres_mgmt): config sync round 2 — save race, dead fields, launcher gate, version stamps
Four fixes found while tracing why Manager-saved Config page changes
(QR, POC column, etc.) weren't reliably reaching pres_mgmt_loc:

1. Config page save was a race, not deterministic. The save handler only
   called load_ae_obj_id__event() (SWR — returns stale Dexie cache
   immediately, refreshes in the background, not awaited) and assumed
   that "picked up the new config." It never called
   sync_config__event_pres_mgmt() itself. Now calls it directly with the
   just-saved draft, so the editing browser updates instantly with no
   race. Kept the load_ae_obj_id__event() call (default try_cache: true)
   for propagating to other browsers/tabs via Dexie — do not pass
   try_cache: false there, that skips the Dexie write entirely.

2. Removed the dead "Lock Config" Sync/Unlink toggle in the sign-in
   panel (e_app_access_type.svelte). It wrote to four fields
   ($ae_loc.lock_config/sync_local_config,
   pres_mgmt_loc.current.lock_config/sync_local_config) that are never
   read anywhere (confirmed via full-repo grep), and confusingly shared
   a name with the real, functional "Lock Config" checkbox on the Pres
   Mgmt Config page. Removed the button and the now-orphaned
   lock_config/sync_local_config fields from PresMgmtLocState.

3. show__launcher_link was never assigned by sync_config__event_pres_mgmt()
   — only its inverse hide__launcher_link was. The toggle button's
   `show__launcher_link || trusted_access` visibility gate (in 3 menu
   files) always collapsed to trusted-only, ignoring the admin's setting.
   Added the missing assignment.

4. AE_PRES_MGMT_LOC_VERSION was bumped to 2 this morning claiming it
   "forces a localStorage reset" — it didn't, because _check_and_wipe()
   was never wired up for ae_pres_mgmt_loc, and even if it had been, the
   store never wrote a __version field to compare. Fixed: the store's
   serializer now stamps __version, and store_versions.ts wires the
   check. Found and fixed the same bug already live in ae_leads_loc,
   except worse there — it was wiping leads users' local prefs on EVERY
   page load, not just once.

All logged in PROJECT__AE_Events_PressMgmt_Config_Cleanup.md.
svelte-check: 0 errors, 0 warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 13:21:04 -04:00
Scott Idem
8eb9444edf fix(pres_mgmt): sync remote config on all deep-link entry pages
Root cause of the presenter QR not propagating to other browsers/incognito:
sync_config__event_pres_mgmt() was only called from pres_mgmt/+page.svelte
and session/[session_id]/+page.svelte. A browser landing directly on the
presenter page (e.g. via a presenter's sign-in link) never synced remote
config into pres_mgmt_loc.current at all — every always-synced and
lock-synced field (QR enables, POC visibility, code visibility, labels,
etc.) silently stayed at hardcoded local defaults regardless of what was
set on the Config page, since that page was never visited in that browser.

Added the same sync $effect (mirroring the existing pattern/comment already
in session/[session_id]/+page.svelte) to:
- presenter/[presenter_id]/+page.svelte
- locations/+page.svelte
- location/[event_location_id]/+page.svelte
- reports/+page.svelte

Logged in PROJECT__AE_Events_PressMgmt_Config_Cleanup.md with a note that
any future pres_mgmt entry page needs the same block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 12:29:43 -04:00
Scott Idem
a37866e5bb fix(pres_mgmt): presenter QR follows session QR global-default pattern
show__presenter_qr (admin) is meant to be the global default for everyone,
signed in or not. show_content__presenter_qr is a trusted-staff-only local
override for when the admin hasn't enabled it globally. Presenter QR was
still on the old logic requiring show_content__presenter_qr to also be
true even when the admin enabled it for everyone — non-trusted users
(presenters) have no way to set that flag, so QR never appeared for them.

- presenter_view.svelte: generation effect + display block now use
  show__presenter_qr || (trusted_access && show_content__presenter_qr),
  matching the session_view.svelte fix from earlier today
- presenter_page_menu.svelte: QR toggle was gated to administrator_access,
  hiding it from plain Trusted onsite staff; loosened to trusted_access
  and dropped the redundant `|| trusted_access` (now only shown when
  admin hasn't already enabled QR globally)
- ae_comp__events_menu_opts.svelte: both session and presenter QR toggles
  were visible to all authenticated_access users whenever admin had
  enabled QR globally, even though the toggle had no effect for them;
  now gated to trusted_access && !show__*_qr, matching session_page_menu.svelte
- Log the fix in PROJECT__AE_Events_PressMgmt_Config_Cleanup.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 12:14:24 -04:00
Scott Idem
a47a2103eb fix(pres_mgmt): make POC list/table column a real per-event config
show__session_li_poc_field was local-browser-only and the session list
prop computation ignored the admin's hide__session_poc master switch
entirely, so disabling POC for an event didn't hide the column if a
user's browser had it toggled on.

- Add show__session_li_poc_field to PressMgmtRemoteCfg + Config page UI
  (Session Field Visibility) + sync_config__event_pres_mgmt() lock-synced
  block, so it's admin-configurable per event like the other display flags
- Fix list/table column visibility to hide__session_poc || !show__session_li_poc_field
  in pres_mgmt/+page.svelte and locations/ae_comp__event_location_obj_li.svelte
- Remove the now-redundant local "Show/Hide POC Column" toggle buttons from
  ae_comp__events_menu_opts.svelte and event_page_menu.svelte
- Log the fix in PROJECT__AE_Events_PressMgmt_Config_Cleanup.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 10:18:10 -04:00
Scott Idem
03b3c84921 docs: archive Field Editor V3 project (complete), update Pres Mgmt status (~70% with regressions) 2026-06-12 17:54:38 -04:00
Scott Idem
fd7ccd7ecc docs: normalize Pres Mgmt cleanup formatting 2026-06-12 17:10:31 -04:00
Scott Idem
1e3f541a39 docs: fifth-pass guide metadata and doc ownership cues 2026-06-12 16:58:23 -04:00
Scott Idem
21f0fe69af Quick version bump 2026-04-02 15:03:01 -04:00