Merged PR 2432: Add myportal API grouping facade read slice
Add myportal API grouping facade read slice Related work items: #23754
This commit is contained in:
@@ -20,6 +20,84 @@ Follow-ups:
|
||||
|
||||
### CL-2026-06-25-API-GROUPING-FACADE-SEARCH-VERTICAL-SLICE: active public search results grouping and service adoption
|
||||
|
||||
### CL-2026-06-25-API-GROUPING-FACADE-MYPORTAL-READS-VERTICAL-SLICE: bounded myportal dashboard CRM read/enrichment grouping and service adoption
|
||||
|
||||
date: 2026-06-25
|
||||
author: Cline
|
||||
scope: `pages/api/myportal/get-my-cases.js`, `pages/api/myportal/get-my-lpa-cases.js`, `pages/api/myportal/get-portal-module-details.js`, `actions/services/portalDirectService.js`, `actions/services/caseDirectService.js`, `tests/phase22/api-grouping-facade-myportal-reads.test.cjs`, `context/api-grouping-adoption-roadmap.md`
|
||||
type: change
|
||||
rationale: Implement the next additive API grouping façade vertical slice for the bounded My Portal dashboard read / enrichment journey by grouping only the proven active CRM read/enrichment routes under `pages/api/myportal/` and adopting those grouped routes in the existing owning service layers without changing dashboard storage, auth, watched-case, submission, or account behaviour.
|
||||
impact: Runtime behaviour is intended to remain unchanged; grouped myportal façade routes now cover the proven active dashboard CRM read/enrichment family, legacy endpoint handlers remain canonical, watched-case behaviour remains owned by subscriptions, and no route migration, deletion, contract change, CRM query change, auth/session change, storage/draft change, or submission/orchestration change has occurred.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Confirmed the required context was read before implementation:
|
||||
- `context/api-grouping-plan.md`
|
||||
- `context/api-grouping-adoption-roadmap.md`
|
||||
- `context/api-route-map.md`
|
||||
- `context/journey-architecture-map.md`
|
||||
- `context/architecture.md`
|
||||
- `memory-bank/change-log.md`
|
||||
- Performed a bounded audit of the active My Portal dashboard read / enrichment journey across the dashboard loader, service layers, and endpoint usage.
|
||||
- Audit findings established that:
|
||||
- the active entry page is `pages/myportal/index.js`
|
||||
- the active owning service layers for the proven CRM read/enrichment path are:
|
||||
- `actions/services/portalDirectService.js` for `getMyCases` / `getMyLPACases`
|
||||
- `actions/services/caseDirectService.js` for `getPortalModuleDetails`
|
||||
- the active CRM-backed dashboard path is:
|
||||
- `getMyCases(loggedInUser)` or `getMyLPACases(lpaId)`
|
||||
- detail-card enrichment fan-out through `getPortalModuleDetails(collectionName, caseID)`
|
||||
- watched cases are already handled by the earlier subscriptions façade slice and were left alone
|
||||
- representation and awaiting-submission data on the active dashboard loader are blob-backed in the current path via:
|
||||
- `getRepsFromBlob(thisSession.user.id)`
|
||||
- `getAwaitingSubmissionFromBlob(thisSession.user.id)`
|
||||
- `getmyrepresentations_api.js` and `getawaitingsubmission_api.js` were investigated but were not proven active in the bounded dashboard loader path for this slice
|
||||
- account/auth/bootstrap routes (`getPortalLogin`, `getPersonalAccount`, `getSession`) remain upstream support concerns and out of scope
|
||||
- Added grouped façade routes under `pages/api/myportal/` for the proven active CRM dashboard family only:
|
||||
- `get-my-cases.js`
|
||||
- `get-my-lpa-cases.js`
|
||||
- `get-portal-module-details.js`
|
||||
- Implemented each façade as the smallest safe compatibility wrapper:
|
||||
- import the existing legacy endpoint handler
|
||||
- delegate `req` and `res` directly to that existing handler
|
||||
- Updated only the existing owning service call sites needed for the bounded slice:
|
||||
- `actions/services/portalDirectService.js`
|
||||
- `getMyCases`
|
||||
- `getMyLPACases`
|
||||
- `actions/services/caseDirectService.js`
|
||||
- `getPortalModuleDetails`
|
||||
- Left the following unchanged:
|
||||
- legacy endpoint handlers
|
||||
- watched-case grouped subscriptions routes
|
||||
- representation routes
|
||||
- awaiting-submission routes
|
||||
- storage/blob routes
|
||||
- account/profile routes
|
||||
- auth/session behaviour
|
||||
- CRM queries and transforms
|
||||
- query parameter names and response contracts
|
||||
- Added focused characterization coverage to prove:
|
||||
- grouped myportal façade routes delegate correctly
|
||||
- legacy endpoint handlers remain present
|
||||
- adopted service methods now target grouped myportal routes
|
||||
- adopted methods no longer target the legacy endpoint URLs directly
|
||||
- request-contract cues remain unchanged
|
||||
- excluded route families remain outside this slice
|
||||
- Updated the adoption roadmap to record the audited scope boundary, included routes, excluded routes, service adoption status, and behaviour-preservation notes for the My Portal dashboard read / enrichment slice.
|
||||
|
||||
Validation:
|
||||
|
||||
- Focused validation only intended for this slice:
|
||||
- `npx eslint actions/services/portalDirectService.js actions/services/caseDirectService.js pages/api/myportal/*.js tests/phase22/api-grouping-facade-myportal-reads.test.cjs`
|
||||
- `node tests/phase22/api-grouping-facade-myportal-reads.test.cjs`
|
||||
- No repository-wide validation run.
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- The bounded My Portal dashboard read / enrichment family is now a complete façade grouping slice only for the proven active CRM dashboard read/enrichment routes adopted here.
|
||||
- Adjacent subscriptions, storage/draft, representation, awaiting-submission, and account/auth support routes remain intentionally outside this slice and should only be considered in separate bounded audits if needed.
|
||||
|
||||
### CL-2026-06-25-API-GROUPING-FACADE-CASE-DETAILS-VERTICAL-SLICE: bounded case-details read grouping and service adoption
|
||||
|
||||
date: 2026-06-25
|
||||
|
||||
Reference in New Issue
Block a user