"use client"; import Link from "next/link"; import { useEffect } from "react"; import { CheckCircle2, FileUp, PlusCircle, Plug, Sparkles } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useAuth } from "@/hooks/use-auth"; import { setTourReferrer } from "@/components/onboarding/tour-launcher"; import { useTranslations } from "@/lib/i18n/context"; /** * v1.4.25 W14b-Content — onboarding step 4 (done). * * Confirms the user has finished onboarding. `onboardingCompletedAt` * was flipped server-side by the baseline form's `POST step:4` write, * so this page is purely presentational — no further mutation, no * cookie flips, no API calls. * * The single CTA returns the user to the dashboard. The link goes * through `next/link` so the regular client-side navigation kicks in * (the proxy redirect was cleared with the same step-API write that * landed the user here). * * v1.18.6 — on mount we write the per-user wizard-return marker so the * shell-level `` auto-opens the module tour immediately * on the next dashboard arrival (sequenced after the post-wizard * grace), instead of waiting out the 24 h fallback. Whichever exit the * user picks from this screen, the next `/` mount finds the marker. */ export function DoneScreen() { const { t } = useTranslations(); const { user } = useAuth(); useEffect(() => { if (user?.id) setTourReferrer(user.id); }, [user?.id]); return (

{t("onboarding.done.title")}

{t("onboarding.done.body")}

{t("onboarding.done.learning")}

{/* v1.18.6 — surface the AI Insights / Coach / briefing setup at the highest-intent moment. The flagship feature needs a BYOK or local provider that the rest of onboarding never mentions, so a fresh user otherwise discovers it as a cold error. This card is skippable by construction — it is an optional deep-link, not a gate. */}

{t("onboarding.done.aiTitle")}

{t("onboarding.done.aiBody")}

{t("onboarding.done.aiCta")}
{t("onboarding.done.importCta")}
); }