--- phase: 03-wizard-ui plan: "05" type: execute wave: 4 depends_on: - "03-03" - "03-04" files_modified: - src/components/wizard/DeploymentStep.tsx - src/components/wizard/StepIndicator.tsx - src/App.tsx autonomous: false requirements: - WIZD-02 - WIZD-03 must_haves: truths: - "App.tsx renders BackendSelectionStep for currentStep 0, RemoteConfigStep for step 1, DeploymentStep for step 2" - "StepIndicator shows 3 labeled steps with checkmarks on completed steps" - "Clicking a completed step in StepIndicator dispatches SET_STEP — clicking step 0 also dispatches SET_REMOTE_PARAMS({})" - "DeploymentStep renders includeInstall toggle, configPath radio group, and scriptTargets checkboxes" - "DeploymentStep dispatches SET_DEPLOYMENT on each change, keeping deployment state in sync" - "Full forward + backward wizard navigation works without losing entered data in any step" artifacts: - path: "src/components/wizard/DeploymentStep.tsx" provides: "Step 2 — deployment options (includeInstall, configPath, scriptTargets)" exports: ["DeploymentStep"] - path: "src/components/wizard/StepIndicator.tsx" provides: "Breadcrumb navigation — 1.Backend > 2.Remote Config > 3.Deployment" exports: ["StepIndicator"] - path: "src/App.tsx" provides: "Step router — renders correct step component by currentStep" key_links: - from: "src/App.tsx" to: "src/components/wizard/BackendSelectionStep.tsx" via: "STEPS[0] — renders when currentStep === 0" pattern: "BackendSelectionStep" - from: "src/App.tsx" to: "src/components/wizard/RemoteConfigStep.tsx" via: "STEPS[1] — renders when currentStep === 1, keyed on backendType" pattern: "RemoteConfigStep" - from: "src/components/wizard/StepIndicator.tsx" to: "src/store/context.tsx" via: "dispatches SET_STEP and conditionally SET_REMOTE_PARAMS on back-nav to step 0" pattern: "dispatch.*SET_STEP|SET_REMOTE_PARAMS" - from: "src/components/wizard/DeploymentStep.tsx" to: "src/store/context.tsx" via: "dispatches SET_DEPLOYMENT on every control change" pattern: "dispatch.*SET_DEPLOYMENT" --- Wire the complete wizard: implement DeploymentStep and StepIndicator, then update App.tsx to route between all three steps and render the breadcrumb navigation. Purpose: Satisfies WIZD-02 (multi-step navigation shell) and WIZD-03 (back navigation without data loss). Closes the full wizard loop. Output: DeploymentStep, StepIndicator, App.tsx wired — all tests GREEN. @C:/Users/SebastienQUEROL/.claude/get-shit-done/workflows/execute-plan.md @C:/Users/SebastienQUEROL/.claude/get-shit-done/templates/summary.md @.planning/PROJECT.md @.planning/phases/03-wizard-ui/03-CONTEXT.md @.planning/phases/03-wizard-ui/03-RESEARCH.md @.planning/phases/03-wizard-ui/03-03-SUMMARY.md @.planning/phases/03-wizard-ui/03-04-SUMMARY.md From src/store/types.ts: ```typescript export interface WizardState { currentStep: number; // 0=Backend, 1=RemoteConfig, 2=Deployment remote: { name: string; backendType: BackendType | null; params: Record; }; deployment: { includeInstall: boolean; // toggle — default: false configPath: 'machine-wide' | 'user-profile'; // radio — default: 'machine-wide' scriptTargets: ('intune' | 'rmm')[]; // checkboxes — default: both selected }; } // Deploy step actions: dispatch({ type: 'SET_DEPLOYMENT', payload: { includeInstall: true } }); dispatch({ type: 'SET_DEPLOYMENT', payload: { configPath: 'user-profile' } }); dispatch({ type: 'SET_DEPLOYMENT', payload: { scriptTargets: ['intune'] } }); // Back-nav to step 0 (CRITICAL: clears params but NOT deployment): dispatch({ type: 'SET_REMOTE_PARAMS', payload: {} }); dispatch({ type: 'SET_STEP', payload: 0 }); ``` From src/store/context.tsx: ```typescript export function useWizard(): { state: WizardState; dispatch: React.Dispatch } ``` Step routing pattern (from RESEARCH.md): ```tsx // App.tsx step routing import { BackendSelectionStep } from './components/wizard/BackendSelectionStep'; import { RemoteConfigStep } from './components/wizard/RemoteConfigStep'; import { DeploymentStep } from './components/wizard/DeploymentStep'; import { StepIndicator } from './components/wizard/StepIndicator'; // Key RemoteConfigStep on backendType to force remount on backend change (Pitfall 1 fix) const STEPS = [ () => , () => , () => , ]; ``` StepIndicator back-nav pattern (from RESEARCH.md): ```tsx const handleStepClick = (targetStep: number) => { if (targetStep === 0 && state.currentStep > 0) { dispatch({ type: 'SET_REMOTE_PARAMS', payload: {} }); // clear params (backend may change) // Do NOT dispatch RESET — deployment options must be preserved } dispatch({ type: 'SET_STEP', payload: targetStep }); }; ``` Task 1: Implement DeploymentStep and StepIndicator src/components/wizard/DeploymentStep.tsx, src/components/wizard/StepIndicator.tsx DeploymentStep: - Renders an "Include rclone installation" toggle (checkbox or switch); state.deployment.includeInstall default false - Renders a "Config deployment path" radio group: 'machine-wide' (C:\ProgramData\rclone\) and 'user-profile' (%APPDATA%\rclone\); default machine-wide - Renders a "Script targets" checkbox group: 'intune' and 'rmm' checkboxes; both checked by default - Each control dispatches SET_DEPLOYMENT immediately on change (live sync, no Next button needed for deployment options) - Renders a "Back" button that dispatches SET_STEP(1) and a "Next / Review" button that dispatches SET_STEP(3) to advance to Phase 4's review step StepIndicator: - Renders three labeled steps: "1. Backend", "2. Remote Config", "3. Deployment" - Current step is bold/active - Completed steps (step index < currentStep) show a checkmark prefix and are clickable buttons - Future steps are not clickable (non-interactive) - Clicking a completed step that is NOT step 0 dispatches only SET_STEP(targetStep) - Clicking step 0 dispatches SET_REMOTE_PARAMS({}) THEN SET_STEP(0) — clears params for potential backend change - Does NOT dispatch RESET on any click Create `src/components/wizard/DeploymentStep.tsx`: - Uses `useWizard()` to read `state.deployment` and `dispatch` - Does NOT use react-hook-form — deployment fields dispatch directly via onChange handlers - `includeInstall` toggle: ` dispatch({ type: 'SET_DEPLOYMENT', payload: { includeInstall: e.target.checked } })} />` - `configPath` radios: two `` elements for 'machine-wide' and 'user-profile' - `scriptTargets` checkboxes: two `` for 'intune' and 'rmm' — on change, compute new array and dispatch SET_DEPLOYMENT - Back button: `dispatch({ type: 'SET_STEP', payload: 1 })` - Next button: `dispatch({ type: 'SET_STEP', payload: 3 })` — step 3 is Phase 4's review/download (placeholder for now) Create `src/components/wizard/StepIndicator.tsx`: - Uses `useWizard()` to read `state.currentStep` - Renders a horizontal breadcrumb with separators (›) - Step labels: `['Backend', 'Remote Config', 'Deployment']` - For each step index i: - If i < currentStep: completed — render as `