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:
+3
-1
@@ -8,6 +8,7 @@ import { StepIndicator } from './components/wizard/StepIndicator';
|
|||||||
import { BackendSelectionStep } from './components/wizard/BackendSelectionStep';
|
import { BackendSelectionStep } from './components/wizard/BackendSelectionStep';
|
||||||
import { RemoteConfigStep } from './components/wizard/RemoteConfigStep';
|
import { RemoteConfigStep } from './components/wizard/RemoteConfigStep';
|
||||||
import { DeploymentStep } from './components/wizard/DeploymentStep';
|
import { DeploymentStep } from './components/wizard/DeploymentStep';
|
||||||
|
import { ReviewStep } from './components/wizard/ReviewStep';
|
||||||
|
|
||||||
function WizardShell() {
|
function WizardShell() {
|
||||||
const { state } = useWizard();
|
const { state } = useWizard();
|
||||||
@@ -17,9 +18,10 @@ function WizardShell() {
|
|||||||
// Key on backendType to force remount when backend changes — prevents stale form values
|
// Key on backendType to force remount when backend changes — prevents stale form values
|
||||||
<RemoteConfigStep key={state.remote.backendType ?? 'none'} />,
|
<RemoteConfigStep key={state.remote.backendType ?? 'none'} />,
|
||||||
<DeploymentStep key="deployment" />,
|
<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 stepIndex = Math.min(state.currentStep, steps.length - 1);
|
||||||
const CurrentStep = steps[stepIndex];
|
const CurrentStep = steps[stepIndex];
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// src/components/wizard/StepIndicator.tsx
|
// 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({})).
|
// 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.
|
// CRITICAL: never dispatches RESET — deployment options must be preserved on back navigation.
|
||||||
|
|
||||||
import { useWizard } from '../../store/context';
|
import { useWizard } from '../../store/context';
|
||||||
|
|
||||||
const STEP_LABELS = ['Backend', 'Remote Config', 'Deployment'];
|
const STEP_LABELS = ['Backend', 'Remote Config', 'Deployment', 'Review'];
|
||||||
|
|
||||||
export function StepIndicator() {
|
export function StepIndicator() {
|
||||||
const { state, dispatch } = useWizard();
|
const { state, dispatch } = useWizard();
|
||||||
|
|||||||
Reference in New Issue
Block a user