Review of the per-phase limit found entries reaching the basket with no
phase, and a phase-less entry holds a slot in both groups:
- Nearby-school cards added without one. The API now returns each
peer's own phase (its pool is a phase group, so an all-through school
can sit beside a primary); the button passes it through, and an older
API simply leaves the conservative both-groups count in place.
- Baskets saved before this change were never migrated. The compare
page now backfills missing phases from the data it already fetches,
and never overwrites a phase the basket has.
- "16 plus" counted against both groups; it is secondary, as the API's
PHASE_GROUPS files it.
Also rewraps the HomeView doc comment the previous commit left awkward.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The section ranks on distance and is headed "Other schools nearby", but every
identifier still called it "similar" — the exact drift that leaves a later
reader trusting a name over the behaviour.
Mechanical: files, the module, the payload key, the type, the components, the
prop. No behaviour change; the suites are unchanged in count and still green.
Free to do now because #150 has not merged, so the payload key rename needs no
lockstep deploy. Uses of "similar" that are ordinary English — progress
measures compared to similar pupils, and unrelated comments — are untouched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>