Rip out Theia, ship P5.1 attach E2E + Justine UI work-in-progress

Theia rip-out:
- Delete app/api/theia-auth/route.ts (Traefik ForwardAuth shim)
- Delete app/api/projects/[projectId]/workspace/route.ts and
  app/api/projects/prewarm/route.ts (Cloud Run Theia provisioning)
- Delete lib/cloud-run-workspace.ts and lib/coolify-workspace.ts
- Strip provisionTheiaWorkspace + theiaWorkspaceUrl/theiaAppUuid/
  theiaError from app/api/projects/create/route.ts response
- Remove Theia callbackUrl branch in app/auth/page.tsx
- Drop "Open in Theia" button + xterm/Theia PTY copy in build/page.tsx
- Drop theiaWorkspaceUrl from deployment/page.tsx Project type
- Strip Theia IDE line + theia-code-os from advisor + agent-chat
  context strings
- Scrub Theia mention from lib/auth/workspace-auth.ts comment

P5.1 (custom apex domains + DNS):
- lib/coolify.ts + lib/opensrs.ts: nameserver normalization, OpenSRS
  XML auth, Cloud DNS plumbing
- scripts/smoke-attach-e2e.ts: full prod GCP + sandbox OpenSRS +
  prod Coolify smoke covering register/zone/A/NS/PATCH/cleanup

In-progress (Justine onboarding/build, MVP setup, agent telemetry):
- New (justine)/stories, project (home) layouts, mvp-setup, run, tasks
  routes + supporting components
- Project shell + sidebar + nav refactor for the Stackless palette
- Agent session API hardening (sessions, events, stream, approve,
  retry, stop) + atlas-chat, advisor, design-surfaces refresh
- New scripts/sync-db-url-from-coolify.mjs +
  scripts/prisma-db-push.mjs + docker-compose.local-db.yml for
  local Prisma workflows
- lib/dev-bypass.ts, lib/chat-context-refs.ts, lib/prd-sections.ts
- Misc: stories CSS, debug/prisma route, modal-theme, BuildLivePlanPanel

Made-with: Cursor
This commit is contained in:
2026-04-22 18:05:01 -07:00
parent d6c87a052e
commit 651ddf1e11
105 changed files with 7509 additions and 2319 deletions

View File

@@ -0,0 +1,20 @@
"use client";
import { useParams } from "next/navigation";
import { MvpSetupStepPlaceholder } from "@/components/project-main/MvpSetupStepPlaceholder";
export default function MvpSetupArchitectPage() {
const { workspace, projectId } = useParams() as { workspace: string; projectId: string };
const base = `/${workspace}/project/${projectId}`;
return (
<MvpSetupStepPlaceholder
title="Architect"
subtitle="Lock in discovery — stack choices, surfaces, and what were shipping."
body="Use Task to run discovery phases and save answers. When youre ready, continue to Design."
primaryHref={`${base}/tasks`}
primaryLabel="Open Task"
nextHref={`${base}/mvp-setup/design`}
nextLabel="Continue to Design"
/>
);
}

View File

@@ -0,0 +1,11 @@
"use client";
import { useParams } from "next/navigation";
import { MvpSetupDescribeView } from "@/components/project-main/MvpSetupDescribeView";
export default function MvpSetupDescribePage() {
const params = useParams();
const projectId = params.projectId as string;
const workspace = params.workspace as string;
return <MvpSetupDescribeView projectId={projectId} workspace={workspace} />;
}

View File

@@ -0,0 +1,20 @@
"use client";
import { useParams } from "next/navigation";
import { MvpSetupStepPlaceholder } from "@/components/project-main/MvpSetupStepPlaceholder";
export default function MvpSetupDesignPage() {
const { workspace, projectId } = useParams() as { workspace: string; projectId: string };
const base = `/${workspace}/project/${projectId}`;
return (
<MvpSetupStepPlaceholder
title="Design"
subtitle="Pick feel, color, and layout — well apply it across your product surfaces."
body="The full design studio lives on the Design tab. When it looks right, move on to how youll grow."
primaryHref={`${base}/design`}
primaryLabel="Open Design"
nextHref={`${base}/mvp-setup/website`}
nextLabel="Continue to Website"
/>
);
}

View File

@@ -0,0 +1,17 @@
import type { ReactNode } from "react";
import { MvpSetupLayoutClient } from "@/components/project-main/MvpSetupLayoutClient";
export default async function MvpSetupWizardLayout({
children,
params,
}: {
children: ReactNode;
params: Promise<{ workspace: string; projectId: string }>;
}) {
const { workspace, projectId } = await params;
return (
<MvpSetupLayoutClient workspace={workspace} projectId={projectId}>
{children}
</MvpSetupLayoutClient>
);
}

View File

@@ -0,0 +1,20 @@
"use client";
import { useParams } from "next/navigation";
import { MvpSetupStepPlaceholder } from "@/components/project-main/MvpSetupStepPlaceholder";
export default function MvpSetupWebsitePage() {
const { workspace, projectId } = useParams() as { workspace: string; projectId: string };
const base = `/${workspace}/project/${projectId}`;
return (
<MvpSetupStepPlaceholder
title="Website"
subtitle="Voice, topics, and marketing style — what people see before they sign up."
body="Tune growth messaging on the Grow tab. Then review everything and kick off your MVP build."
primaryHref={`${base}/growth`}
primaryLabel="Open Grow"
nextHref={`${base}/mvp-setup/launch`}
nextLabel="Review & launch"
/>
);
}

View File

@@ -0,0 +1,60 @@
"use client";
import { useEffect, useState } from "react";
import { useParams, useRouter } from "next/navigation";
import { BuildMvpJustineV2 } from "@/components/project-main/BuildMvpJustineV2";
import { JM } from "@/components/project-creation/modal-theme";
interface SurfaceEntry {
id: string;
lockedTheme?: string;
}
export default function MvpSetupLaunchPage() {
const { workspace, projectId } = useParams() as { workspace: string; projectId: string };
const router = useRouter();
const [productName, setProductName] = useState("Your product");
const [giteaRepo, setGiteaRepo] = useState<string | undefined>();
const [surfaces, setSurfaces] = useState<SurfaceEntry[]>([]);
useEffect(() => {
fetch(`/api/projects/${projectId}`)
.then(r => r.json())
.then(d => {
const p = d.project;
if (p) {
setProductName(p.productName || p.name || "Your product");
setGiteaRepo(p.giteaRepo);
}
})
.catch(() => {});
fetch(`/api/projects/${projectId}/design-surfaces`)
.then(r => r.json())
.then(d => {
const ids: string[] = d.surfaces ?? [];
const themes: Record<string, string> = d.surfaceThemes ?? {};
setSurfaces(ids.map(id => ({ id, lockedTheme: themes[id] })));
})
.catch(() => {});
}, [projectId]);
const webappSurface = surfaces.find(s => s.id === "webapp");
const marketingSurface = surfaces.find(s => s.id === "marketing");
return (
<div style={{ height: "100%", overflow: "hidden", background: JM.inputBg }}>
<BuildMvpJustineV2
workspace={workspace}
projectId={projectId}
projectName={productName}
giteaRepo={giteaRepo}
accentLabel={webappSurface?.lockedTheme}
websiteStyle={marketingSurface?.lockedTheme}
onSwitchToPreview={() => {
router.push(`/${workspace}/project/${projectId}/build?section=preview`, { scroll: false });
}}
/>
</div>
);
}

View File

@@ -0,0 +1,10 @@
import type { ReactNode } from "react";
/** Root: no sidebar — launch step uses full Justine chrome; wizard steps use (wizard)/layout. */
export default function MvpSetupRootLayout({ children }: { children: ReactNode }) {
return (
<div style={{ height: "100%", overflow: "hidden", display: "flex", flexDirection: "column" }}>
{children}
</div>
);
}

View File

@@ -0,0 +1,10 @@
import { redirect } from "next/navigation";
export default async function MvpSetupIndexPage({
params,
}: {
params: Promise<{ workspace: string; projectId: string }>;
}) {
const { workspace, projectId } = await params;
redirect(`/${workspace}/project/${projectId}/mvp-setup/describe`);
}