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:
@@ -21,6 +21,7 @@ import { idaa_loc, idaa_sess, idaa_slct } from '$lib/stores/ae_idaa_stores';
|
||||
import { db_posts } from '$lib/ae_posts/db_posts';
|
||||
import { db_archives } from '$lib/ae_archives/db_archives';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import { check_and_clear_idb_table } from '$lib/stores/store_versions';
|
||||
|
||||
interface Props {
|
||||
/** @type {import('./$types').LayoutData} */
|
||||
@@ -63,6 +64,22 @@ let verify_in_flight = false;
|
||||
// Storing the failed UUID means only that exact UUID is skipped; any other UUID is a clean slate.
|
||||
let verify_failed_for_uuid: string | null = null;
|
||||
|
||||
// Clear stale db_events.event IDB data on IDAA session start.
|
||||
//
|
||||
// WHY: Stale cached event records were the root cause of the "no meetings found" bug
|
||||
// on the IDAA Recovery Meetings page — a ~1-year unresolved issue (fixed 2026-05-16).
|
||||
// After a deploy that changed properties_to_save, old IDB records persisted with missing
|
||||
// or wrong fields. The search fast path returned 0 results (failed account_id filter),
|
||||
// the API call errored silently, and the error state showed the same message as a real
|
||||
// empty result — users had no indication anything was wrong.
|
||||
//
|
||||
// This runs once per IDAA session. On a version match (normal case) it costs one
|
||||
// localStorage read. On a mismatch it clears the table; the SWR search re-fetches.
|
||||
// To force a clear after a deploy: bump IDB_CONTENT_VERSIONS.events.event in store_versions.ts.
|
||||
if (browser) {
|
||||
check_and_clear_idb_table(db_events.event, 'events', 'event').catch(() => {});
|
||||
}
|
||||
|
||||
// Show a manual reset button if the spinner is still visible after this many ms.
|
||||
// Handles the case where site_cfg_json loads without novi_idaa_api_key (stale cache)
|
||||
// or the Novi API call hangs — the user would otherwise be stuck with no escape.
|
||||
|
||||
Reference in New Issue
Block a user