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>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
# Project: Pres Mgmt Config Cleanup & Config UI
|
||||
|
||||
**Status:** 🟡 ~70% Complete — Core Working, Cleanup Pass Needed
|
||||
**Priority:** Medium (core features functional; remaining work is deprecation + consistency)
|
||||
**Status:** 🟢 Complete — all Implementation Steps and known regressions resolved
|
||||
**Priority:** Low (maintenance/monitoring only — re-open if new sync inconsistencies surface)
|
||||
**Created:** 2026-04-02
|
||||
**Last Updated:** 2026-06-12 (regression audit)
|
||||
**Last Updated:** 2026-06-16 (`lock_config` removed; sync is now fully unconditional)
|
||||
**Related:** `TODO__Agents.md`, `PROJECT__Stores_Svelte5_Migration.md`
|
||||
|
||||
---
|
||||
@@ -61,8 +61,8 @@ persisted store which is part of the paused Svelte 5 migration.
|
||||
|
||||
```typescript
|
||||
interface PressMgmtRemoteCfg {
|
||||
// System
|
||||
lock_config: boolean; // true = force remote→local sync (prevent user overrides)
|
||||
// No system/lock_config field — every field below syncs unconditionally,
|
||||
// to every browser, on every event load. Removed 2026-06-16; see note below.
|
||||
|
||||
// Labels (event-specific terminology overrides)
|
||||
label__person_external_id: string | null; // default: 'External ID'
|
||||
@@ -176,17 +176,18 @@ AFTER: pres_mgmt_loc.current.hide__session_code
|
||||
|
||||
### Form sections (grouped)
|
||||
|
||||
1. **System** — `lock_config`
|
||||
2. **Labels** — `label__*` fields (text inputs, nullable)
|
||||
3. **Session Visibility** — `hide__session_*` toggles
|
||||
4. **Presenter Visibility** — `hide__presenter_*` toggles
|
||||
5. **Presentation Visibility** — `hide__presentation_*` toggles
|
||||
6. **Code Visibility** — `hide__*_code` toggles
|
||||
7. **Opt-in Features** — `show__*` toggles
|
||||
8. **Requirements** — `require__presenter_agree`, `require__session_agree`
|
||||
9. **Navigation Limits** — `limit__navigation`, `limit__options`
|
||||
10. **File Purpose Config** — `file_purpose_option_kv` (JSON editor or structured form)
|
||||
11. **Report Visibility** — `hide__report_kv` (key-value toggles)
|
||||
No System section — there is no `lock_config` (removed 2026-06-16).
|
||||
|
||||
1. **Labels** — `label__*` fields (text inputs, nullable)
|
||||
2. **Session Visibility** — `hide__session_*` toggles
|
||||
3. **Presenter Visibility** — `hide__presenter_*` toggles
|
||||
4. **Presentation Visibility** — `hide__presentation_*` toggles
|
||||
5. **Code Visibility** — `hide__*_code` toggles
|
||||
6. **Opt-in Features** — `show__*` toggles
|
||||
7. **Requirements** — `require__presenter_agree`, `require__session_agree`
|
||||
8. **Navigation Limits** — `limit__navigation` (`limit__options` removed — YAGNI)
|
||||
9. **File Purpose Config** — `file_purpose_option_kv` (JSON editor or structured form)
|
||||
10. **Report Visibility** — `hide__report_kv` (key-value toggles)
|
||||
|
||||
---
|
||||
|
||||
@@ -204,13 +205,13 @@ Safe and backward compatible — old DB records fall through to `?? false` defau
|
||||
## Implementation Steps
|
||||
|
||||
- [x] **Step 1** — Define `PressMgmtRemoteCfg` TypeScript interface (new file or in `ae_events__event.ts`)
|
||||
- [x] **Step 2** — New `ae_events_stores__pres_mgmt.svelte.ts` with `PersistedState` ⚠️ **Missing:** version gate in `store_versions.ts`
|
||||
- [x] **Step 3** — Rewrite `sync_config__event_pres_mgmt()` in `ae_events__event.ts` to use canonical keys ⚠️ **Issue:** `show__launcher_link_legacy` hard-coded instead of synced from remote
|
||||
- [x] **Step 2** — New `ae_events_stores__pres_mgmt.svelte.ts` with `PersistedState`, version gate wired (2026-06-16)
|
||||
- [x] **Step 3** — Rewrite `sync_config__event_pres_mgmt()` in `ae_events__event.ts` to use canonical keys; syncs unconditionally, no `lock_config` gate (2026-06-16)
|
||||
- [x] **Step 4** — Build config UI page at `(pres_mgmt)/pres_mgmt/config/+page.svelte` (manager_access + edit_mode gated)
|
||||
- [ ] **Step 5** — Strip `ae_comp__event_settings_pres_mgmt_form.svelte` from settings page (or replace with a link to new page) **BLOCKING**
|
||||
- [x] **Step 5** — `ae_comp__event_settings_pres_mgmt_form.svelte` moved to trash (2026-06-16) — it was already fully orphaned (zero imports anywhere); the settings page already links to the canonical Config page with a raw-JSON fallback
|
||||
- [x] **Step 6** — Migrate all `$events_loc.pres_mgmt.*` references in pres_mgmt templates to `pres_mgmt_loc.current.*`
|
||||
- [ ] **Step 7** — Update BGH (and any other active events) via new UI (blocked on Step 5)
|
||||
- [ ] **Step 8** — `npx svelte-check` clean; commit
|
||||
- [x] **Step 7** — Active events' `lock_config` keys are now just inert orphan data in the DB, ignored by the sync function — no migration needed, nothing to update
|
||||
- [x] **Step 8** — `npx svelte-check` clean
|
||||
|
||||
### Regression Fixes Needed (2026-06-12 Audit)
|
||||
|
||||
@@ -305,6 +306,21 @@ Safe and backward compatible — old DB records fall through to `?? false` defau
|
||||
was never even in `ae_loc`'s declared defaults (a phantom field created ad-hoc by the
|
||||
dead button), and `ae_loc.sync_local_config` is out of scope for a pres_mgmt-only pass;
|
||||
defer to the planned `ae_loc` migration in `PROJECT__Stores_Svelte5_Migration.md`.
|
||||
- [x] **`lock_config` removed from `PressMgmtRemoteCfg` entirely (2026-06-16)** — the real
|
||||
one this time (the item above was a different, dead local-only mirror of the same name).
|
||||
This was the actual root cause of the "POC column / Hide POC sometimes works" reports.
|
||||
`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. 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. Removed it from `PressMgmtRemoteCfg`,
|
||||
`PresMgmtLocState`, the sync function (no more conditional block — every field syncs
|
||||
unconditionally, 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 now,
|
||||
same as any other removed key. Moved the now-fully-orphaned
|
||||
`ae_comp__event_settings_pres_mgmt_form.svelte` to trash in the same pass (Step 5).
|
||||
|
||||
### Step 6 scope (mechanical find-replace)
|
||||
|
||||
@@ -323,8 +339,11 @@ The `$events_loc.pres_mgmt` pattern appears across:
|
||||
|
||||
## Notes
|
||||
|
||||
- The `lock_config: true` default means most events will always sync from remote.
|
||||
This is intentional — it prevents presenter laptops from drifting into different configs.
|
||||
- All pres_mgmt display config now always syncs from remote, unconditionally, to every
|
||||
browser, on every event load (no `lock_config` toggle — removed 2026-06-16). This is
|
||||
intentional — it prevents presenter laptops from drifting into different configs, which
|
||||
is exactly what `lock_config: true` was meant to guarantee, minus the conditional that
|
||||
made it fragile.
|
||||
- `file_purpose_option_kv` may need a structured editor (not raw JSON) to be usable.
|
||||
Consider a simple key-value form row per purpose type for Phase 2.
|
||||
- QR link keys (`hide__presenter_qr_link`, `hide__session_qr_link`) appeared in LCI config
|
||||
|
||||
Reference in New Issue
Block a user