Merged PR 2242: Refactor: New Appeal flow structural cleanup (Slices 1–8, no behaviour change)
## Summary This PR merges the completed new-appeal refactor stream (Slices 1–8) into SIPS-Development. This refactor was executed in controlled slices with regression validation at each step. ## Scope Structural and readability improvements only: - XML/form derivation extraction - payload and file helper extraction - side-effect facade introduction - BuildSection and BuildCheckSection decomposition - BuildCheckRow formatter map refactor - nested prop boundary cleanup - start-flow cleanup (CreateCase / AboutYou) ## Behaviour No intended behavioural changes. The following were explicitly preserved: - S78 journey behaviour - payload shapes and field names/ids - HASCAS mapping logic - appellant/agent branching - validation rules and messages - redirect/query parameters (`lpa`, `apt`, `id`) - navigation and side-effect sequencing - EN/CY output parity ## Validation Full regression has been performed on: - start flow (CreateCase / AboutYou) - save and resume flows - file upload handling - check answers rendering - submit/finalisation sequence - confirmation flow - CRM insertion path - EN/CY parity Additional checks: - docsOffline branch behaviour - completion and partial-save email paths - negative-path validation scenarios - lint (warnings baseline unchanged) ## Risk Low: - changes are structural only - no business logic changes - no contract changes ## Rollback Safe rollback via reverting this merge commit. ## Notes This refactor reduces coupling and prepares the new-appeal flow for future appeal-type expansion. Related work items: #22570, #22576, #22577, #22583, #22586, #22587, #22588, #22590
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
# New Appeal Refactor Tracker
|
||||
|
||||
Base branch for this tracker: `refactor`
|
||||
|
||||
## Status
|
||||
|
||||
Current slice: Slice 8 — Start Flow Cleanup (CreateCase / AboutYou)
|
||||
Status: READY TO START
|
||||
|
||||
---
|
||||
|
||||
## Slice List
|
||||
|
||||
### Slice 1 — XML/Form Derivation Extraction
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
- Extract XML parsing helpers into lib
|
||||
- Keep selectors identical
|
||||
- No behaviour change
|
||||
|
||||
---
|
||||
|
||||
### Slice 2a — Payload Cleanup Helpers
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
- Extract boolean normalization
|
||||
- Extract null/internal key stripping
|
||||
|
||||
---
|
||||
|
||||
### Slice 2b — File Merge/Dedupe Helpers
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
- Extract file list merge logic
|
||||
- Extract dedupe logic
|
||||
|
||||
---
|
||||
|
||||
### Slice 3 — Side Effect Facade
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
- Wrap existing service calls
|
||||
- No logic changes
|
||||
|
||||
---
|
||||
|
||||
### Slice 4 — BuildSection UI Extraction
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
---
|
||||
|
||||
### Slice 5 — BuildCheckSection UI Extraction
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
---
|
||||
|
||||
### Slice 6 — BuildCheckRow Formatter Map
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
---
|
||||
|
||||
### Slice 7 — Props Boundary Cleanup
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
---
|
||||
|
||||
### Slice 8 — Start Flow Cleanup (CreateCase / AboutYou)
|
||||
|
||||
Status: COMPLETE
|
||||
|
||||
---
|
||||
|
||||
## Rules
|
||||
|
||||
- Only work on ONE slice at a time
|
||||
- Do not move to next slice until current is COMPLETE
|
||||
- Do not combine slices
|
||||
- Preserve behaviour at all times
|
||||
|
||||
## Notes
|
||||
|
||||
- Save/resume payload shape is sensitive
|
||||
- File upload logic duplicated in multiple places
|
||||
- BuildSection is highest risk area
|
||||
|
||||
## Regression Checklist (Run After Each Slice)
|
||||
|
||||
- Start new appeal
|
||||
- Save and exit
|
||||
- Resume saved appeal
|
||||
- Navigate sections
|
||||
- Upload file
|
||||
- View check answers
|
||||
- Submit appeal (if safe to test)
|
||||
- View confirmation page
|
||||
- Verify EN/CY parity
|
||||
|
||||
Validation:
|
||||
|
||||
- npm run lint passed
|
||||
- Playwright end-to-end new appeal journey passed
|
||||
- submission completed successfully through CRM insertion
|
||||
Reference in New Issue
Block a user