@@ -71,8 +71,8 @@ import { Input } from "../ui/input";
7171import { Tooltip , TooltipTrigger , TooltipPopup } from "../ui/tooltip" ;
7272import { ScrollArea } from "../ui/scroll-area" ;
7373import { Spinner } from "../ui/spinner" ;
74- import { WizardPanel , WizardSteps } from "../ui/wizard" ;
75- import { Dialog , DialogHeader , DialogPopup , DialogTitle } from "../ui/dialog" ;
74+ import { WizardPanel , WizardSteps , WizardPopup , WizardHeader } from "../ui/wizard" ;
75+ import { Dialog } from "../ui/dialog" ;
7676import { toastManager } from "../ui/toast" ;
7777import { cn } from "../../lib/utils" ;
7878import { formatRelativeTime } from "../../timestampFormat" ;
@@ -183,71 +183,71 @@ export function WelcomeWizard({
183183
184184 return (
185185 < Dialog open disablePointerDismissal onOpenChange = { ( _ , event ) => event . cancel ( ) } >
186- < DialogPopup
187- className = "max-w-xl overflow-x-hidden overflow-y-auto"
186+ < WizardPopup
188187 bottomStickOnMobile = { false }
189188 showCloseButton = { false }
190189 initialFocus = { ( ) => document . getElementById ( "onboarding-pairing-url" ) ?? true }
191190 >
192- < DialogTitle className = "sr-only" > Set up T3 Code </ DialogTitle >
193- < div className = "flex min-h-0 flex-col" >
194- < DialogHeader className = "gap-4" >
191+ < WizardHeader
192+ title = "Set up T3 Code"
193+ identity = {
195194 < div className = "flex items-baseline gap-1.5" role = "img" aria-label = "T3 Code" >
196195 < T3Wordmark className = "h-4 w-auto shrink-0" aria-hidden />
197196 < span className = "text-[1.4rem] font-medium tracking-tight text-muted-foreground" >
198197 Code
199198 </ span >
200199 </ div >
201- < WizardSteps
202- steps = { ONBOARDING_STAGES }
203- currentStep = { stageIndex }
204- isStepDisabled = { ( index ) => isImporting || index >= stageIndex }
205- onStepChange = { ( index ) => {
206- if ( isImporting || index > stageIndex ) return ;
207- setStep ( index === 0 ? "connection" : "agents" ) ;
200+ }
201+ >
202+ < WizardSteps
203+ steps = { ONBOARDING_STAGES }
204+ currentStep = { stageIndex }
205+ isStepDisabled = { ( index ) => isImporting || index >= stageIndex }
206+ onStepChange = { ( index ) => {
207+ if ( isImporting || index > stageIndex ) return ;
208+ setStep ( index === 0 ? "connection" : "agents" ) ;
209+ } }
210+ />
211+ </ WizardHeader >
212+
213+ < WizardPanel holdHeight = { isLoadingProjects } >
214+ { step === "connection" ? (
215+ < ConnectionStep
216+ expandPairingInitially = { ! localAvailable && ! hasCloudPublicConfig ( ) }
217+ selectedIds = { selectedIds }
218+ autoSelectedComputers = { autoSelectedComputers . current }
219+ onSelectionChange = { setSelection }
220+ onToggleEnvironment = { ( environmentId , checked ) =>
221+ setSelection ( ( current ) => {
222+ const next = new Set ( current ?? selectedIds ) ;
223+ if ( checked ) next . add ( environmentId ) ;
224+ else next . delete ( environmentId ) ;
225+ return next ;
226+ } )
227+ }
228+ onContinue = { ( ) =>
229+ startSetup (
230+ environments
231+ . filter ( ( environment ) => selectedIds . has ( environment . environmentId ) )
232+ . map ( ( environment ) => environment . environmentId ) ,
233+ )
234+ }
235+ onPaired = { ( environmentId ) => {
236+ setSelection ( new Set ( [ ...selectedIds , environmentId ] ) ) ;
208237 } }
209238 />
210- </ DialogHeader >
211-
212- < WizardPanel className = "min-w-0" holdHeight = { isLoadingProjects } >
213- { step === "connection" ? (
214- < ConnectionStep
215- expandPairingInitially = { ! localAvailable && ! hasCloudPublicConfig ( ) }
216- selectedIds = { selectedIds }
217- autoSelectedComputers = { autoSelectedComputers . current }
218- onSelectionChange = { setSelection }
219- onToggleEnvironment = { ( environmentId , checked ) =>
220- setSelection ( ( current ) => {
221- const next = new Set ( current ?? selectedIds ) ;
222- if ( checked ) next . add ( environmentId ) ;
223- else next . delete ( environmentId ) ;
224- return next ;
225- } )
226- }
227- onContinue = { ( ) =>
228- startSetup (
229- environments
230- . filter ( ( environment ) => selectedIds . has ( environment . environmentId ) )
231- . map ( ( environment ) => environment . environmentId ) ,
232- )
233- }
234- onPaired = { ( environmentId ) => {
235- setSelection ( new Set ( [ ...selectedIds , environmentId ] ) ) ;
236- } }
237- />
238- ) : step === "agents" ? (
239- < AgentsStep environmentIds = { setupIds } onContinue = { ( ) => setStep ( "import" ) } />
240- ) : (
241- < ImportStep
242- scans = { scans }
243- isImporting = { isImporting }
244- setIsImporting = { setIsImporting }
245- onDone = { finish }
246- />
247- ) }
248- </ WizardPanel >
249- </ div >
250- </ DialogPopup >
239+ ) : step === "agents" ? (
240+ < AgentsStep environmentIds = { setupIds } onContinue = { ( ) => setStep ( "import" ) } />
241+ ) : (
242+ < ImportStep
243+ scans = { scans }
244+ isImporting = { isImporting }
245+ setIsImporting = { setIsImporting }
246+ onDone = { finish }
247+ />
248+ ) }
249+ </ WizardPanel >
250+ </ WizardPopup >
251251 </ Dialog >
252252 ) ;
253253}
0 commit comments