feat(04-04): wire ReviewStep as step index 3; add 'Review' label to StepIndicator

- Import ReviewStep in App.tsx and add as steps[3]
- Update STEP_LABELS in StepIndicator.tsx to include 'Review' as fourth entry
- Update comment: 1.Backend > 2.Remote Config > 3.Deployment > 4.Review
- Full npm test suite (98 tests, 12 files) remains GREEN
This commit is contained in:
2026-03-27 11:55:46 +01:00
parent e7dcf30c3a
commit 035c17071b
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import { StepIndicator } from './components/wizard/StepIndicator';
import { BackendSelectionStep } from './components/wizard/BackendSelectionStep';
import { RemoteConfigStep } from './components/wizard/RemoteConfigStep';
import { DeploymentStep } from './components/wizard/DeploymentStep';
import { ReviewStep } from './components/wizard/ReviewStep';
function WizardShell() {
const { state } = useWizard();
@@ -17,9 +18,10 @@ function WizardShell() {
// Key on backendType to force remount when backend changes — prevents stale form values
<RemoteConfigStep key={state.remote.backendType ?? 'none'} />,
<DeploymentStep key="deployment" />,
<ReviewStep key="review" />,
];
// Guard: clamp to valid range (phase 4 will add step 3 for review/download)
// Guard: clamp to valid range
const stepIndex = Math.min(state.currentStep, steps.length - 1);
const CurrentStep = steps[stepIndex];
+2 -2
View File
@@ -1,11 +1,11 @@
// src/components/wizard/StepIndicator.tsx
// Breadcrumb navigation — 1.Backend > 2.Remote Config > 3.Deployment
// Breadcrumb navigation — 1.Backend > 2.Remote Config > 3.Deployment > 4.Review
// Completed steps are clickable. Clicking step 0 also clears remote.params (SET_REMOTE_PARAMS({})).
// CRITICAL: never dispatches RESET — deployment options must be preserved on back navigation.
import { useWizard } from '../../store/context';
const STEP_LABELS = ['Backend', 'Remote Config', 'Deployment'];
const STEP_LABELS = ['Backend', 'Remote Config', 'Deployment', 'Review'];
export function StepIndicator() {
const { state, dispatch } = useWizard();