Tier-6
Merged
HU
3mo ago+11838+11838+01234567890123456789012345678901234567890123456789-5761-5761-0123456789012345678901234567890123456789
- Added unit tests for the History and Overview components using Vitest and Testing Library, improving test coverage and reliability.
- Introduced contract tests to ensure OpenAPI paths align with expected schemas, enhancing API stability.
- Implemented visual regression tests with Playwright to capture UI changes and maintain visual consistency.
- Updated README and ROADMAP to reflect new testing capabilities and deployment instructions, including a full staging pipeline command.
- Upgraded Wrangler to version 4 across the project for improved development experience.
Summary by cubic
Raises quality and DX with unit, contract, and visual tests plus a one-command staging deploy. Also ships an offline-ready PWA, i18n, scorecard export, and static OpenAPI docs.
-
New Features
- Offline read-only PWA:
vite-plugin-pwawith WorkboxNetworkFirstforGET /sessions*, React Query persistence, and anOfflineBannerthat hides mutations when offline. - Scorecard export: print-ready HTML via
exportSessionScorecard()and a header button on Session Detail. - i18n:
react-i18nextwith anenlocale for nav and session detail; scorecard labels localized. - API docs:
scripts/export-openapi.mjscreatesapps/web/public/openapi.json; Redoc served at/docs/. - File input UX:
FileFielduses a hidden input + visible button and shows the selected filename.
- Offline read-only PWA:
-
Refactors
- Testing: component tests for History and Overview (
vitest+@testing-library/react), OpenAPI contract tests, and Playwright visual snapshots. - Caching: KV TTL set to 60s (Cloudflare minimum) with HTTP
max-age=15; best‑effort KV writes;X-Cacheretained. - Validation:
isSessionIdUUID check added to session routes for cleaner 404s. - Deploy DX:
npm run deploy:staging:full(migrate → force-rls → rls check → seed → deploy); README quick start updated. - Dependencies: Wrangler upgraded to
^4; addedvite-plugin-pwa,react-i18next,@tanstack/react-query-persist-client, and optional analytics (VITE_PLAUSIBLE_DOMAINorVITE_CF_WEB_ANALYTICS_TOKEN).
- Testing: component tests for History and Overview (