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>
This commit is contained in:
Scott Idem
2026-06-16 12:29:43 -04:00
parent a37866e5bb
commit 8eb9444edf
5 changed files with 81 additions and 0 deletions

View File

@@ -247,6 +247,18 @@ Safe and backward compatible — old DB records fall through to `?? false` defau
`presenter_page_menu.svelte`'s QR toggle was gated to `administrator_access`, hiding it from
plain Trusted onsite staff entirely. Both now use the canonical pattern from
`session_page_menu.svelte`: `trusted_access && !show__*_qr`.
- [x] **Missing `sync_config__event_pres_mgmt()` calls on deep-link entry pages (2026-06-16)**
— root cause of the presenter QR bug above: a browser landing directly on the presenter
page (e.g. via a presenter sign-in link) never synced remote config into
`pres_mgmt_loc.current` at all, since only `pres_mgmt/+page.svelte` and
`session/[session_id]/+page.svelte` called the sync function. Every "always synced" and
"lock-synced" field (QR enables, POC visibility, code visibility, labels, etc.) silently
stayed at hardcoded local defaults on that browser regardless of admin Config page
settings. Added the same sync `$effect` (mirroring the existing comment/pattern in
`session/[session_id]/+page.svelte`) to `presenter/[presenter_id]/+page.svelte`,
`locations/+page.svelte`, `location/[event_location_id]/+page.svelte`, and
`reports/+page.svelte`. Any new pres_mgmt page that can be a first-load entry point
(i.e. not always reached via `/pres_mgmt` or `/session/[id]` first) needs this same block.
### Step 6 scope (mechanical find-replace)