ai-code-battle/web/src/lib
jedarden 79f3bee8a9 fix(web): serve replays from same-origin /data/ static assets, not R2
Replays are bundled into the Pages deploy as gzipped static assets (B2 stays
the private cold archive). Repoint all replay/card/thumbnail/live.json fetches
off the empty R2 cache and the non-resolving b2.aicodebattle.com onto
same-origin /data/, via a shared fetchReplayFromUrl helper that gunzips
.json.gz with DecompressionStream.

- new web/src/lib/replay-data.ts (REPLAY_BASE, replayUrl, fetchReplayFromUrl)
- replay.ts / embed.ts / pages/embed.ts / playlist-carousel.ts use the helper
- og-tags, bot-card, home, matches, bot-profile, playlists, feedback, ambient,
  api-types: /r2/ -> /data/
- pages.json data_paths updated; friendlier 404 message preserved
- 21 web tests pass; npm run build OK

Closes: bf-5cwi

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 16:41:30 -04:00
..
accessibility.ts feat(web): implement accessibility.ts per plan §15.3 2026-05-25 07:37:31 -04:00
ambient.ts fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
disclosure.ts fix(sandbox): fix TypeScript compilation error in disclosure.ts 2026-05-08 10:42:04 -04:00
lazy-section.ts feat(k8s): add deployment manifests for acb-evolver and acb-api per §9.2 2026-04-22 13:50:20 -04:00
preload.ts feat(replay): smooth 400ms cross-fade between view modes per §16.11 2026-04-22 13:57:42 -04:00
replay-data.ts fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
season-theme.ts feat(web): add ambient activity awareness per §16.18 2026-04-22 17:06:02 -04:00
virtual-list.ts fix(matchmaker): multi-match crash cooldown (3 strikes / 30 min) per §4.5 + §6.1 2026-04-22 15:22:12 -04:00