From 1756778a547bfd60948bf4621fe389c58fb57117 Mon Sep 17 00:00:00 2001 From: mawkone Date: Mon, 8 Jun 2026 12:23:14 -0700 Subject: [PATCH] design: integrate Name workspace step into the path, pre-seed name from description, and remove redundant vibe and choice stages --- .../_onboarding/onboarding-entrepreneur.tsx | 172 ++++++------------ vibn-frontend/_onboarding/page.tsx | 4 +- 2 files changed, 58 insertions(+), 118 deletions(-) diff --git a/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx b/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx index 7ddab69..2525352 100644 --- a/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx +++ b/vibn-frontend/_onboarding/onboarding-entrepreneur.tsx @@ -6,10 +6,11 @@ import { WizardFooter, LANE_LABELS, PresetGroup, + Field, } from "./onboarding-primitives"; const ENTREP_TOTAL = 4; -const ENTREP_STEP_NAMES = ["Type", "Idea", "Status", "Look"]; +const ENTREP_STEP_NAMES = ["Type", "Idea", "Status", "Name"]; const IDEA_PROMPTS = [ "A community for indie game devs to swap playtesters, with weekly demo nights", @@ -197,123 +198,47 @@ function EntrepStatus({ value, onChange }) { }))} value={value} onChange={onChange} - columns={3} + columns={1} minimal={false} /> ); } -const VIBES = [ - { - id: "warm", - name: "Warm coral", - swatch: "linear-gradient(135deg, #E27855, #B33B2A)", - desc: "Confident, hand-built, warm.", - }, - { - id: "ink", - name: "Ink & paper", - swatch: "linear-gradient(135deg, #1d1d1d, #4a4a4a)", - desc: "Editorial, serif, quiet.", - }, - { - id: "sage", - name: "Sage matte", - swatch: "linear-gradient(135deg, #7BA890, #3F6B57)", - desc: "Calm, modern, slightly herbal.", - }, - { - id: "neon", - name: "Neon arcade", - swatch: "linear-gradient(135deg, #5B6CFF, #FF3DDB)", - desc: "Loud, fun, late-night.", - }, - { - id: "cream", - name: "Cream linen", - swatch: "linear-gradient(135deg, #F2E7D5, #C9A977)", - desc: "Cozy and beige.", - }, - { - id: "later", - name: "Decide later", - swatch: - "repeating-linear-gradient(45deg, oklch(0.30 0.010 60), oklch(0.30 0.010 60) 6px, oklch(0.22 0.010 60) 6px, oklch(0.22 0.010 60) 12px)", - desc: "Vibn picks one that fits.", - }, -]; +function EntrepName({ value, onChange, ideaDescription }) { + // Pre-fill the workspace name from what they typed, or fall back + const trimmed = String(value || "").trim(); + const slug = trimmed + .toLowerCase() + .replace(/[^a-z0-9]+/g, "-") + .replace(/^-+|-+$/g, "") + .slice(0, 32); -function EntrepVibe({ value, onChange }) { return ( <> -
- {VIBES.map((v) => { - const active = value === v.id; - return ( - - ); - })} -
+ + onChange(e.target.value)} + /> + + {slug && ( +
+ vibnai.com/{slug} +
+ )} ); } @@ -337,9 +262,8 @@ export function EntrepreneurPath({ else onJumpToStep(step - 1); }; - let body, - canNext, - onSkip = null; + let body, canNext; + const onSkip = null; if (step === 0) { body = ( onUpdate({ idea: v })} + onChange={(v) => { + const words = v + .trim() + .split(/\s+/) + .slice(0, 4) + .join(" ") + .replace(/[^a-zA-Z0-9\s]/g, ""); + const cleanName = words + ? words.charAt(0).toUpperCase() + words.slice(1) + : ""; + onUpdate({ + idea: v, + ...(!data.bizName ? { bizName: cleanName } : {}), + }); + }} /> ); canNext = (data.idea || "").trim().length >= 8; @@ -366,13 +304,13 @@ export function EntrepreneurPath({ canNext = !!data.projectStatus; } else { body = ( - onUpdate({ vibe: v })} /> + onUpdate({ bizName: v })} + ideaDescription={data.idea || ""} + /> ); - canNext = !!data.vibe; - onSkip = () => { - onUpdate({ vibe: "later" }); - next(); - }; + canNext = (data.bizName || "").trim().length > 0; } // 5 total: fork(1) + 4 path steps diff --git a/vibn-frontend/_onboarding/page.tsx b/vibn-frontend/_onboarding/page.tsx index 76ae543..d255950 100644 --- a/vibn-frontend/_onboarding/page.tsx +++ b/vibn-frontend/_onboarding/page.tsx @@ -95,7 +95,9 @@ export default function OnboardingApp() { setStage("fork"); setStep(0); }; - const completePath = () => setStage("choice"); + const completePath = () => { + finishNaming(String(data.bizName || "")); + }; const openWorkspace = () => { if (createdSlug && typeof window !== "undefined") { window.location.href = "/" + createdSlug; // Route directly to their live chat workspace!