All-through spans the whole path, so it comes last. Any phase GIAS adds later follows the known ones, A–Z.
backend/schemas.py: PHASE_ORDER, beside PHASE_GROUPS, lowercased so a change of case in a GIAS label keeps its place.
backend/app.py: order_phases() applied to /api/filtersphases and to the result-scoped result_filters.phases.
Tests: /api/filters order, plus an unknown phase going to the end. The full backend suite passes (297).
E2E: new journey the phase filter lists phases in the order a child meets them. It is data-invariant (it checks the relative order of whatever phases are offered). Run against staging, it fails on the current alphabetical order, as expected.
No frontend change: FilterBar renders filters.phases in the order the API returns them.
The phase drop-down listed GIAS phases alphabetically, so **16 plus** and **All-through** came before **Nursery**. They now follow a child's path:
Nursery → Primary → Middle deemed primary → Middle deemed secondary → Secondary → 16 plus → All-through
All-through spans the whole path, so it comes last. Any phase GIAS adds later follows the known ones, A–Z.
- `backend/schemas.py`: `PHASE_ORDER`, beside `PHASE_GROUPS`, lowercased so a change of case in a GIAS label keeps its place.
- `backend/app.py`: `order_phases()` applied to `/api/filters` `phases` and to the result-scoped `result_filters.phases`.
- Tests: `/api/filters` order, plus an unknown phase going to the end. The full backend suite passes (297).
- E2E: new journey *the phase filter lists phases in the order a child meets them*. It is data-invariant (it checks the relative order of whatever phases are offered). Run against staging, it fails on the current alphabetical order, as expected.
No frontend change: `FilterBar` renders `filters.phases` in the order the API returns them.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The phase filter listed GIAS phases alphabetically, so "16 plus" and
"All-through" came before Nursery. /api/filters (and the result-scoped
list) now order them Nursery, Primary, Middle deemed primary, Middle
deemed secondary, Secondary, 16 plus, then All-through, which spans the
whole path. A phase GIAS adds later follows the known ones, A-Z.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a PHASE_ORDER list and an order_phases() helper so the phase filter options come back in the order a child meets them (Nursery, Primary, Middle, Secondary, 16 plus, All-through). Unknown GIAS phases follow the known ones, A-Z. The helper is applied in both /api/schools and /api/filters, with backend unit tests and an e2e journey test. The change is small and self-contained, with no correctness, security or deploy concerns.
✅ No issues found.
## 🤖 AI Code Review (Claude Code)
Adds a PHASE_ORDER list and an order_phases() helper so the phase filter options come back in the order a child meets them (Nursery, Primary, Middle, Secondary, 16 plus, All-through). Unknown GIAS phases follow the known ones, A-Z. The helper is applied in both /api/schools and /api/filters, with backend unit tests and an e2e journey test. The change is small and self-contained, with no correctness, security or deploy concerns.
✅ No issues found.
tudor
merged commit dd5b48e612 into main2026-10-02 18:07:08 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The phase drop-down listed GIAS phases alphabetically, so 16 plus and All-through came before Nursery. They now follow a child's path:
Nursery → Primary → Middle deemed primary → Middle deemed secondary → Secondary → 16 plus → All-through
All-through spans the whole path, so it comes last. Any phase GIAS adds later follows the known ones, A–Z.
backend/schemas.py:PHASE_ORDER, besidePHASE_GROUPS, lowercased so a change of case in a GIAS label keeps its place.backend/app.py:order_phases()applied to/api/filtersphasesand to the result-scopedresult_filters.phases./api/filtersorder, plus an unknown phase going to the end. The full backend suite passes (297).No frontend change:
FilterBarrendersfilters.phasesin the order the API returns them.🤖 Generated with Claude Code
🤖 AI Code Review (Claude Code)
Adds a PHASE_ORDER list and an order_phases() helper so the phase filter options come back in the order a child meets them (Nursery, Primary, Middle, Secondary, 16 plus, All-through). Unknown GIAS phases follow the known ones, A-Z. The helper is applied in both /api/schools and /api/filters, with backend unit tests and an e2e journey test. The change is small and self-contained, with no correctness, security or deploy concerns.
✅ No issues found.