Close the gap between the welcome carousel's AI promise and the payoff: a fresh keyless user used to meet "No AI provider connected" on every AI surface, because the only setup prompt was a skippable card on the final screen. Add an "insights" row to the getting-started checklist, derived from real provider state — any personal key, local model, OAuth sign-in, or the operator's shared key flips it done via /api/user/ai-provider. It persists past onboarding, self-satisfies on connect, and dismisses like the others. Elevate the done-screen AI card into a value-first panel: it leads with a static, clearly-labelled example briefing (no model call, no egress, no consent), then the local-first ladder — local model, bring-your-own-key, subscription sign-in with the training caveat — and the honest line that HealthLog is fully useful without AI. All three exits stay, so the panel gates nothing. On a deployment with a shared provider it says so plainly. Extract the worked example into a shared SampleBriefingCard. Add onboarding.ai.* copy across all six locales and retire the old single-card done-screen keys.
e2e/
End-to-end browser tests. Playwright 1.60 drives a production build of the app against a real PostgreSQL, with @axe-core/playwright for accessibility assertions. This is the heaviest test tier; CI runs it on every PR, and locally it is worth running when a change touches a UI flow.
Running
pnpm e2e
The Playwright config (../playwright.config.ts) builds the app (next build) and brings up Postgres before the specs run; setup/global-setup.ts seeds the auth + fixture state. The suite is not part of the fast local gate (typecheck / lint / test) — it surfaces at PR CI, so expect responsive/wizard/nav reworks to flag here first.
Layout
setup/—global-setup.ts(auth + DB seeding),test-helpers.ts(shared login + navigation helpers).utils/— fixtures such asmock-dashboard-snapshot.ts.*.spec.ts— one spec per flow: auth/login/redirect, dashboard, charts, the medication-wizard cadences (medications-wizard-*), insights generation + scroll restoration, doctor report, settings, mobile-viewport consistency, locale switch, accessibility (a11y.spec.ts), and thev1427-*regression set.
Convention
Assert against stable data-* attributes (data-slot, data-display-step, root display attrs), not viewport-dependent visible text. Responsive sm:hidden UI changes break getByText on desktop while the underlying element is still present — anchoring on data attributes keeps the specs stable across breakpoints. See ../CLAUDE.md.