From 63bab543e53a2e6bc14b9ae6435435edd085cbf0 Mon Sep 17 00:00:00 2001 From: Sreeram Sreedhar Date: Wed, 24 Jun 2026 08:41:22 -0700 Subject: [PATCH] Move onboarding actions into fixed footer --- apps/desktop/app/onboarding/page.tsx | 187 +++++++++++---------------- 1 file changed, 74 insertions(+), 113 deletions(-) diff --git a/apps/desktop/app/onboarding/page.tsx b/apps/desktop/app/onboarding/page.tsx index 3a896632..579034c0 100644 --- a/apps/desktop/app/onboarding/page.tsx +++ b/apps/desktop/app/onboarding/page.tsx @@ -74,15 +74,13 @@ const novaCardClassName = const novaIconBoxClassName = "flex size-12 shrink-0 items-center justify-center rounded-[12px] border border-[rgba(82,89,102,0.2)] bg-[#14161A]" -const stickyActionBarClassName = - "sticky bottom-0 z-20 mt-4 border-white/[0.06] border-t bg-[#05080D]/90 py-3 shadow-[0_-18px_42px_rgba(5,8,13,0.92)] backdrop-blur-xl" - export default function DesktopOnboardingPage() { const router = useRouter() const [session, setSession] = useState(null) const [authChecked, setAuthChecked] = useState(false) const [step, setStep] = useState("welcome") const [connectedTools, setConnectedTools] = useState([]) + const [filesystemMounted, setFilesystemMounted] = useState(false) useEffect(() => { let cancelled = false @@ -156,44 +154,46 @@ export default function DesktopOnboardingPage() {
- {step === "welcome" ? ( - goToStep("tools")} onSkip={skip} /> - ) : null} + {step === "welcome" ? : null} {step === "tools" ? ( goToStep("welcome")} - onContinue={() => goToStep("filesystem")} /> ) : null} {step === "filesystem" ? ( goToStep("tools")} onContinue={() => goToStep("done")} + onMountedChange={setFilesystemMounted} /> ) : null} {step === "done" ? ( - goToStep("filesystem")} - onFinish={() => complete()} - /> + ) : null}
+ 0} + filesystemMounted={filesystemMounted} + onBack={() => { + if (step === "tools") goToStep("welcome") + if (step === "filesystem") goToStep("tools") + if (step === "done") goToStep("filesystem") + }} + onPrimary={() => { + if (step === "welcome") goToStep("tools") + if (step === "tools") goToStep("filesystem") + if (step === "filesystem") goToStep("done") + if (step === "done") complete() + }} + onSkip={skip} + /> ) } -function WelcomeStep({ - onContinue, - onSkip, -}: { - onContinue: () => void - onSkip: () => void -}) { +function WelcomeStep() { return (
@@ -206,23 +206,6 @@ function WelcomeStep({ available everywhere you work.

-
- - -
) @@ -230,16 +213,10 @@ function WelcomeStep({ function ToolsStep({ session, - connectedTools, onConnectedToolsChange, - onBack, - onContinue, }: { session: AuthSession - connectedTools: DesktopToolId[] onConnectedToolsChange: (tools: DesktopToolId[]) => void - onBack: () => void - onContinue: () => void }) { const [tools, setTools] = useState([]) const [loading, setLoading] = useState(true) @@ -332,22 +309,16 @@ function ToolsStep({ onApply={applyPreview} /> ) : null} - - 0 ? "Continue" : "Skip tools"} - /> ) } function FilesystemStep({ - onBack, onContinue, + onMountedChange, }: { - onBack: () => void onContinue: () => void + onMountedChange: (mounted: boolean) => void }) { const [tag, setTag] = useState("sm_fs_desktop") const [status, setStatus] = useState(null) @@ -425,6 +396,10 @@ function FilesystemStep({ selectedMountPath ?? (status?.mountPathConfigured ? status.mountPath : null) const canMount = Boolean(mountPath) && !loading && !busy + useEffect(() => { + onMountedChange(mounted) + }, [mounted, onMountedChange]) + return (
@@ -515,11 +490,6 @@ function FilesystemStep({ -
) } @@ -557,15 +527,7 @@ function FilesystemStatus({ ) } -function DoneStep({ - connectedCount, - onBack, - onFinish, -}: { - connectedCount: number - onBack: () => void - onFinish: () => void -}) { +function DoneStep({ connectedCount }: { connectedCount: number }) { return (
@@ -579,29 +541,6 @@ function DoneStep({ ? `${connectedCount} tool${connectedCount === 1 ? "" : "s"} connected. You can add more from Settings anytime.` : "No tools connected yet. You can come back from Settings whenever you are ready."}

-
- - -
) } @@ -814,34 +753,56 @@ function StepHeader({ ) } -function StepActions({ +function OnboardingFooter({ + step, + toolsConnected, + filesystemMounted, onBack, - onContinue, - continueLabel, + onPrimary, + onSkip, }: { + step: DesktopOnboardingStep + toolsConnected: boolean + filesystemMounted: boolean onBack: () => void - onContinue: () => void - continueLabel: string + onPrimary: () => void + onSkip: () => void }) { + const isWelcome = step === "welcome" + const primaryLabel = + step === "welcome" + ? "Start setup" + : step === "tools" + ? toolsConnected + ? "Continue" + : "Skip tools" + : step === "filesystem" + ? filesystemMounted + ? "Continue" + : "Skip for now" + : "Open Supermemory" + return ( -
- - -
+ ) }