docs: update docs to reflect events store migration completion
BOOTSTRAP__AI_Agent_Quickstart.md: rewrite store reactivity trap section to distinguish events sub-stores (PersistedState, fine-grained) from ae_loc/idaa_loc (svelte-persisted-store, coarse). Add import/read/write syntax examples and pointer to migration doc. PROJECT__Stores_Svelte5_Migration.md: rewritten to reflect events module fully complete; documents established PersistedState pattern with canonical examples; tables show all 5 sub-stores done + events_loc retired. TODO__Agents.md: events migration marked complete (2026-06-11); idaa_loc and ae_loc listed as remaining work; stale events_loc file_display_overrides ref fixed. tests/README.md: replace Leads-only store migration note with full events sub-store table, localStorage keys, and explanation of PersistedState deserialization (no __version guard needed). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,19 @@ Shared test helpers (`tests/_helpers/`)
|
||||
| `minimal_ae_api_mocks.ts` | `attach_minimal_routes()`, `seed_trusted_session()`, `setup_badge_test_page()` |
|
||||
| `leads_helpers.ts` | `setup_leads_test_page()`, `seed_events_loc()`, `seed_ae_loc()`, `attach_leads_routes()`, `minimal_exhibit()`, `minimal_tracking()` — Leads module test helpers |
|
||||
|
||||
Note: After the Leads persisted-store migration, tests that seed localStorage should also seed the new `leads_loc` defaults and include the expected `__version` values (see `src/lib/stores/store_versions.ts`) to avoid store wipe behavior during test startup. Update `tests/_helpers/leads_helpers.ts` accordingly.
|
||||
Note: All five Events sub-stores now use `PersistedState` with their own localStorage keys. `ae_events_loc` no longer exists — do not seed it. Tests that exercise Events module features may need to seed any of the following keys:
|
||||
|
||||
| Store | localStorage key | Defaults file |
|
||||
| --- | --- | --- |
|
||||
| `badges_loc` | `ae_badges_loc` | `ae_events_stores__badges_defaults.ts` |
|
||||
| `leads_loc` | `ae_leads_loc` | `ae_events_stores__leads_defaults.ts` |
|
||||
| `pres_mgmt_loc` | `ae_pres_mgmt_loc` | `ae_events_stores__pres_mgmt_defaults.ts` |
|
||||
| `launcher_loc` | `ae_launcher_loc` | `ae_events_stores__launcher_defaults.ts` |
|
||||
| `events_auth_loc` | `ae_events_auth_loc` | `ae_events_stores__auth.svelte.ts` (inline defaults) |
|
||||
|
||||
`PersistedState` stores do **not** use a `__version` guard like `ae_loc`. They use spread-merge deserialization (`{ ...defaults, ...JSON.parse(raw) }`), so new fields get their defaults automatically. No version stamp is needed when seeding these stores.
|
||||
|
||||
`ae_loc` still uses `svelte-persisted-store` with a `__version` guard — seed it as before (see the `__version` lesson below).
|
||||
|
||||
**`setup_badge_test_page(page, event_id)`** is the one-call `beforeEach` for any badge/event print page test. It wires the pageerror listener, all V3 API mocks, and the trusted auth localStorage seed in one call.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user