From 2e3b405893576129adf483d2aa8be74f3ef06500 Mon Sep 17 00:00:00 2001 From: Mark Henderson Date: Tue, 17 Mar 2026 16:15:06 -0700 Subject: [PATCH] feat: restore PRD section tracker on the right side of Atlas chat Two-column layout on the Atlas tab: - Left: Atlas discovery chat (full height, flex 1) - Right: 240px PRD section panel showing all 12 sections with live status dots (filled = phase saved, empty = pending) plus a progress bar showing phases complete out of 6 - Discovery banner (all 6 done) now lives inside the left column - "Generate PRD" footer CTA appears in right panel when all done Made-with: Cursor --- components/project-main/FreshIdeaMain.tsx | 231 ++++++++++++++++------ 1 file changed, 169 insertions(+), 62 deletions(-) diff --git a/components/project-main/FreshIdeaMain.tsx b/components/project-main/FreshIdeaMain.tsx index 2628ae4..fde444a 100644 --- a/components/project-main/FreshIdeaMain.tsx +++ b/components/project-main/FreshIdeaMain.tsx @@ -14,6 +14,22 @@ const DISCOVERY_PHASES = [ "risks_questions", ]; +// Maps discovery phases → the PRD sections they populate +const PRD_SECTIONS: { label: string; phase: string | null }[] = [ + { label: "Executive Summary", phase: "big_picture" }, + { label: "Problem Statement", phase: "big_picture" }, + { label: "Vision & Success Metrics", phase: "big_picture" }, + { label: "Users & Personas", phase: "users_personas" }, + { label: "User Flows", phase: "users_personas" }, + { label: "Feature Requirements", phase: "features_scope" }, + { label: "Screen Specs", phase: "features_scope" }, + { label: "Business Model", phase: "business_model" }, + { label: "Integrations & Dependencies", phase: "screens_data" }, + { label: "Non-Functional Reqs", phase: null }, // generated at PRD finalization + { label: "Risks & Mitigations", phase: "risks_questions" }, + { label: "Open Questions", phase: "risks_questions" }, +]; + interface FreshIdeaMainProps { projectId: string; projectName: string; @@ -123,75 +139,166 @@ export function FreshIdeaMain({ projectId, projectName }: FreshIdeaMainProps) { ); } + const completedCount = savedPhaseIds.size; + const totalPhases = DISCOVERY_PHASES.length; + return ( -
- {/* Decision banner — shown when all 6 phases are saved */} - {allDone && !dismissed && ( -
-
-
- ✦ Discovery complete — what's next? +
+ + {/* ── Left: Atlas chat ── */} +
+ {/* Decision banner — shown when all 6 phases are saved */} + {allDone && !dismissed && ( +
+
+
+ ✦ Discovery complete — what's next? +
+
+ All 6 phases captured. Generate your PRD or jump into Build. +
-
- Atlas has captured all 6 discovery phases. Choose your next step. +
+ + +
-
- - - + )} + + +
+ + {/* ── Right: PRD section tracker ── */} +
+ {/* Header */} +
+
+ PRD Sections +
+ {/* Progress bar */} +
+
+
+
+ {completedCount} of {totalPhases} phases complete
- )} - + {/* Section list */} +
+ {PRD_SECTIONS.map(({ label, phase }) => { + const isDone = phase === null + ? allDone // non-functional reqs generated when all done + : savedPhaseIds.has(phase); + return ( +
+ {/* Status dot */} +
+
+
+ {label} +
+ {!isDone && ( +
+ {phase === null + ? "Generated when PRD is finalized" + : "Complete this phase in Atlas" + } +
+ )} +
+
+ ); + })} +
+ + {/* Footer CTA */} + {allDone && ( +
+ + Generate PRD → + +
+ )} +
); }