Neon / portal template support (#713)

TODOs:
- [x] Do restart when checkout / restore if there is a DB
- [x] List all branches (branch id, name, date)
- [x] Allow checking out versions with no DB
- [x] safeguard to never delete main branches
- [x] create app hook for neon template
- [x] weird UX with connector on configure panel
- [x] tiny neon logo in connector
- [x] deploy to vercel
- [x] build forgot password page
- [x] what about email setup
- [x] lots of imgix errors
- [x] edit file - db snapshot
- [x] DYAD_DISABLE_DB_PUSH
- [ ] update portal doc
- [x] switch preview branch to be read-only endpoint
- [x] disable supabase sys prompt if neon is enabled
- [ ] https://payloadcms.com/docs/upload/storage-adapters
- [x] need to use main branch...

Phase 2?
- [x] generate DB migrations
This commit is contained in:
Will Chen
2025-08-04 16:36:09 -07:00
committed by GitHub
parent 0f1a5c5c77
commit b0f08eaf15
50 changed files with 3525 additions and 205 deletions

View File

@@ -90,6 +90,14 @@ export const SupabaseSchema = z.object({
});
export type Supabase = z.infer<typeof SupabaseSchema>;
export const NeonSchema = z.object({
accessToken: SecretSchema.optional(),
refreshToken: SecretSchema.optional(),
expiresIn: z.number().optional(),
tokenTimestamp: z.number().optional(),
});
export type Neon = z.infer<typeof NeonSchema>;
export const ExperimentsSchema = z.object({
// Deprecated
enableSupabaseIntegration: z.boolean().describe("DEPRECATED").optional(),
@@ -138,6 +146,7 @@ export const UserSettingsSchema = z.object({
githubAccessToken: SecretSchema.optional(),
vercelAccessToken: SecretSchema.optional(),
supabase: SupabaseSchema.optional(),
neon: NeonSchema.optional(),
autoApproveChanges: z.boolean().optional(),
telemetryConsent: z.enum(["opted_in", "opted_out", "unset"]).optional(),
telemetryUserId: z.string().optional(),

View File

@@ -2,6 +2,7 @@ import { toast } from "sonner";
import { PostHog } from "posthog-js";
import React from "react";
import { CustomErrorToast } from "../components/CustomErrorToast";
import { InputRequestToast } from "../components/InputRequestToast";
/**
* Toast utility functions for consistent notifications across the app
@@ -87,6 +88,29 @@ export const showInfo = (message: string) => {
toast.info(message);
};
/**
* Show an input request toast for interactive prompts (y/n)
* @param message The prompt message to display
* @param onResponse Callback function called when user responds
*/
export const showInputRequest = (
message: string,
onResponse: (response: "y" | "n") => void,
) => {
const toastId = toast.custom(
(t) => (
<InputRequestToast
message={message}
toastId={t}
onResponse={onResponse}
/>
),
{ duration: Infinity }, // Don't auto-close
);
return toastId;
};
export const showExtraFilesToast = ({
files,
error,