Merged PR 2251: refactor(representations): separate representation page SSR loaders into lib/...
refactor(representations): separate representation page SSR loaders into lib/representation/pageLoaders (Slice R2, behaviour-preserving) Related work items: #22441
This commit is contained in:
@@ -6,7 +6,7 @@ Base branch: `refactor`
|
||||
|
||||
## Status
|
||||
|
||||
Current slice: Slice R1 — Representation Entry Logic Extraction
|
||||
Current slice: Slice R2 — Representation Page Loader Separation
|
||||
Status: COMPLETE
|
||||
|
||||
---
|
||||
@@ -61,6 +61,26 @@ Separate SSR/data-loading paths.
|
||||
- `loadExistingRepresentation()`
|
||||
- `loadNewRepresentation()`
|
||||
|
||||
**Completion notes (this slice):**
|
||||
|
||||
- Extracted representation page SSR/data-loading orchestration into `lib/representation/pageLoaders.js` with:
|
||||
- `loadRepresentationBootstrap({ ctx })`
|
||||
- `loadExistingRepresentation({ store, ctx, bootstrap })`
|
||||
- `loadNewRepresentation({ store, ctx, bootstrap })`
|
||||
- `loadRepresentationPage({ store, ctx })`
|
||||
- Kept `pages/myportal/representation.js` render/UI unchanged and converted `getServerSideProps` to a thin wrapper calling `loadRepresentationPage(...)`.
|
||||
- Preserved behaviour-critical details:
|
||||
- shared pre-branch bootstrap fetch timing
|
||||
- exact branch condition `query.hasOwnProperty("state")`
|
||||
- existing dispatch ordering and payload shapes
|
||||
- existing fallback/data-shape logic and typo-field usage
|
||||
- unchanged SSR returned props (`containerID`, `docsOffline`)
|
||||
- Validation evidence:
|
||||
- `npm run lint` completed (warnings only, no new errors).
|
||||
- `npm run test:reps` re-run completed: **6 passed, 1 failed**.
|
||||
- Failing test: `[chromium] tests/loggedin/raiserep.spec.js:203:5` (`Raise Statement representation as an Interested Party`) with error `no statement option` / missing `Statement` option in combobox.
|
||||
- Manual regression checks confirmed passed (APP/IP/Agent/LPA), including EN/CY parity.
|
||||
|
||||
---
|
||||
|
||||
### Slice R3 — Journey Step Resolution Extraction
|
||||
|
||||
Reference in New Issue
Block a user