From 979151a6f9e3d4e2b60c03417516590ad178c733 Mon Sep 17 00:00:00 2001 From: raj-khan Date: Fri, 22 May 2026 23:53:32 +0800 Subject: [PATCH 1/3] Add level picker and optional company context to demo flow --- .../src/components/demo/CurriculumView.tsx | 7 +- apps/web/src/components/demo/DemoFlow.tsx | 118 ++++++++++++++++++ 2 files changed, 124 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/demo/CurriculumView.tsx b/apps/web/src/components/demo/CurriculumView.tsx index 75c6fb1..492afea 100644 --- a/apps/web/src/components/demo/CurriculumView.tsx +++ b/apps/web/src/components/demo/CurriculumView.tsx @@ -15,18 +15,23 @@ export function CurriculumView({ tools, goal, role, + level = 'beginner', + companyContext, onLessonClick, }: { tools: string[]; goal?: string; role?: string; + level?: 'beginner' | 'intermediate' | 'advanced'; + companyContext?: string; onLessonClick: () => void; }) { const path = generateLearningPath({ role: role ?? 'Product Manager', tools: tools.length > 0 ? tools : ['Claude'], goal: goal ?? 'Ship something useful this Friday', - level: 'beginner', + level, + ...(companyContext ? { companyContext } : {}), }); const totalHours = Math.round(path.totalMinutes / 60); diff --git a/apps/web/src/components/demo/DemoFlow.tsx b/apps/web/src/components/demo/DemoFlow.tsx index 0d2ac2d..eb3ec52 100644 --- a/apps/web/src/components/demo/DemoFlow.tsx +++ b/apps/web/src/components/demo/DemoFlow.tsx @@ -39,12 +39,23 @@ const GOAL_SAMPLES = [ 'Stop hallucinated answers in our customer support bot', ]; +const LEVELS = [ + { value: 'beginner', label: 'Beginner', hint: 'New to AI tools' }, + { value: 'intermediate', label: 'Intermediate', hint: 'Use them daily' }, + { value: 'advanced', label: 'Advanced', hint: 'Build with APIs' }, +] as const; + +type Level = 'beginner' | 'intermediate' | 'advanced'; + export function DemoFlow() { const [step, setStep] = useState(0); const [role, setRole] = useState('Product Manager'); const [tools, setTools] = useState(['Claude', 'Cursor']); const [goal, setGoal] = useState(''); const [typedGoal, setTypedGoal] = useState(''); + const [level, setLevel] = useState('beginner'); + const [companyContext, setCompanyContext] = useState(''); + const [showContext, setShowContext] = useState(false); const [genProgress, setGenProgress] = useState(0); // Auto-type goal placeholder @@ -88,6 +99,9 @@ export function DemoFlow() { setStep(0); setGoal(''); setTypedGoal(''); + setLevel('beginner'); + setCompanyContext(''); + setShowContext(false); }; return ( @@ -380,6 +394,108 @@ export function DemoFlow() { ))} + + {/* Level picker */} +
+
+ Your current level +
+
+ {LEVELS.map(({ value, label, hint }) => ( + + ))} +
+
+ + {/* Optional company context */} +
+ {!showContext ? ( + + ) : ( +
+
+ Company context (max 500 chars) +
+