Add Flights Map C.1 implementation plan and updated spec

Spec: narrows useCityName handling (leave untouched due to active
consumers). Plan: 10 TDD tasks covering types, api, transform rules,
helpers, hook, barrel, page wiring, and regression tests.
This commit is contained in:
2026-04-17 03:07:30 +03:00
parent 397dc2a575
commit 9f8a3a45f0
2 changed files with 1412 additions and 2 deletions
File diff suppressed because it is too large Load Diff
@@ -31,7 +31,7 @@ src/shared/dictionaries/
└── <co-located .test.ts / .test.tsx files>
```
`useCityName` in `src/shared/hooks/useDictionaries.ts` is removed — it was a passthrough stub that nobody else should depend on; a targeted grep during implementation confirms this before deletion.
`useCityName` in `src/shared/hooks/useDictionaries.ts` stays as-is. It has active consumers (`StationDisplay`, `PopularRequestItem`) that expect synchronous code→string passthrough, which the new dictionaries hook does not provide. Migration of those callers to the real dictionaries is out of scope for C.1 and will be handled later if/when it becomes worthwhile.
## Types
@@ -225,4 +225,4 @@ Using `@testing-library/react`'s `renderHook`:
- **Endpoint shape.** We're assuming `/dictionary/1/{world_regions|countries|cities|airports}` with no locale segment (Angular parity). If prod returns a different path at integration time, we adjust `api.ts`. This is a known-unknown, not a blocker.
- **Australia filter.** Carried over as a direct parity port (`world_region_id === 500373`). If product wants to revisit this, it's a one-line change.
- **`useCityName` stub removal.** `grep` the repo during implementation; if anything still consumes it, update the caller to pull from `useDictionaries().dictionaries?.cityByCode.get(code)?.name` instead.
- **`useCityName` stub.** Left untouched in C.1 because of active consumers; see Architecture note above.