mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 22:29:11 +03:00
## Problem Project creation can send a request without a region, which the API rejects. Empty region values pass frontend validation, and a failed available-regions request fills in a static region name that cannot resolve to a region selection. ## Fix Keep the region selector controlled from mount and require a nonempty value. Disable creation when available regions fail to load, guard submission against unresolved region selections, and preserve the static fallback for providers that use it. Fixes [FE-3884](https://linear.app/supabase/issue/FE-3884/project-creation-wizard-can-submit-with-an-empty-region). ## How to test - Open the new-project form and verify the recommended region submits without manually selecting a region. - Submit with an empty region. Expected result: an inline validation error appears and no project creation request is sent. - Fail the available-regions endpoint, including after changing compute size with a region already selected. Expected result: the region-loading error appears, creation is disabled, and direct form submission sends no project creation request. - Run `pnpm --filter studio exec vitest --run 'tests/pages/new/[slug].test.tsx' tests/pages/vercel-deploy-button-new-project.test.tsx components/interfaces/ProjectCreation/ProjectCreation.schema.test.ts`. Local validation: all 54 focused tests and formatting pass. Focused ESLint has no errors. Local typecheck reports the existing image type mismatch in InstructionBlocks.tsx; CI typecheck passed for the previous commit.