diff --git a/apps/desktop/src/components/desktop-onboarding-overlay.tsx b/apps/desktop/src/components/desktop-onboarding-overlay.tsx index 9ebec685221..3c9455f1172 100644 --- a/apps/desktop/src/components/desktop-onboarding-overlay.tsx +++ b/apps/desktop/src/components/desktop-onboarding-overlay.tsx @@ -1,6 +1,7 @@ import { useStore } from '@nanostores/react' import { useEffect, useMemo, useRef, useState } from 'react' +import { ModelPickerDialog } from '@/components/model-picker' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Check, ChevronLeft, ChevronRight, ExternalLink, KeyRound, Loader2, Sparkles } from '@/lib/icons' @@ -9,6 +10,7 @@ import { $desktopBoot, type DesktopBootState } from '@/store/boot' import { $desktopOnboarding, cancelOnboardingFlow, + confirmOnboardingModel, copyDeviceCode, copyExternalCommand, type OnboardingContext, @@ -18,6 +20,7 @@ import { saveOnboardingApiKey, setOnboardingCode, setOnboardingMode, + setOnboardingModel, startProviderOAuth, submitOnboardingCode } from '@/store/onboarding' @@ -394,11 +397,15 @@ function FlowPanel({ ctx, flow }: { ctx: OnboardingContext; flow: OnboardingFlow return (
- {title} connected. You're ready to chat. + {title} connected. Picking a default model...
) } + if (flow.status === 'confirming_model') { + return + } + if (flow.status === 'error') { return (
@@ -526,6 +533,69 @@ function CancelBtn({ size = 'default' }: { size?: 'default' | 'sm' }) { ) } +function ConfirmingModelPanel({ + ctx, + flow +}: { + ctx: OnboardingContext + flow: Extract +}) { + // Local state controls whether the model picker dialog is open. + // We reuse the existing ModelPickerDialog component (the same picker + // available from the chat shell) rather than building an inline + // dropdown — gives us search, multi-provider listing if relevant, and + // a familiar UI for users who'll see this picker again later. + const [pickerOpen, setPickerOpen] = useState(false) + + return ( +
+
+ + {flow.label} connected. +
+ +
+
+
+

Default model

+

{flow.currentModel}

+
+ +
+
+ +
+ +
+ + {/* + ModelPickerDialog defaults to z-130 on its content, which renders + UNDER the onboarding overlay (z-1300) and breaks pointer events. + Bump it above with z-[1310] so the picker sits on top of the + onboarding panel. The dialog's own dim-backdrop layer stays at + its default z-120 — the onboarding overlay is already dimming + the rest of the screen, so we don't want a second backdrop. + */} + { + void setOnboardingModel(model) + setPickerOpen(false) + }} + open={pickerOpen} + /> +
+ ) +} + function DocsLink({ children, href }: { children: React.ReactNode; href: string }) { return (