From a50f99103c0cb76f637bd601ec834e99acf9a37f Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Wed, 19 Aug 2026 11:58:38 +0200 Subject: [PATCH] fix(frontend): leave the Supabase organization unset when the lookup misses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Falling back to the first organization named one the seeded project is not in, since `supabaseSummary` prefers `intent.org` over the project's own. Unset, it falls through to the project's organization identifier — the right one, spelled as a slug rather than a name. Co-Authored-By: Claude Opus 5 (1M context) --- .../components/workspaceSettings/SupabaseProjectStep.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/workspaceSettings/SupabaseProjectStep.svelte b/frontend/src/lib/components/workspaceSettings/SupabaseProjectStep.svelte index 1ab3220b14..0406587ce7 100644 --- a/frontend/src/lib/components/workspaceSettings/SupabaseProjectStep.svelte +++ b/frontend/src/lib/components/workspaceSettings/SupabaseProjectStep.svelte @@ -56,11 +56,13 @@ } // Seeded from the project, the way picking one does. Chosen independently, the // review step names whichever organization happens to be first while the database - // under it belongs to another. + // under it belongs to another. A lookup that misses leaves it unset rather than + // falling back to the first: `supabaseSummary` then shows the project's own + // organization by identifier, which is right where a name would be wrong. const seeded = intent.project if (!intent.org) { intent.org = seeded - ? ((orgs ?? []).find((o) => orgSlug(o) === projectOrg(seeded)) ?? orgs?.[0]) + ? (orgs ?? []).find((o) => orgSlug(o) === projectOrg(seeded)) : orgs?.[0] } // The plan decides who gets billed, and the list endpoint does not carry it.