fix(idaa): resolve ~1-year 'no meetings found' bug on recovery meetings page
Root cause: stale IDB records from prior deploys persisted indefinitely. Fast path returned 0 (account_id mismatch), API errored silently, and the error state showed the same message as a genuinely empty result — making the failure indistinguishable from real data. Fix is layered defense: - Bump IDB_CONTENT_VERSIONS.events.event to 2 (one-time force-clear for all users) - Add check_and_clear_idb_table() helper to store_versions.ts; wire it in (idaa)/+layout.svelte to catch future version mismatches on session start - One silent auto-retry (3s) on API failure before surfacing error UI - Distinct error state (Unable to load meetings) separate from empty state - Escape-hatch cache-reset button after 8s when zero results + no active filters - Document root cause and fix in README.md and BOOTSTRAP__AI_Agent_Quickstart.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
27
README.md
27
README.md
@@ -163,6 +163,33 @@ npm run deploy:remote:prod
|
||||
- Private runtime variables are passed via the Docker Compose `.env` file in `aether_container_env/`.
|
||||
- **Remote deploy**: `aether_container_env/deploy.sh` handles git pull + Docker build + restart on the server. Triggered via `npm run deploy:remote:*`.
|
||||
|
||||
### Client-Side Cache & IDB Version Management
|
||||
|
||||
The app uses Dexie (IndexedDB) as a local cache for API data (SWR pattern). To prevent
|
||||
stale cached records from persisting across deploys, two version-tracking systems exist
|
||||
in `src/lib/stores/store_versions.ts`:
|
||||
|
||||
**localStorage store versions (`AE_LOC_VERSION`, etc.)**
|
||||
Track the schema of persisted Svelte stores (`ae_loc`, `ae_events_loc`, etc.).
|
||||
Bump when a store's shape changes in a breaking way (field type change, required rename).
|
||||
The check runs synchronously at module import time, before any store hydrates.
|
||||
|
||||
**IDB content versions (`IDB_CONTENT_VERSIONS`)**
|
||||
Track the content shape of Dexie table rows — specifically what `properties_to_save`
|
||||
writes to each table. Bump when `properties_to_save` in an object file changes in a way
|
||||
that makes existing cached rows stale (fields added/removed/renamed, computed field behavior
|
||||
changed). The `check_and_clear_idb_table()` helper reads a localStorage key per table and
|
||||
clears the Dexie table on mismatch. Call it from the module's layout on mount.
|
||||
|
||||
**When to bump `IDB_CONTENT_VERSIONS`:**
|
||||
If you change `properties_to_save` in `ae_events__event.ts` (or any other object file),
|
||||
bump the matching entry here. Failure to do so has historically caused silent "no data"
|
||||
states that are extremely difficult to diagnose — stale rows pass silently, filter to zero,
|
||||
and the error looks identical to a genuinely empty result.
|
||||
|
||||
Currently wired: `events.event` (via `src/routes/idaa/(idaa)/+layout.svelte`).
|
||||
All other tables are defined but not yet wired — see the comment block in `store_versions.ts`.
|
||||
|
||||
---
|
||||
|
||||
## Developing (Local HMR)
|
||||
|
||||
Reference in New Issue
Block a user