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

@@ -51,6 +51,13 @@ import type {
VercelProject,
UpdateChatParams,
FileAttachment,
CreateNeonProjectParams,
NeonProject,
GetNeonProjectParams,
GetNeonProjectResponse,
RevertVersionResponse,
RevertVersionParams,
RespondToAppInputParams,
} from "./ipc_types";
import type { Template } from "../shared/templates";
import type { AppChatContext, ProposalResult } from "@/lib/schemas";
@@ -82,7 +89,6 @@ export interface GitHubDeviceFlowErrorData {
export interface DeepLinkData {
type: string;
url?: string;
}
interface DeleteCustomModelParams {
@@ -412,6 +418,18 @@ export class IpcClient {
}
}
// Respond to an app input request (y/n prompts)
public async respondToAppInput(
params: RespondToAppInputParams,
): Promise<void> {
try {
await this.ipcRenderer.invoke("respond-to-app-input", params);
} catch (error) {
showError(error);
throw error;
}
}
// Get allow-listed environment variables
public async getEnvVars(): Promise<Record<string, string | undefined>> {
try {
@@ -437,17 +455,10 @@ export class IpcClient {
}
// Revert to a specific version
public async revertVersion({
appId,
previousVersionId,
}: {
appId: number;
previousVersionId: string;
}): Promise<void> {
await this.ipcRenderer.invoke("revert-version", {
appId,
previousVersionId,
});
public async revertVersion(
params: RevertVersionParams,
): Promise<RevertVersionResponse> {
return this.ipcRenderer.invoke("revert-version", params);
}
// Checkout a specific version without creating a revert commit
@@ -794,6 +805,34 @@ export class IpcClient {
// --- End Supabase Management ---
// --- Neon Management ---
public async fakeHandleNeonConnect(): Promise<void> {
await this.ipcRenderer.invoke("neon:fake-connect");
}
public async createNeonProject(
params: CreateNeonProjectParams,
): Promise<NeonProject> {
return this.ipcRenderer.invoke("neon:create-project", params);
}
public async getNeonProject(
params: GetNeonProjectParams,
): Promise<GetNeonProjectResponse> {
return this.ipcRenderer.invoke("neon:get-project", params);
}
// --- End Neon Management ---
// --- Portal Management ---
public async portalMigrateCreate(params: {
appId: number;
}): Promise<{ output: string }> {
return this.ipcRenderer.invoke("portal:migrate-create", params);
}
// --- End Portal Management ---
public async getSystemDebugInfo(): Promise<SystemDebugInfo> {
return this.ipcRenderer.invoke("get-system-debug-info");
}