import Link from "next/link"; import CreateView from "@/components/create/CreateView"; import AppShell from "@/components/shell/AppShell"; import { readCreate } from "@/lib/create"; import { policyChip } from "@/lib/create/policy.mjs"; import { generationPolicyHref, isMake, type Make } from "@/lib/hrefs"; import { shownSources } from "@/lib/research/sources"; export const dynamic = "force-dynamic"; // --------------------------------------------------------------------------- // /create (plans/umtool-redesign.md, P5; canvas "Create"): "What are you // making?" -- one shell over the writers that already exist. Research a // question (a case, R2) · an article from a question (a sweep, r27/r28) or a // board (R2's hand-off) · a video from an article (the chain), a board, a // recording or a sweep report (scaffoldReportVideo) · a song. The policy is a // chip (the Meter dot and where each task runs) linking /settings/generation. // // ?make= opens that line's form (lib/hrefs.ts MAKES) // ?from=/ the editor's "make a video" (/?from= redirects here): // "Video from a recording", prefilled // ?case= preselects a board; ?article= an article // --------------------------------------------------------------------------- export default async function CreatePage({ searchParams, }: { searchParams: Promise<{ make?: string; from?: string; case?: string; article?: string }>; }) { const sp = await searchParams; const from = typeof sp.from === "string" && sp.from.trim() ? sp.from.trim() : null; const initial: Make | null = from ? "video-recording" : isMake(sp.make) ? sp.make : null; const data = await readCreate(); // settings.privacy.hidePrivateSites: the research form's source picker // DRAWS no private site (the data itself stays whole). const sources = await shownSources(data.sources); const shown = sources === data.sources ? data : { ...data, sources }; const chip = policyChip(data.policy?.generation ?? null, data.policy?.tasks); return (