Connect Supabase first: pick or make a project, and only the secret key is pasted

Signs in to the whole Supabase account, lists its projects (one is used straight away), or makes a free one called broke,
then fills in the address and public key and creates the tables. The paste-all-three route stays as the fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
minimus7andClaude Opus 5.5 committed 2026-11-09 11:04:06 -06:00
1 parent 73208b79df
commit 0e1a05801c
9 files changed
+237 -20

No files matched your search

+4 -3
View File
@@ -5,7 +5,7 @@ import Link from "next/link";
import { useCallback, useEffect, useState } from "react";
import { Logo } from "@/components/Logo";
import type { AiRow, Part, Section, SetupStatus } from "@/lib/setup";
import { CopyCommand, KeyForm, ConnectSupabaseButton, MigrateButton } from "./SetupActions";
import { CopyCommand, KeyForm, ConnectSupabaseButton, MigrateButton, ProjectPicker } from "./SetupActions";
export function ExtLink({ href, children }: { href: string; children: React.ReactNode }) {
return (
@@ -201,9 +201,10 @@ export function Body({ s, data, signedIn, reload }: { s: Section; data: SetupSta
{s.note && s.status !== "done" && s.status !== "error" && <p className="text-sm">{s.note}</p>}
{s.note && s.status === "done" && s.kind === "more" && <p className="text-sm">{s.note}</p>}
{s.action === "connect" && <ConnectSupabaseButton onDone={reload} onFail={() => setFallback(true)} />}
{s.action === "connect" && (s.steps || s.fields) ? (
{s.action === "pick" && <ProjectPicker onDone={() => window.location.reload()} />}
{(s.action === "connect" || s.action === "pick") && (s.steps || s.fields) ? (
<details className="text-sm" open={fallback} onToggle={(e) => setFallback(e.currentTarget.open)}>
<summary className="cursor-pointer text-muted hover:text-ink">Button didn&apos;t work? Paste a connection string instead</summary>
<summary className="cursor-pointer text-muted hover:text-ink">{s.fallback ?? "Button didn't work? Paste a connection string instead"}</summary>
<div className="pt-3 space-y-4">
<Steps steps={s.steps} />
{form}