ai-code-battle/web/package.json
jedarden 41193b25a4 fix(web): distinguish 404 from generic errors in replay viewer
Updates showLoadError to display a friendly "not available yet" message
for HTTP 404 errors (common for unuploaded replays) vs generic "could
not load" for other HTTP errors. Adds the URL to error output and
maintains HTML escaping.

Also adds vitest testing infrastructure with 5 tests covering:
- 404 not-found message
- Generic HTTP error message
- Parse error handling
- HTML escaping (XSS protection)
- 404 vs error distinction

Closes: bf-5cwi
2026-05-24 23:04:58 -04:00

24 lines
523 B
JSON

{
"name": "acb-web",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run"
},
"devDependencies": {
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"agentation": "^3.0.2",
"jsdom": "^25.0.1",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"typescript": "^5.0.0",
"vite": "^5.0.0",
"vitest": "^3.0.5"
}
}