238 lines
6.4 KiB
Markdown
238 lines
6.4 KiB
Markdown
# Representations Refactor Tracker
|
|
|
|
Base branch: `refactor`
|
|
|
|
---
|
|
|
|
## Status
|
|
|
|
Current slice: Slice R9 — Summary Rollout (Batch 1)
|
|
Status: COMPLETE
|
|
|
|
---
|
|
|
|
## Slice List
|
|
|
|
---
|
|
|
|
### Slice R1 — Representation Entry Logic Extraction
|
|
|
|
Status: COMPLETE
|
|
|
|
Notes: Completed in prior refactor slice work; no additional changes required in this closeout.
|
|
|
|
---
|
|
|
|
### Slice R2 — Representation Page Loader Separation
|
|
|
|
Status: COMPLETE
|
|
|
|
Notes: Completed in prior refactor slice work; no additional changes required in this closeout.
|
|
|
|
---
|
|
|
|
### Slice R3 — Journey Step Resolution Extraction
|
|
|
|
Status: COMPLETE
|
|
|
|
Notes: Completed in prior refactor slice work; no additional changes required in this closeout.
|
|
|
|
---
|
|
|
|
### Slice R4 — Flow Shell Decomposition
|
|
|
|
Status: COMPLETE
|
|
|
|
Notes: Completed in prior refactor slice work; no additional changes required in this closeout.
|
|
|
|
**Completion notes (this slice):**
|
|
|
|
- Implemented on feature branch created from `refactor`: `rep-slice-r4-flow-shell`.
|
|
- Extracted render-shell structure from `components/case/representation/index.js` into:
|
|
- `components/case/representation/shell/RepresentationFlowFormStage.js`
|
|
- `components/case/representation/shell/RepresentationTimetablePanel.js`
|
|
- Kept `index.js` as orchestration owner (no side-effect migration):
|
|
- `onHandleSubmit` unchanged in location/ownership
|
|
- `updateRepresentation` unchanged in location/ownership
|
|
- upload/PDF/email sequencing unchanged
|
|
- stage-resolution/questionnaire decisions remain in `index.js`
|
|
- Preserved explicit prop passing; no grouped-prop/view-model abstraction introduced in this slice.
|
|
- Validation evidence:
|
|
- `npm run lint` completed (warnings only, no new errors).
|
|
- `npm run test:reps` completed: **6 passed**.
|
|
- Manual APP/IP/Agent/LPA checks: **passed**.
|
|
- Manual EN/CY parity checks: **passed**.
|
|
|
|
---
|
|
|
|
### Slice R5 — Representation Elements Normalisation
|
|
|
|
Status: COMPLETE
|
|
|
|
Notes: Completed in prior refactor slice work; no additional changes required in this closeout.
|
|
|
|
---
|
|
|
|
### Slice R6 — Async Data / Service Layer Cleanup
|
|
|
|
Status: COMPLETE
|
|
|
|
Notes: Completed in prior refactor slice work; no additional changes required in this closeout.
|
|
|
|
---
|
|
|
|
### Slice R7 — Summary / Case-Type Rendering Simplification (Proof Slice)
|
|
|
|
**Completion notes (this slice):**
|
|
|
|
- Implemented on feature branch created from `refactor`: `rep-slice-r7-summary-rendering-simplification`.
|
|
- Added render-only summary primitives:
|
|
- `components/case/summary/components/SummaryCard.js`
|
|
- `components/case/summary/components/SummaryRow.js`
|
|
- Applied to proof subset:
|
|
- `pinswg_planningappeals78id.js`
|
|
- `pinswg_planningconditionss73s79id.js`
|
|
- Preserved constraints:
|
|
- no translation/date/bilingual logic moved
|
|
- no linked-cases extraction
|
|
- no ordering/visibility changes
|
|
- Validation evidence:
|
|
- `npm run lint` passed (warnings only)
|
|
- `npm run test:reps` passed (**7 passed**)
|
|
- manual APP/IP/Agent/LPA + EN/CY checks passed
|
|
|
|
---
|
|
|
|
### Slice R8 — Submission / Finalisation Boundary Isolation
|
|
|
|
**Completion notes (this slice):**
|
|
|
|
- Implemented on feature branch created from `refactor`: `rep-slice-r8-finalisation-boundary`.
|
|
- Added helper module:
|
|
- `components/case/representation/utils/finalisationBoundary.js`
|
|
- Extracted:
|
|
- `buildRepresentationUpdateBody(...)`
|
|
- `buildSubmitEnrichedValues(...)`
|
|
- `runFinalisationSequence(...)`
|
|
- Preserved:
|
|
- parent-owned branching logic
|
|
- completion-side effects in `representationComplete.js`
|
|
- exact sequencing of finalisation operations
|
|
- Validation evidence:
|
|
- `npm run lint` passed (warnings only)
|
|
- `npm run test:reps` passed (**7 passed**)
|
|
- manual APP/IP/Agent/LPA + EN/CY checks passed
|
|
|
|
---
|
|
|
|
### Slice R9 — Summary Rollout (Batch 1)
|
|
|
|
**Goal:**
|
|
Roll out proven summary rendering primitives across remaining low-risk summary-type files.
|
|
|
|
**Completion notes (this slice):**
|
|
|
|
- Applied `SummaryCard` and `SummaryRow` primitives to Batch 1 summary-type files.
|
|
- Rollout executed incrementally:
|
|
- one summary-type file per commit
|
|
- consistent mechanical application of proven pattern
|
|
- Changes limited strictly to presentational structure:
|
|
- replaced card shell markup with `SummaryCard`
|
|
- replaced row wrapper markup with `SummaryRow` where safe
|
|
- Preserved across all updated files:
|
|
- field visibility rules
|
|
- row and card ordering
|
|
- translation key selection
|
|
- EN/CY branching behaviour
|
|
- date source selection and formatting
|
|
- linked-case logic
|
|
- route/query behaviour
|
|
- payloads and Redux state
|
|
- Parent summary-type files retain all business logic and conditional rendering.
|
|
- Shared components confirmed render-only.
|
|
|
|
**Validation evidence:**
|
|
|
|
- `npm run lint` completed (warnings only, no new errors)
|
|
- `npm run test:reps` passed (**7 passed**)
|
|
- Structured validation confirmed:
|
|
- translation/bilingual logic unchanged
|
|
- date/lookup logic unchanged
|
|
- conditional rendering preserved
|
|
- Targeted manual spot-checks completed:
|
|
- `pinswg_sipscase.js`
|
|
- `pinswg_dnsid.js`
|
|
- `pinswg_electricityactid.js`
|
|
- `pinswg_harbourrevisionorderid.js`
|
|
- No behavioural regressions identified
|
|
|
|
**Outcome:**
|
|
|
|
- Summary rendering layer simplified and standardised
|
|
- Duplication reduced while preserving all behaviour
|
|
- Safer and more maintainable structure
|
|
|
|
**Status: COMPLETE**
|
|
|
|
---
|
|
|
|
## Rules
|
|
|
|
- Only work on ONE slice at a time
|
|
- Do not combine slices
|
|
- One branch per slice (exception: controlled rollout batches)
|
|
- One commit per slice (or per file in rollout batch)
|
|
- Update tracker after slice completion
|
|
- Do not proceed if regression risk exists
|
|
|
|
---
|
|
|
|
## Regression Checklist (Run After Each Slice)
|
|
|
|
### Core Journey
|
|
|
|
- Navigate from case summary → Make representation
|
|
- Select capacity
|
|
- Select representation type
|
|
- Enter content
|
|
- Upload files (if applicable)
|
|
- View check answers
|
|
- Submit representation
|
|
- View confirmation page
|
|
|
|
---
|
|
|
|
### Validation
|
|
|
|
- EN/CY parity maintained
|
|
- No navigation regressions
|
|
- No state inconsistencies
|
|
- No console errors
|
|
|
|
---
|
|
|
|
### Technical
|
|
|
|
- `npm run lint` passes
|
|
- No new warnings/errors introduced
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- CaseSummary is a high-risk entry point
|
|
- Eligibility logic is complex and must not drift
|
|
- Submission flow is highly sensitive
|
|
- Dual-mode entry (new vs existing representation) is a key complexity
|
|
|
|
---
|
|
|
|
## Definition of Done (Per Slice)
|
|
|
|
A slice is complete when:
|
|
|
|
- behaviour is preserved
|
|
- regression checks pass
|
|
- code is cleaner and easier to understand
|
|
- change is small and safe to merge
|