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
82 lines
2.5 KiB
TypeScript
82 lines
2.5 KiB
TypeScript
import { Plus_Jakarta_Sans } from "next/font/google";
|
|
import { ProjectShell } from "@/components/layout/project-shell";
|
|
import { query } from "@/lib/db-postgres";
|
|
|
|
const plusJakarta = Plus_Jakarta_Sans({
|
|
subsets: ["latin"],
|
|
weight: ["400", "500", "600", "700"],
|
|
variable: "--font-justine-jakarta",
|
|
});
|
|
|
|
interface ProjectData {
|
|
name: string;
|
|
description?: string;
|
|
status?: string;
|
|
progress?: number;
|
|
discoveryPhase?: number;
|
|
capturedData?: Record<string, string>;
|
|
createdAt?: string;
|
|
updatedAt?: string;
|
|
featureCount?: number;
|
|
creationMode?: "fresh" | "chat-import" | "code-import" | "migration";
|
|
}
|
|
|
|
async function getProjectData(projectId: string): Promise<ProjectData> {
|
|
try {
|
|
const rows = await query<{ data: any; created_at?: string; updated_at?: string }>(
|
|
`SELECT data, created_at, updated_at FROM fs_projects WHERE id = $1 LIMIT 1`,
|
|
[projectId]
|
|
);
|
|
if (rows.length > 0) {
|
|
const { data, created_at, updated_at } = rows[0];
|
|
return {
|
|
name: data?.productName || data?.name || "Project",
|
|
description: data?.productVision || data?.description,
|
|
status: data?.status,
|
|
progress: data?.progress ?? 0,
|
|
discoveryPhase: data?.discoveryPhase ?? 0,
|
|
capturedData: data?.capturedData ?? {},
|
|
createdAt: created_at,
|
|
updatedAt: updated_at,
|
|
featureCount: Array.isArray(data?.features) ? data.features.length : (data?.featureCount ?? 0),
|
|
creationMode: data?.creationMode ?? "fresh",
|
|
};
|
|
}
|
|
} catch (error) {
|
|
console.error("Error fetching project:", error);
|
|
}
|
|
return { name: "Project" };
|
|
}
|
|
|
|
export default async function ProjectLayout({
|
|
children,
|
|
params,
|
|
}: {
|
|
children: React.ReactNode;
|
|
params: Promise<{ workspace: string; projectId: string }>;
|
|
}) {
|
|
const { workspace, projectId } = await params;
|
|
const project = await getProjectData(projectId);
|
|
|
|
return (
|
|
<div className={plusJakarta.variable} style={{ height: "100%", minHeight: "100dvh" }}>
|
|
<ProjectShell
|
|
workspace={workspace}
|
|
projectId={projectId}
|
|
projectName={project.name}
|
|
projectDescription={project.description}
|
|
projectStatus={project.status}
|
|
projectProgress={project.progress}
|
|
discoveryPhase={project.discoveryPhase}
|
|
capturedData={project.capturedData}
|
|
createdAt={project.createdAt}
|
|
updatedAt={project.updatedAt}
|
|
featureCount={project.featureCount}
|
|
creationMode={project.creationMode}
|
|
>
|
|
{children}
|
|
</ProjectShell>
|
|
</div>
|
|
);
|
|
}
|