22541 map myportal results pair routes through unified breadcrumb resolver

This commit is contained in:
2026-04-09 10:16:45 +01:00
parent 786f906ab8
commit ee3f3eae74
3 changed files with 85 additions and 36 deletions
+30
View File
@@ -429,6 +429,36 @@ Follow-ups:
- Next wider slice candidate: move a second safe myportal results pair group (`/myportal/advancedsearchresults`, `/myportal/addresssearchresults`) into the unified mapped resolver where callback-free, then consider splitting resolver maps into a dedicated local constant section for improved scanability.
### CL-22541-O: breadcrumbs myportal results-pair migration into unified mapped resolver
date: 2026-04-09
author: Cline
scope: `components/breadcrumbs.js`, `tests/phase22/breadcrumbs-route-map-structure.test.cjs`
type: change
rationale: Execute the agreed next slice by migrating the remaining callback-free myportal results-pair branches into the unified mapped resolver so more safe branches are rendered through one consistent mapping flow.
impact: Refactor-only structural consolidation/readability improvement; no intended route/auth/session/API/EN-CY/a11y behavior change.
status: completed
Summary:
- Extended `getSimpleMyPortalRouteRenderer(path)` to include:
- `/myportal/advancedsearchresults`
- `/myportal/addresssearchresults`
- Removed now-redundant explicit conditional branches for those two routes from the main JSX chain.
- Kept callback/stateful branches explicit and unchanged (notably `/myportal/case/id/[incident]` with `router.back()`).
- Expanded `tests/phase22/breadcrumbs-route-map-structure.test.cjs` guardrails to assert:
- both myportal results-pair routes are mapped
- legacy explicit `isPath(...)` branches for those routes are no longer present
Validation:
- `npx eslint components/breadcrumbs.js tests/phase22/breadcrumbs-route-map-structure.test.cjs tests/phase22/index.test.cjs` -> pass.
- `node tests/phase22/index.test.cjs` -> pass (combined suite; breadcrumbs-route-map tests 3/3).
Follow-ups:
- Next wider slice candidate: split map resolver sections into clearly named grouped constants (simple/public/myportal) near one composition point, then optionally move map-only route renderers to a local pure helper module if continued growth impacts scanability.
### CL-00X: 22500 `components/elements/index.js` Phase 1 helper extraction
date: 2026-04-07