Files
Ali Waseem 000bdd0684 fix(studio): trim leading whitespace in site URL form (#47748)
## 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 -->
2026-07-08 13:06:56 -06:00
..