ai-code-battle/web/src
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
..
components fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
lib fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
pages fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
styles feat(web): add rivalry platform integration (plan §13.5) 2026-05-25 07:21:27 -04:00
agentation-overlay.ts fix(api): rename /api/ui-feedback to /api/feedback per plan §13.6 2026-04-22 13:22:47 -04:00
api-types.ts fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
app.ts feat(web): add maps browsing page per plan §14.6 2026-05-26 16:23:59 -04:00
commentary.ts Add Phase 7-9 features: evolution dashboard, WASM sandbox, enhanced replay 2026-03-29 01:13:23 -04:00
embed.ts fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
engine.ts feat(web): add combat_deaths to MatchResult and display in sandbox 2026-05-24 18:42:38 -04:00
main.ts feat(replay): add fog-of-war perspective toggle and minimap per §7.3 2026-04-23 00:30:46 -04:00
og-tags.ts fix(web): serve replays from same-origin /data/ static assets, not R2 2026-05-26 16:41:30 -04:00
replay-commentary.ts feat(evolver): complete Phase 7 LLM-driven evolution implementation 2026-04-08 16:38:48 -04:00
replay-viewer.ts feat(web): handle zone_death events in replay viewer 2026-05-25 15:28:39 -04:00
router.ts fix(web): fix replay viewer routing and embed fallback 2026-04-30 13:07:13 -04:00
test-setup.ts fix(web): add matchMedia mock to prevent unhandled test errors 2026-05-25 00:18:32 -04:00
types.ts feat(web): add combat_deaths to MatchResult and display in sandbox 2026-05-24 18:42:38 -04:00
win-probability.ts Add Phase 7-9 features: evolution dashboard, WASM sandbox, enhanced replay 2026-03-29 01:13:23 -04:00