mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## Problem The internal-only Postgres version selector sorted versions by raw string comparison, so `17.6.1.164` appeared above `17.11.0.002` and the list looked randomly ordered. The sort also ran in place on the array returned by React Query, which can be the cached data. Resolves FE-4603. ## Solution - Add `sortPostgresVersionsNewestFirst` in `ProjectCreation.utils.ts`. It compares version segments numerically, returns a new array, and does not mutate its input. - Use it in `PostgresVersionSelector` in place of `.sort().reverse()`. - OrioleDB versions are not grouped; they are ordered by version number like the rest. - Side effect: the default selection (the first GA version in the list) is now the newest GA version. - Unit tests cover numeric ordering and non-mutation. Before: <img width="447" height="184" alt="Screenshot 2026-11-11 at 16 00 45" src="https://github.com/user-attachments/assets/219f26a1-1475-40ce-a0dc-49480005194f" /> After: <img width="448" height="196" alt="Screenshot 2026-11-11 at 15 58 32" src="https://github.com/user-attachments/assets/24a99b91-22ff-4667-bf96-0046a426d95b" />