From f72d27790a387ae2bcf013bb2366b364d26270c2 Mon Sep 17 00:00:00 2001 From: mawkone Date: Mon, 8 Jun 2026 12:33:43 -0700 Subject: [PATCH] design: implement dynamic file-ingestion and PRD checklists for research and existing-project stages --- .../_onboarding/onboarding-entrepreneur.tsx | 556 +++++++++++++++++- 1 file changed, 550 insertions(+), 6 deletions(-) diff --git a/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx b/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx index 83122ca..6282a85 100644 --- a/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx +++ b/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx @@ -9,8 +9,8 @@ import { Field, } from "./onboarding-primitives"; -const ENTREP_TOTAL = 4; -const ENTREP_STEP_NAMES = ["Type", "Idea", "Status", "Name"]; +const ENTREP_TOTAL = 5; +const ENTREP_STEP_NAMES = ["Type", "Idea", "Status", "Details", "Name"]; const IDEA_PROMPTS = [ "A community for indie game devs to swap playtesters, with weekly demo nights", @@ -205,6 +205,508 @@ function EntrepStatus({ value, onChange }) { ); } +// ── Step 3 DYNAMIC: Research Ingestion ────────────────────────────────────── +function EntrepResearch({ files = [], brief = "", onChange }) { + const [uploading, setUploading] = useState(null); + const [progress, setProgress] = useState(0); + + const handleFileChange = (e: React.ChangeEvent) => { + const selected = e.target.files?.[0]; + if (!selected) return; + setUploading(selected.name); + setProgress(0); + + // Simulate a smooth upload progress bar + const interval = setInterval(() => { + setProgress((p) => { + if (p >= 100) { + clearInterval(interval); + setTimeout(() => { + onChange({ + files: [ + ...files, + { + name: selected.name, + size: `${(selected.size / 1024).toFixed(1)} KB`, + }, + ], + }); + setUploading(null); + }, 300); + return 100; + } + return p + 15; + }); + }, 80); + }; + + const removeFile = (name: string) => { + onChange({ + files: files.filter( + (f: { name: string; size: string }) => f.name !== name, + ), + }); + }; + + return ( + <> + + + {/* File Uploader */} + +
+