docs(05-02): complete ReviewStep scriptTargets filtering and Back button plan
This commit is contained in:
@@ -78,6 +78,6 @@ Plans:
|
||||
| 2. Generators | v1.0 | 4/4 | Complete | 2026-03-26 |
|
||||
| 3. Wizard UI | v1.0 | 5/5 | Complete | 2026-03-27 |
|
||||
| 4. Review, Download & Security | v1.0 | 5/5 | Complete | 2026-03-27 |
|
||||
| 5. Tech Debt | 1/4 | In Progress| | - |
|
||||
| 5. Tech Debt | 2/4 | In Progress| | - |
|
||||
| 6. New Backends | v1.1 | 0/TBD | Not started | - |
|
||||
| 7. Validation & UX Polish | v1.1 | 0/TBD | Not started | - |
|
||||
|
||||
+8
-5
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
|
||||
milestone: v1.1
|
||||
milestone_name: Backlog & Tech Debt
|
||||
status: planning
|
||||
stopped_at: Completed 05-tech-debt 05-00-PLAN.md
|
||||
last_updated: "2026-03-30T07:35:11.136Z"
|
||||
stopped_at: Completed 05-tech-debt 05-02-PLAN.md
|
||||
last_updated: "2026-03-30T07:38:40.209Z"
|
||||
last_activity: 2026-03-27 — v1.1 roadmap created, 11 requirements mapped across 3 phases
|
||||
progress:
|
||||
total_phases: 3
|
||||
completed_phases: 0
|
||||
total_plans: 4
|
||||
completed_plans: 1
|
||||
completed_plans: 2
|
||||
percent: 0
|
||||
---
|
||||
|
||||
@@ -49,6 +49,7 @@ Progress: [░░░░░░░░░░] 0% (v1.1)
|
||||
|
||||
*Updated after each plan completion*
|
||||
| Phase 05-tech-debt P00 | 3 | 2 tasks | 2 files |
|
||||
| Phase 05-tech-debt P02 | 4min | 1 tasks | 1 files |
|
||||
|
||||
## Accumulated Context
|
||||
|
||||
@@ -63,6 +64,8 @@ Recent decisions affecting v1.1 work:
|
||||
- [v1.0] Wave 0 TDD stubs written before implementation — continue this pattern in v1.1
|
||||
- [Phase 05-tech-debt]: Use label text not filename text for OutputBlock assertions — filename is a prop, not rendered DOM text
|
||||
- [Phase 05-tech-debt]: WizardConsumerSetup pattern: in-test React component dispatches SET_DEPLOYMENT via useEffect for state injection without changing production code
|
||||
- [Phase 05-tech-debt]: Unmount OutputBlocks entirely (conditional render with &&) not CSS hidden — avoids stale component state when toggling scriptTargets
|
||||
- [Phase 05-tech-debt]: Keep useMemo calls for all scripts even when OutputBlocks hidden — ZIP handler always needs the content for dynamic bundle building
|
||||
|
||||
### Pending Todos
|
||||
|
||||
@@ -77,6 +80,6 @@ None yet.
|
||||
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2026-03-30T07:35:11.133Z
|
||||
Stopped at: Completed 05-tech-debt 05-00-PLAN.md
|
||||
Last session: 2026-03-30T07:38:40.203Z
|
||||
Stopped at: Completed 05-tech-debt 05-02-PLAN.md
|
||||
Resume file: None
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
phase: 05-tech-debt
|
||||
plan: "02"
|
||||
subsystem: ui
|
||||
tags: [react, vitest, testing-library, wizard, scriptTargets]
|
||||
|
||||
# Dependency graph
|
||||
requires:
|
||||
- phase: 05-00
|
||||
provides: TDD stubs for TECH-01 and TECH-02 test cases in ReviewStep.test.tsx
|
||||
provides:
|
||||
- ReviewStep conditionally renders Intune and RMM OutputBlocks based on scriptTargets
|
||||
- ZIP bundle filtered to only include files for selected script targets
|
||||
- Back button on ReviewStep dispatching SET_STEP(2)
|
||||
affects: [03-wizard-ui, 06-new-backends]
|
||||
|
||||
# Tech tracking
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns:
|
||||
- "scriptTargets.includes() boolean derivation drives conditional rendering (unmount, not CSS)"
|
||||
- "handleDownloadZip builds files array dynamically from showIntune/showRmm booleans"
|
||||
- "Back button pattern from DeploymentStep: dispatch SET_STEP(payload) in onClick"
|
||||
|
||||
key-files:
|
||||
created: []
|
||||
modified:
|
||||
- src/components/wizard/ReviewStep.tsx
|
||||
|
||||
key-decisions:
|
||||
- "Unmount OutputBlocks entirely (conditional render with &&) — not CSS hidden — so no stale state is preserved when toggling"
|
||||
- "useMemo calls for intuneInstall/intuneDetection/rmmScript are KEPT even when blocks are hidden — needed for ZIP handler"
|
||||
- "rclone.conf OutputBlock always rendered regardless of scriptTargets — only script outputs are conditional"
|
||||
- "Back button placed before ZIP button, follows identical className/dispatch pattern from DeploymentStep"
|
||||
|
||||
patterns-established:
|
||||
- "showIntune/showRmm boolean pattern: derive from state.deployment.scriptTargets.includes() — use same pattern in future conditional script output features"
|
||||
|
||||
requirements-completed: [TECH-01, TECH-02]
|
||||
|
||||
# Metrics
|
||||
duration: 4min
|
||||
completed: 2026-03-30
|
||||
---
|
||||
|
||||
# Phase 5 Plan 02: ReviewStep scriptTargets Filtering and Back Button Summary
|
||||
|
||||
**ReviewStep conditionally unmounts Intune/RMM OutputBlocks via scriptTargets booleans, filters ZIP bundle to match, and adds a Back button dispatching SET_STEP(2)**
|
||||
|
||||
## Performance
|
||||
|
||||
- **Duration:** ~4 min
|
||||
- **Started:** 2026-03-30T09:36:00Z
|
||||
- **Completed:** 2026-03-30T09:37:30Z
|
||||
- **Tasks:** 1 (TDD: RED confirmed, GREEN implemented)
|
||||
- **Files modified:** 1
|
||||
|
||||
## Accomplishments
|
||||
- ReviewStep now reads scriptTargets from state and derives showIntune/showRmm booleans
|
||||
- Intune Install and Detection OutputBlocks are conditionally unmounted (not CSS-hidden) when showIntune is false
|
||||
- RMM OutputBlock is conditionally unmounted when showRmm is false
|
||||
- handleDownloadZip builds its files array dynamically — ZIP always has rclone.conf, plus intune/rmm files only if selected
|
||||
- Back button added following DeploymentStep pattern, dispatching SET_STEP(2)
|
||||
- All 15 ReviewStep tests green (10 pre-existing + 5 new TECH-01/TECH-02 cases); 104 total tests pass with no regressions
|
||||
|
||||
## Task Commits
|
||||
|
||||
Each task was committed atomically:
|
||||
|
||||
1. **Task 1: Add scriptTargets filtering and Back button to ReviewStep** - `214a68e` (feat)
|
||||
|
||||
**Plan metadata:** (docs commit follows)
|
||||
|
||||
_Note: TDD task — RED state confirmed (5 failing), then GREEN via implementation._
|
||||
|
||||
## Files Created/Modified
|
||||
- `src/components/wizard/ReviewStep.tsx` - Added dispatch destructuring, showIntune/showRmm booleans, conditional OutputBlock rendering, dynamic ZIP handler, and Back button
|
||||
|
||||
## Decisions Made
|
||||
- Kept all useMemo calls (intuneInstall, intuneDetection, rmmScript) even when their OutputBlocks are hidden — they are referenced by the ZIP handler which always needs the content
|
||||
- Used `&&` conditional render (unmount pattern) not CSS `hidden` — consistent with plan spec and avoids preserving stale component state
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
None - plan executed exactly as written.
|
||||
|
||||
## Issues Encountered
|
||||
None
|
||||
|
||||
## User Setup Required
|
||||
None - no external service configuration required.
|
||||
|
||||
## Next Phase Readiness
|
||||
- TECH-01 and TECH-02 requirements now complete — ReviewStep correctly respects scriptTargets selections
|
||||
- Phase 05-03 (if any) can proceed; wizard UI is now consistent across BackendSelectionStep, DeploymentStep, and ReviewStep for scriptTargets
|
||||
- No blockers
|
||||
|
||||
---
|
||||
*Phase: 05-tech-debt*
|
||||
*Completed: 2026-03-30*
|
||||
Reference in New Issue
Block a user