diff --git a/app/(shell)/onboarding/StarterOnboardingWizard.tsx b/app/(shell)/onboarding/StarterOnboardingWizard.tsx index 5dd9a29b..406c30bd 100644 --- a/app/(shell)/onboarding/StarterOnboardingWizard.tsx +++ b/app/(shell)/onboarding/StarterOnboardingWizard.tsx @@ -25,6 +25,7 @@ import { type IntegrationStatus, } from "@/components/integrations/ConnectToolsWizard"; import { cn } from "@/lib/utils/cn"; +import { persistScrapeInputs } from "./intake/actions"; import { getOutcomeLabelWithFallback } from "@/lib/data/vertical-outcomes"; import { mapBusinessTypeToVertical, @@ -185,6 +186,7 @@ export function StarterOnboardingWizard({ const router = useRouter(); const [step, setStep] = useState(initialStep); const [businessType, setBusinessType] = useState(null); + const [companyUrl, setCompanyUrl] = useState(""); const [quickWins, setQuickWins] = useState([]); const [actionError, setActionError] = useState(null); const [workspacePending, setWorkspacePending] = useState(false); @@ -293,6 +295,19 @@ export function StarterOnboardingWizard({ if (!response.ok) { throw new Error("We could not finish Starter setup yet. Please try again."); } + + // P1-S1: if the owner gave their website, persist it so /focus drafts the first + // brief FROM their own business (the BriefBuildingState on /focus auto-fires the + // bootstrap). Non-fatal by design: an empty/invalid URL just lands on the honest + // sample brief (persistScrapeInputs validates SSRF + returns {ok:false} quietly). + const trimmedUrl = companyUrl.trim(); + if (trimmedUrl) { + try { + await persistScrapeInputs({ companyUrl: trimmedUrl }); + } catch { + // never block onboarding on the optional scrape + } + } }; const provisionTenant = async (): Promise<"ready" | "pending"> => { @@ -428,6 +443,7 @@ export function StarterOnboardingWizard({
{step === 1 && ( +
{BUSINESS_OPTIONS.map(({ id, icon: Icon, label, hint }) => { const selected = businessType === id; @@ -462,6 +478,26 @@ export function StarterOnboardingWizard({ ); })}
+
+ + setCompanyUrl(event.target.value)} + placeholder="yourbusiness.com" + className="w-full rounded-lg border border-stone-700 bg-stone-950/70 px-3.5 py-2.5 text-sm text-stone-100 placeholder:text-stone-500 focus-visible:border-amber-400/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-400/30" + /> +

+ We only read your public website to draft a first brief, nothing is sent to your clients. +

+
+
)} {step === 2 && (