mirror of
https://github.com/supabase/supabase.git
synced 2026-07-25 17:02:30 -04:00
000bdd0684
## Changes - **SiteUrl.tsx**: Added `.trim()` to the Zod schema so whitespace is stripped before validation and before the value reaches the mutation. All-whitespace input now correctly fails with "Must have a Site URL" instead of being silently accepted. This matches the existing pattern in the sibling Redirect URLs form (AddNewURLModal.tsx). - **SiteUrl.test.tsx** (new): MSW component test with two cases: - Trims leading/trailing whitespace before submitting to PATCH /platform/auth/:ref/config - Shows a validation error and does not submit when the value is only whitespace ## Test plan - [x] `npx vitest --run components/interfaces/Auth/SiteUrl/SiteUrl.test.tsx` — 2/2 pass - [x] `npm run typecheck` — clean - [x] `npx eslint` on both files — no new warnings <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved site URL validation so leading and trailing whitespace is ignored before saving. * Prevents whitespace-only values from being submitted and shows a validation error instead. * **Tests** * Added coverage for site URL saving, including trimmed input, validation failures, request payloads, and success feedback. <!-- end of auto-generated comment: release notes by coderabbit.ai -->