From 0c2c033ced81adae4a29be16f019e17806428d06 Mon Sep 17 00:00:00 2001 From: tacticalnoot <130199656+tacticalnoot@users.noreply.github.com> Date: Sat, 16 May 2026 00:26:29 -0500 Subject: [PATCH] Fix stale smol list priority and bypass snapshot cache --- src/services/api/smols.ts | 16 +++------------- src/services/api/snapshot.ts | 4 +++- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/services/api/smols.ts b/src/services/api/smols.ts index 50040e05..214c02a5 100644 --- a/src/services/api/smols.ts +++ b/src/services/api/smols.ts @@ -54,19 +54,9 @@ export async function fetchSmols(options?: { limit?: number; signal?: AbortSigna }; }); - // 3. Add songs from snapshot that aren't in the live response - const liveIds = new Set(liveSmols.map((s) => s.Id)); - snapshot.forEach((oldSmol) => { - if (!liveIds.has(oldSmol.Id)) { - merged.push({ - ...oldSmol, - Tags: oldSmol.Tags || [], - Address: oldSmol.Address || undefined, - Minted_By: oldSmol.Minted_By || undefined, - Username: oldSmol.Username || undefined, - }); - } - }); + // 3. Do NOT append snapshot-only songs when live API succeeded. + // Live must remain authoritative for "latest" ordering and corpus freshness. + // Snapshot is only a field-level fallback for known live IDs. // 4. DEEP VERIFICATION: Hydrate missing metadata for "Live-Only" songs // (Songs present in API but not in snapshot = New drops missing tags/address) diff --git a/src/services/api/snapshot.ts b/src/services/api/snapshot.ts index 9fce59e3..738a85ec 100644 --- a/src/services/api/snapshot.ts +++ b/src/services/api/snapshot.ts @@ -12,7 +12,9 @@ export async function getSnapshotAsync(): Promise { if (cachedSnapshot) return cachedSnapshot; try { - const res = await fetch('/data/GalacticSnapshot.json'); + const res = await fetch('/data/GalacticSnapshot.json', { + cache: 'no-store', + }); if (!res.ok) throw new Error(`Snapshot load failed: ${res.status}`); const data = await res.json();