- fetch client with bearer token, one retry after a renewal, ApiError with the server code
- session kept in localStorage; renewal is single-flight in a tab and under a Web Lock across tabs, and a tab adopts a session another tab already renewed
- a refused refresh token signs out once; an unreachable server keeps the session
- mediaUrl and onTokenChange for audio and image URLs that carry the token
- sign-in and first-account screen, and a gate that shows the app only when signed in
- i18next with en and it, language from the stored choice, then the browser, then English
- a test keeps both files on the same keys with no empty text
- API error codes map to error.<code>, with error.unknown as the fallback
- Sonda, Tokyo Night, Gruvbox dark and Gruvbox light as CSS variables with shadcn token names
- contrast test: text 4.5:1, accent and form outlines 3:1 in every theme
- Gruvbox dark muted text lightened to pass
- theme choice is stored in localStorage and survives it being blocked
- Vite, React 19 and TypeScript in web/, Vitest with jsdom and Testing Library
- Tailwind v4 and shadcn/ui, with Figtree and Fraunces bundled locally
- npm run gen:api builds src/api/schema.d.ts from the OpenAPI spec
- dev server proxies /api to sondad (SONDA_URL, default 127.0.0.1:8080)
- mockFetch test helper that refuses unmatched requests