Add robust domain validation, Supabase contracts, generation safety, CI, and E2E tests - #11
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
💡 Codex ReviewIn an existing project where a legacy workout row has a non-null but unsupported ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Motivation
Description
app/lib/date.tsand replaces ad-hoctoISOString().split('T')[0]usage acrossclient-database, workout and meal-plan flows to usegetLocalDateKey/parseDateKeyand week ranges; updates components and actions to accept validated date keys.app/lib/*(generated-plans.ts,profile.ts,definitions.ts,auth.ts) and enforces validation before saving or generating plans; generated plans are parsed and validated before persistence.upsertonuser_id,date, and adds a server-side atomicsave_profile_with_tdeRPC with a reconciliation migration undersupabase/migrationsto harden RLS, constraints, indices, and ownership.utils/supabase/*) to import the generatedDatabasecontract, improves middleware behavior for protected vs public routes, and updates server/browser helpers to cast toSupabaseClient<Database>./forgot-password,/reset-password,app/auth/confirm/route.ts) with safe redirect handling and UI pages/actions, plus UI improvements (logonext/image, accessible links) and removes bundled Google font variables in favor of system fonts..env.example,.github/workflows/quality.yml,playwright.config.ts,package.jsonscripts forlint,typecheck,test, Playwright E2E,eslint.config.mjsignore entries,tsconfig.test.json, and ignores for generated artifacts; includes Playwright spece2e/public-auth.spec.tsand many unit tests undertests/that exercise schemas, date logic, TDE, migration contract, and generation persistence.Testing
npm run check(which runsnpm run lintandnpm run typecheck) and completed successfully.npm test(Node built-in test runner compilingtsconfig.test.json) and the test suite for schemas, date utilities, TDE, and migration contract passed.npm run buildand succeeded.npm run test:e2ein the CI workflow (.github/workflows/quality.yml), and the public authentication journeys completed successfully with failure artifacts configured to upload on failure.Codex Task