Commit Graph
38 Commits
Author SHA1 Message Date
Robert Bond 05d83822f2 Merged PR 2261: added in text and ui redesign for rep type selection
added in text and ui redesign for rep type selection

Related work items: #22574
2026-04-21 04:59:01 +00:00
Robert Bond 37a81522d5 Merged PR 2260: refactor(representations): complete slice-based refactor of representations flow
## Representations Refactor — Behaviour-Preserving Structural Improvements

This PR delivers a full refactor of the representations flow, improving structure, readability, and maintainability while preserving all existing behaviour.

The work was completed using a controlled, slice-based approach with strict guardrails and regression validation at each step. No changes have been made to user journeys, payloads, routing, or EN/CY behaviour.

The result is a cleaner, more maintainable codebase with reduced coupling and clearer separation of concerns, ready for future enhancements without increased risk.

---

## What Was Done

The refactor was delivered incrementally across the following slices:

- **R1** — Representation entry logic extraction
- **R2** — Page loader separation (SSR/data orchestration)
- **R3** — Journey step resolution extraction
- **R4** — Flow shell decomposition
- **R5** — Representation elements normalisation
- **R6** — Data/service layer cleanup
- **R7** — Summary rendering proof slice
- **R8** — Submission/finalisation boundary isolation
- **R9** — Summary rollout (Batch 1)

Each slice:
- was isolated to a single concern
- followed strict guardrails
- was validated before merge

Full detail is available in:
`context/representations-refactor-tracker.md`

---

## Key Improvements

- Reduced coupling across the representations journey
- Separated data loading, orchestration, and rendering concerns
- Simplified complex conditional logic into testable helpers
- Standardised summary rendering using shared primitives (`SummaryCard`, `SummaryRow`)
- Isolated submission/finalisation sequencing into explicit boundaries
- Improved overall readability and maintainability

---

## Behaviour Preservation

This refactor does **not** change:

- User journeys (APP / IP / Agent / LPA)
- Route and query behaviour
- Payload contracts and API interactions
- Redux state shape and usage
- Validation rules and messaging
- EN/CY behaviour
- File upload / PDF / email sequencing
- Linked-case logic

All changes are structural only.

---

## Validation

### Automated

- `npm run lint` — passed (warnings only, no new errors)
- `npm run test:reps` — passed (7/7)

### Manual

Validated end-to-end across:

- APP
- IP
- Agent
- LPA

Including:

- representation creation
- editing/resuming representations
- submission flow
- confirmation/completion behaviour
- summary rendering across case types
- EN/CY parity

---

## Risk Management

The refactor targeted several high-risk areas:

- Case summary entry logic
- Representation submission/finalisation sequencing
- Dual-mode entry (new vs existing representation)

Risk was controlled through:

- small, incremental slices
- one branch per slice
- regression validation per slice
- strict behaviour-preservation guardrails
- controlled rollout for summary rendering changes

---

## Reviewer Guidance

Suggested areas to focus on:

- End-to-end representation journey (create → submit → complete)
- S...
2026-04-20 13:09:07 +00:00
robbond 92ceacb57b Merge branch 'Development' into SIPS-Development 2025-08-20 12:11:55 +01:00
robbond 6fa2418b19 use ticketnumber not ref/title/pinswg_name 2025-08-12 07:20:17 +01:00
robbond eae42c3622 16435 logic to disable continue button so cant submit empty rep 2025-04-28 17:14:59 +01:00
robbond cf0c05ff6a removed comments 2025-04-16 14:55:06 +01:00
robbond 665c4bbba5 uat defect 124, rep defect 11, questionnaire defect 26 2025-01-13 18:21:40 +00:00
robbond 714470faaa rep defect 22 2025-01-03 08:23:21 +00:00
robbond 97cfeb562a upodated rep file upload 2024-12-18 12:39:17 +00:00
robbond f44725ee5e rep defect 6 2024-12-10 15:06:40 +00:00
robbond b668f323fe fix for new appeal and reps updates 2024-12-04 19:30:18 +00:00
robbond e690bc6725 moved alot of stuff from client side 2024-11-18 19:54:23 +00:00
robbond a752443ad9 fix for files in reps 2024-11-11 16:01:40 +00:00
robbond c869fdc6c4 mycase links failed... so fixed 2024-11-07 07:53:48 +00:00
robbond a1524c5018 added caseinvolvement api for rep 2024-10-16 12:41:37 +01:00
robbond 062d8e8cb5 apply GEL to reps 2024-10-01 13:51:36 +01:00
robbond b0e2bb6e14 remove unused imports 2024-06-19 06:32:38 +01:00
robbond f8a2d44443 welsh lang updates 2024-06-10 10:36:27 +01:00
robbond 28db6d87f5 conditional display of back link if saved rep 2024-06-06 06:39:34 +01:00
robbond ef2e41a377 reps defects 2024-06-05 06:35:13 +01:00
robbond 53e96b18bd updated to fix breadcrumb 2024-06-04 07:56:35 +01:00
robbond c947995e7b reps defects 2024-06-03 11:57:11 +01:00
robbond 8b385217c3 adjusted timetable to display correct dates 2024-05-28 08:57:02 +01:00
robbond 0e3df85fdc applied reps documents naming conventions 2024-05-14 19:06:20 +01:00
robbond 7dbc978f00 accessibility amends for lpa reps 2024-02-20 13:26:07 +00:00
robbond 87019693e2 linked watched cases for all personnas 2024-02-02 12:30:18 +00:00
robbond b7a643a6b1 cleaned up rep functionality 2024-01-24 14:19:36 +00:00
robbond ccd3b8ffc5 update build id to store version number 2023-12-06 15:20:09 +00:00
robbond 1477ed74e4 welsh versions of questionnaire 2023-10-31 14:12:12 +00:00
robbond c4fcb6fa56 reps questionnaire progress panel 2023-10-24 08:37:22 +01:00
robbond 0c98bcd831 rep pdf questionnaire variants 2023-10-17 09:07:18 +01:00
robbond 1f669a5efe reps pdf upload directory restructure 2023-10-04 14:28:56 +01:00
robbond 41847b3433 create pdf reps for lpa 2023-09-26 09:12:57 +01:00
robbond ee4d00a500 reps trigger for logged out & upload storage acc 2023-01-05 14:26:08 +00:00
robbond 98aefdd867 reps wip 2022-12-16 11:36:01 +00:00
robbond 96387db56e hide reps button & add rich text for reps 2022-10-12 12:23:26 +01:00
robbond 5fef09f76a added display of representatons on my portal 2021-11-09 15:19:52 +00:00
robbond b3fe6bf5f5 base flow for representations 2021-08-09 10:16:54 +01:00