docs(05-01): complete registry enrichment plan

- 05-01-SUMMARY.md: BACKEND_REGISTRY enriched, BackendSelectionStep wired to registry, BackendFormValues removed
- STATE.md: progress updated, decision logged, session recorded
- ROADMAP.md: phase 5 plan progress updated (3/4 summaries)
This commit is contained in:
2026-03-30 09:39:47 +02:00
parent fecea60eb0
commit d17476858b
3 changed files with 110 additions and 6 deletions
+1 -1
View File
@@ -78,6 +78,6 @@ Plans:
| 2. Generators | v1.0 | 4/4 | Complete | 2026-03-26 | | 2. Generators | v1.0 | 4/4 | Complete | 2026-03-26 |
| 3. Wizard UI | v1.0 | 5/5 | Complete | 2026-03-27 | | 3. Wizard UI | v1.0 | 5/5 | Complete | 2026-03-27 |
| 4. Review, Download & Security | v1.0 | 5/5 | Complete | 2026-03-27 | | 4. Review, Download & Security | v1.0 | 5/5 | Complete | 2026-03-27 |
| 5. Tech Debt | 2/4 | In Progress| | - | | 5. Tech Debt | 3/4 | In Progress| | - |
| 6. New Backends | v1.1 | 0/TBD | Not started | - | | 6. New Backends | v1.1 | 0/TBD | Not started | - |
| 7. Validation & UX Polish | v1.1 | 0/TBD | Not started | - | | 7. Validation & UX Polish | v1.1 | 0/TBD | Not started | - |
+7 -5
View File
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
milestone: v1.1 milestone: v1.1
milestone_name: Backlog & Tech Debt milestone_name: Backlog & Tech Debt
status: planning status: planning
stopped_at: Completed 05-tech-debt 05-02-PLAN.md stopped_at: Completed 05-tech-debt 05-01-PLAN.md
last_updated: "2026-03-30T07:38:40.209Z" last_updated: "2026-03-30T07:39:32.011Z"
last_activity: 2026-03-27 — v1.1 roadmap created, 11 requirements mapped across 3 phases last_activity: 2026-03-27 — v1.1 roadmap created, 11 requirements mapped across 3 phases
progress: progress:
total_phases: 3 total_phases: 3
completed_phases: 0 completed_phases: 0
total_plans: 4 total_plans: 4
completed_plans: 2 completed_plans: 3
percent: 0 percent: 0
--- ---
@@ -50,6 +50,7 @@ Progress: [░░░░░░░░░░] 0% (v1.1)
*Updated after each plan completion* *Updated after each plan completion*
| Phase 05-tech-debt P00 | 3 | 2 tasks | 2 files | | Phase 05-tech-debt P00 | 3 | 2 tasks | 2 files |
| Phase 05-tech-debt P02 | 4min | 1 tasks | 1 files | | Phase 05-tech-debt P02 | 4min | 1 tasks | 1 files |
| Phase 05-tech-debt P01 | 5 | 2 tasks | 4 files |
## Accumulated Context ## Accumulated Context
@@ -66,6 +67,7 @@ Recent decisions affecting v1.1 work:
- [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]: 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]: 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 - [Phase 05-tech-debt]: Keep useMemo calls for all scripts even when OutputBlocks hidden — ZIP handler always needs the content for dynamic bundle building
- [Phase 05-tech-debt]: BACKEND_REGISTRY shape enriched to { displayName, description, fields } — registry is single source of truth for display AND field data; BackendSelectionStep wired via Object.entries(BACKEND_REGISTRY)
### Pending Todos ### Pending Todos
@@ -80,6 +82,6 @@ None yet.
## Session Continuity ## Session Continuity
Last session: 2026-03-30T07:38:40.203Z Last session: 2026-03-30T07:39:32.005Z
Stopped at: Completed 05-tech-debt 05-02-PLAN.md Stopped at: Completed 05-tech-debt 05-01-PLAN.md
Resume file: None Resume file: None
@@ -0,0 +1,102 @@
---
phase: 05-tech-debt
plan: "01"
subsystem: ui
tags: [react, typescript, zod, registry, backend-selection]
# Dependency graph
requires:
- phase: 05-tech-debt
provides: Wave-0 TDD stubs for registry shape and consumer access patterns (05-00)
provides:
- BACKEND_REGISTRY enriched with displayName, description, fields shape
- BackendSelectionStep driven by Object.entries(BACKEND_REGISTRY) — no hardcoded BACKENDS
- schemas/index.ts using .fields access
- RemoteConfigStep.tsx using .fields access
- Dead BackendFormValues<T> export removed from schemas/index.ts
affects: [06-new-backends, phase-6, BackendSelectionStep, RemoteConfigStep, schemas]
# Tech tracking
tech-stack:
added: []
patterns:
- "Registry-driven UI: Object.entries(BACKEND_REGISTRY) replaces hardcoded arrays — adding a backend to registry auto-surfaces in UI with zero additional UI code"
- ".fields access: all consumers use BACKEND_REGISTRY[type].fields, not the registry entry directly"
key-files:
created: []
modified:
- src/schemas/registry.ts
- src/schemas/index.ts
- src/components/wizard/RemoteConfigStep.tsx
- src/components/wizard/BackendSelectionStep.tsx
key-decisions:
- "Registry shape change to { displayName, description, fields } makes the registry the single source of truth for both field definitions AND display metadata"
- "displayName and description strings preserved exactly as in the former BACKENDS const to keep test assertions green without changes"
- "BackendFormValues<T> removed — confirmed no consumers existed (tsc --noEmit: zero errors)"
patterns-established:
- "Registry-driven card list: Object.entries(BACKEND_REGISTRY).map(([type, entry]) => <BackendCard ... />)"
- ".fields access pattern: BACKEND_REGISTRY[backendType].fields for all field iteration"
requirements-completed: [TECH-03, TECH-04]
# Metrics
duration: 5min
completed: 2026-03-30
---
# Phase 5 Plan 01: Registry Enrichment & BackendSelectionStep Wiring Summary
**BACKEND_REGISTRY enriched with displayName/description/fields, BackendSelectionStep driven by Object.entries(BACKEND_REGISTRY), and dead BackendFormValues<T> export removed**
## Performance
- **Duration:** ~5 min
- **Started:** 2026-03-30T09:36:00Z
- **Completed:** 2026-03-30T09:39:00Z
- **Tasks:** 2
- **Files modified:** 4
## Accomplishments
- Changed BACKEND_REGISTRY from `Record<BackendType, FieldDef[]>` to `Record<BackendType, { displayName, description, fields: FieldDef[] }>`
- BackendSelectionStep now uses `Object.entries(BACKEND_REGISTRY)` — Phase 6 new backends auto-appear in UI with zero additional UI code
- All consumers (schemas/index.ts, RemoteConfigStep.tsx) updated to `.fields` access
- Dead `BackendFormValues<T>` export removed from schemas/index.ts — no consumers existed
## Task Commits
Each task was committed atomically:
1. **Task 1: Enrich BACKEND_REGISTRY and update all consumers** - `d495552` (feat)
2. **Task 2: Wire BackendSelectionStep to registry + remove dead export** - `52318d5` (feat)
## Files Created/Modified
- `src/schemas/registry.ts` - Changed shape from flat FieldDef[] to { displayName, description, fields: FieldDef[] }
- `src/schemas/index.ts` - Updated `.fields` access in buildZodSchema; removed BackendFormValues<T> export
- `src/components/wizard/RemoteConfigStep.tsx` - Updated two `.fields` accesses
- `src/components/wizard/BackendSelectionStep.tsx` - Replaced BACKENDS const with Object.entries(BACKEND_REGISTRY), added BACKEND_REGISTRY import
## Decisions Made
- displayName and description strings preserved exactly from the former hardcoded BACKENDS const so all test assertions remain green without modifying tests
- BackendFormValues<T> removed with confidence after tsc --noEmit confirmed zero usages
## 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-03 and TECH-04 complete; registry is now the single source of truth for display + field data
- Phase 6 (New Backends) can add a backend by adding one entry to BACKEND_REGISTRY — it auto-surfaces in BackendSelectionStep, buildZodSchema, and RemoteConfigStep with no additional UI changes
- Plan 05-02 (ReviewStep scriptTargets filtering) is independent and can proceed
---
*Phase: 05-tech-debt*
*Completed: 2026-03-30*