Skip to content

Fix stale song sourcing by keeping live API authoritative - #149

Merged
tacticalnoot merged 1 commit into
mainfrom
codex/investigate-data-loading-issues-and-cache-behavior
May 16, 2026
Merged

Fix stale song sourcing by keeping live API authoritative#149
tacticalnoot merged 1 commit into
mainfrom
codex/investigate-data-loading-issues-and-cache-behavior

Conversation

@tacticalnoot

Copy link
Copy Markdown
Owner

Motivation

  • Prevent stale snapshot rows from polluting global lists and “latest” views by ensuring the live API response remains the authoritative corpus when it succeeds.
  • Reduce the chance a browser-served /data/GalacticSnapshot.json serves stale data by avoiding cached snapshot fetches at runtime.

Description

  • Stop appending snapshot-only songs to merged results so fetchSmols() only returns live-API IDs (snapshot is now used only as a per-field fallback and for hydrating missing metadata for live IDs) in src/services/api/smols.ts.
  • Fetch the runtime snapshot with cache: 'no-store' to bypass browser cache in src/services/api/snapshot.ts.
  • Changes are intentionally minimal and scoped to the hybrid data merge and snapshot loading logic to preserve existing UX behavior and polling on detail pages.

Testing

  • Ran pnpm check (which executes svelte-check) and it completed but reported failures due to pre-existing TypeScript errors in unrelated labs/layout files; those errors are unrelated to these edits and predate this change.
  • Could not perform live integration verification against https://api.smol.xyz in this environment due to network restrictions (ENETUNREACH), so no runtime API tests were executed here.

Codex Task

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying smol-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0c2c033
Status:⚡️  Build in progress...

View logs

@tacticalnoot
tacticalnoot merged commit f11cdaa into main May 16, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant