Commit Graph
66 Commits
Author SHA1 Message Date
kawa cf06d72945 test(03-03): add failing tests for BackendSelectionStep (WIZD-01, WIZD-04)
- Replace expect.fail stubs with real test assertions
- Tests cover card render order, card click dispatch, name validation
- RED: component file does not exist yet
2026-03-27 09:32:35 +01:00
kawa 1c9c337d3f feat(03-02): create FieldRenderer and AzureAuthToggle
- FieldRenderer: registry-driven input renderer (text, password, select, hidden provider)
- AzureAuthToggle: segmented SAS/Key toggle, defaults to SAS, both fields always registered via CSS show/hide
- Both fields preserved on toggle (no conditional rendering that would lose react-hook-form state)
2026-03-27 09:29:51 +01:00
kawa cec45e8f17 feat(03-02): create BackendCard and PasswordField UI atoms
- BackendCard: clickable selection card with selected/unselected visual states
- PasswordField: password input with per-instance show/hide toggle (text labels, no emoji)
- Both files in new src/components/ui/ directory
2026-03-27 09:29:08 +01:00
kawa 153bc61f8a test(03-01): add Wave 0 RED baseline stubs for all 7 requirements
- src/App.test.tsx: WIZD-02 step routing (3 stubs)
- src/components/wizard/BackendSelectionStep.test.tsx: WIZD-01, WIZD-04 (10 stubs)
- src/components/wizard/RemoteConfigStep.test.tsx: BACK-01, BACK-02, BACK-03 (8 stubs)
- src/components/wizard/StepIndicator.test.tsx: WIZD-03 (5 stubs)
- All 26 tests fail RED with descriptive 'not yet implemented' messages
2026-03-27 09:26:06 +01:00
kawa 1e1ac25ea3 feat(02-04): implement buildRmmScript pure function
- Imports CONFIG_DIR and buildRcloneInstallBlock from ps-helpers.ts
- Uses \$ErrorActionPreference = 'Stop' for RMM platform exit code surfacing
- Creates config directory idempotently with Test-Path guard
- Writes rclone.conf using [System.IO.File]::WriteAllText UTF-8 no-BOM
- Conditionally includes rclone download block based on includeInstall flag
- All 6 rmm-script.test.ts assertions pass GREEN
2026-03-26 14:06:51 +01:00
kawa 495be0cd11 feat(02-03): implement buildIntuneInstall and buildIntuneDetection
- buildIntuneInstall: UTF-8 no-BOM write via WriteAllText, PS here-string for config, conditional rclone download block
- buildIntuneDetection: no $ErrorActionPreference, Write-Output + exit 0/1 pattern
- Both generators use CONFIG_DIR from ps-helpers for consistent path resolution
- All 15 intune-install and intune-detection tests pass GREEN
2026-03-26 14:06:45 +01:00
kawa 6a7912daae feat(02-03): create ps-helpers.ts shared module
- Export CONFIG_DIR record mapping configPath to Windows paths
- Export buildRcloneInstallBlock for conditional rclone binary download
- machine-wide maps to C:\ProgramData\rclone
- user-profile maps to %APPDATA%\rclone
- Uses -UseBasicParsing for SYSTEM context safety
2026-03-26 10:56:43 +01:00
kawa e3615c446c feat(02-02): implement buildRcloneConf pure function
- Maps BackendType to rclone INI type strings via RCLONE_TYPE_MAP
- s3-compatible correctly maps to type = s3 (not s3-compatible)
- Omits empty param values from output (no 'sas_url =' when blank)
- Throws on null backendType or empty remote name
- All 17 rclone-conf.test.ts assertions pass GREEN
2026-03-26 10:56:42 +01:00
kawa cc53bc014f feat(02-01): create generators barrel index.ts
- Re-exports buildRcloneConf, buildIntuneInstall, buildIntuneDetection, buildRmmScript
- Phase 4 will import all generators from this single entry point
- No implementation logic — purely structural re-exports
2026-03-26 10:53:49 +01:00
kawa 964022b5fc test(02-01): add failing test stubs for all four generators
- rclone-conf.test.ts: azureblob/s3/s3-compatible fixtures, error cases
- intune-install.test.ts: configPath, includeInstall, UTF-8 write, credential safety
- intune-detection.test.ts: configPath, exit codes, stdout only (no STDERR contamination)
- rmm-script.test.ts: configPath, includeInstall, ErrorActionPreference=Stop
2026-03-26 10:53:34 +01:00
kawa 2eef7225da feat(01-04): create WizardContext provider and wire into App
- Create src/store/context.tsx: WizardContext, WizardProvider, useWizard hook
- useWizard throws if used outside WizardProvider (prevents silent undefined state bugs)
- Update src/App.tsx to wrap content in WizardProvider
- npm run build exits 0 with no TypeScript errors
2026-03-26 10:24:32 +01:00
kawa 3fade79ea1 feat(01-04): implement WizardState types and pure reducer
- Create src/store/types.ts: WizardState interface, WizardAction union type, INITIAL_STATE constant
- Create src/store/reducer.ts: pure wizardReducer handling SET_STEP, SET_BACKEND_TYPE, SET_REMOTE_NAME, SET_REMOTE_PARAMS, SET_DEPLOYMENT, RESET
- All 8 reducer tests GREEN
- No localStorage/sessionStorage access (SECU-03 compliant)
2026-03-26 10:23:53 +01:00
kawa eaeae32849 feat(01-03): implement BACKEND_SCHEMAS Zod schema builder
- buildZodSchema derives z.object() from BACKEND_REGISTRY field definitions
- required fields map to z.string().min(1, label) — optional to z.string().optional()
- BACKEND_SCHEMAS exported with entries for azureblob, s3, s3-compatible
- BackendFormValues<T> utility type infers TypeScript type from schema
- No hardcoded field names — all shapes derived from registry loop
- All 8 tests in index.test.ts pass (GREEN)
2026-03-26 10:21:11 +01:00
kawa 9e28bf9ece test(01-02): add Wave 0 TDD stubs for SC-3 (Zod schemas) and SC-4 (wizard reducer)
- src/schemas/index.test.ts: 8 tests defining acceptance criteria for BACKEND_SCHEMAS (Plan 03)
- src/store/reducer.test.ts: 8 tests defining acceptance criteria for wizardReducer (Plan 04)
- Both files fail with "Cannot find module" — correct RED phase, implementation deferred to Plans 03-04
2026-03-26 10:17:35 +01:00
kawa 4c614fc06c feat(01-02): create Backend Schema Registry with rclone-compatible field definitions
- BackendType union: 'azureblob' | 's3' | 's3-compatible'
- FieldDef interface with key (snake_case rclone key), label, inputType, required, and optional fields
- BACKEND_REGISTRY: azureblob (3 fields), s3 (4 fields), s3-compatible (5 fields)
- All FieldDef.key values match rclone INI config key names exactly
- registry.test.ts: 7 tests all passing (GREEN)
2026-03-26 10:16:49 +01:00
kawa 237d06b8f7 feat(01-01): scaffold Vite 6 + React 18 + TypeScript 5 project
- Created Vite 6 project with React 18 and TypeScript 5 template
- Installed zod, react-hook-form, @hookform/resolvers (production)
- Installed tailwindcss @tailwindcss/vite (Tailwind v4 via Vite plugin)
- Installed vitest, @testing-library/react, @testing-library/dom (dev)
- Configured Tailwind v4 via @tailwindcss/vite plugin in vite.config.ts
- Set src/index.css to @import "tailwindcss" (no postcss/tailwind.config.js)
- Created minimal App.tsx with Tailwind classes, .gitignore
- Auto-fix (Rule 1): added src/vite-env.d.ts for CSS module type declarations
2026-03-26 10:12:15 +01:00