GIAS NurseryProvision is text (Has Nursery Classes, No Nursery Classes, Not applicable), but the school header and the place-page table tested it for truthiness. So every school with a value got a Nursery chip (or a "Yes"), including secondaries aged 11–18: Graveney, Burntwood, St Cecilia's, Tiffin, Swanshurst. Separately, the single-sex chip appended 's to the plural GIAS gender, giving "Girls's school".
Changes
hasNurseryClasses() matches only Has Nursery Classes; used by SchoolDetailShell and PlaceView.
singleSexLabel() returns Girls' school / Boys' school, or null for mixed/unknown.
School.nursery_provision is typed string | null, which is what the API sends.
Tests
New schoolDetailHeader.test.tsx: chip shown for Has Nursery Classes, hidden for the other values and null; plural possessive for girls/boys; nothing for mixed.
PlaceView fixtures now use real GIAS strings, plus a case that Not applicable is not a "Yes".
Helper unit tests in utils.test.ts.
E2E journey: a girls' secondary header reads Girls' school, and shows Nursery only when the detail API says Has Nursery Classes. Run against staging before the fix, it fails as expected (Swanshurst renders Girls's school … Nursery).
tsc --noEmit clean; Jest 68 suites / 582 tests pass.
First step from the header proposal; the layout redesign follows separately.
GIAS `NurseryProvision` is text (`Has Nursery Classes`, `No Nursery Classes`, `Not applicable`), but the school header and the place-page table tested it for truthiness. So every school with a value got a **Nursery** chip (or a "Yes"), including secondaries aged 11–18: Graveney, Burntwood, St Cecilia's, Tiffin, Swanshurst. Separately, the single-sex chip appended `'s` to the plural GIAS gender, giving **"Girls's school"**.
## Changes
- `hasNurseryClasses()` matches only `Has Nursery Classes`; used by `SchoolDetailShell` and `PlaceView`.
- `singleSexLabel()` returns `Girls' school` / `Boys' school`, or null for mixed/unknown.
- `School.nursery_provision` is typed `string | null`, which is what the API sends.
## Tests
- New `schoolDetailHeader.test.tsx`: chip shown for `Has Nursery Classes`, hidden for the other values and null; plural possessive for girls/boys; nothing for mixed.
- `PlaceView` fixtures now use real GIAS strings, plus a case that `Not applicable` is not a "Yes".
- Helper unit tests in `utils.test.ts`.
- E2E journey: a girls' secondary header reads `Girls' school`, and shows Nursery only when the detail API says `Has Nursery Classes`. Run against staging before the fix, it fails as expected (Swanshurst renders `Girls's school … Nursery`).
`tsc --noEmit` clean; Jest 68 suites / 582 tests pass.
First step from the header proposal; the layout redesign follows separately.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
GIAS NurseryProvision is text ("Has Nursery Classes", "No Nursery
Classes", "Not applicable"), but the header and the place table tested it
for truthiness. Every school with a value got a Nursery chip or a "Yes",
including secondaries aged 11-18. hasNurseryClasses() matches the one
value that means a nursery, and the type now says the field is a string.
The single-sex chip appended 's to the plural GIAS gender, giving
"Girls's school". singleSexLabel() gives "Girls' school" / "Boys' school".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes the school header and places table to treat GIAS nursery_provision as text rather than a boolean, via a new hasNurseryClasses helper. It also fixes the single-sex label to read "Girls' school" / "Boys' school" via singleSexLabel. The change is small and correct, and it adds unit, component and e2e tests.
🟡 Minor
e2e/tests/journeys.spec.ts: The e2e test relies on the /api/schools list supporting a gender=girls filter and on search=school matching. If the filter is unsupported or silently ignored, the returned school may not be girls-only and the test will fail with a misleading error instead of skipping. The detail.school_info.nursery_provision field name is also assumed and not checked against the API response shape.
nextjs-app/tests/components/schoolDetailHeader.test.tsx: The 'says nothing for a mixed school' assertion uses /school$/ with a span selector. It would also match unrelated spans ending in 'school', and it does not guard against 'Girls' school' variants that end in a different form, so it is weak. The withSchool helper is also loosely typed (info: object).
nextjs-app/lib/utils.ts: singleSexLabel compares case-sensitively against 'Girls' and 'Boys', while hasNurseryClasses is case-insensitive. Inconsistent normalization could silently drop the chip if GIAS casing varies.
## 🤖 AI Code Review (Claude Code)
Fixes the school header and places table to treat GIAS nursery_provision as text rather than a boolean, via a new hasNurseryClasses helper. It also fixes the single-sex label to read "Girls' school" / "Boys' school" via singleSexLabel. The change is small and correct, and it adds unit, component and e2e tests.
### 🟡 Minor
- **e2e/tests/journeys.spec.ts**: The e2e test relies on the /api/schools list supporting a `gender=girls` filter and on `search=school` matching. If the filter is unsupported or silently ignored, the returned school may not be girls-only and the test will fail with a misleading error instead of skipping. The `detail.school_info.nursery_provision` field name is also assumed and not checked against the API response shape.
- **nextjs-app/__tests__/components/schoolDetailHeader.test.tsx**: The 'says nothing for a mixed school' assertion uses `/school$/` with a span selector. It would also match unrelated spans ending in 'school', and it does not guard against 'Girls' school' variants that end in a different form, so it is weak. The `withSchool` helper is also loosely typed (`info: object`).
- **nextjs-app/lib/utils.ts**: `singleSexLabel` compares case-sensitively against 'Girls' and 'Boys', while `hasNurseryClasses` is case-insensitive. Inconsistent normalization could silently drop the chip if GIAS casing varies.
- E2E: list with page_size (per_page was ignored), fail clearly if the
gender filter is ignored, and require nursery_provision on the detail
payload so the Nursery assertion cannot pass vacuously.
- singleSexLabel ignores case, as hasNurseryClasses does.
- Header test: type withSchool with Partial<School>, and match the
single-sex labels exactly instead of any span ending in "school".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces boolean-style truthiness checks on GIAS text fields in the school header and place table with helpers (hasNurseryClasses, singleSexLabel). This fixes spurious 'Nursery' chips and the "Girls's school" label. The change is small, well tested with unit and e2e tests, and looks healthy.
🟡 Minor
e2e/tests/journeys.spec.ts: The e2e test uses search=school with page_size=1 and assumes the API honours the gender filter. It also locates the header with page.locator('header', { has: h1 }), which could match a different header element. This is brittle but not incorrect, and it skips cleanly when there is no data.
nextjs-app/lib/types.ts: The nursery_provision type changes from boolean to string. Other consumers, such as comparison views or API mocks that still pass booleans, would not be flagged at runtime and now silently read as no nursery. A grep for remaining usages would confirm that none are left.
## 🤖 AI Code Review (Claude Code)
Replaces boolean-style truthiness checks on GIAS text fields in the school header and place table with helpers (hasNurseryClasses, singleSexLabel). This fixes spurious 'Nursery' chips and the "Girls's school" label. The change is small, well tested with unit and e2e tests, and looks healthy.
### 🟡 Minor
- **e2e/tests/journeys.spec.ts**: The e2e test uses `search=school` with `page_size=1` and assumes the API honours the `gender` filter. It also locates the header with `page.locator('header', { has: h1 })`, which could match a different header element. This is brittle but not incorrect, and it skips cleanly when there is no data.
- **nextjs-app/lib/types.ts**: The `nursery_provision` type changes from boolean to string. Other consumers, such as comparison views or API mocks that still pass booleans, would not be flagged at runtime and now silently read as no nursery. A grep for remaining usages would confirm that none are left.
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.
GIAS
NurseryProvisionis text (Has Nursery Classes,No Nursery Classes,Not applicable), but the school header and the place-page table tested it for truthiness. So every school with a value got a Nursery chip (or a "Yes"), including secondaries aged 11–18: Graveney, Burntwood, St Cecilia's, Tiffin, Swanshurst. Separately, the single-sex chip appended'sto the plural GIAS gender, giving "Girls's school".Changes
hasNurseryClasses()matches onlyHas Nursery Classes; used bySchoolDetailShellandPlaceView.singleSexLabel()returnsGirls' school/Boys' school, or null for mixed/unknown.School.nursery_provisionis typedstring | null, which is what the API sends.Tests
schoolDetailHeader.test.tsx: chip shown forHas Nursery Classes, hidden for the other values and null; plural possessive for girls/boys; nothing for mixed.PlaceViewfixtures now use real GIAS strings, plus a case thatNot applicableis not a "Yes".utils.test.ts.Girls' school, and shows Nursery only when the detail API saysHas Nursery Classes. Run against staging before the fix, it fails as expected (Swanshurst rendersGirls's school … Nursery).tsc --noEmitclean; Jest 68 suites / 582 tests pass.First step from the header proposal; the layout redesign follows separately.
🤖 Generated with Claude Code
GIAS NurseryProvision is text ("Has Nursery Classes", "No Nursery Classes", "Not applicable"), but the header and the place table tested it for truthiness. Every school with a value got a Nursery chip or a "Yes", including secondaries aged 11-18. hasNurseryClasses() matches the one value that means a nursery, and the type now says the field is a string. The single-sex chip appended 's to the plural GIAS gender, giving "Girls's school". singleSexLabel() gives "Girls' school" / "Boys' school". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>🤖 AI Code Review (Claude Code)
Fixes the school header and places table to treat GIAS nursery_provision as text rather than a boolean, via a new hasNurseryClasses helper. It also fixes the single-sex label to read "Girls' school" / "Boys' school" via singleSexLabel. The change is small and correct, and it adds unit, component and e2e tests.
🟡 Minor
gender=girlsfilter and onsearch=schoolmatching. If the filter is unsupported or silently ignored, the returned school may not be girls-only and the test will fail with a misleading error instead of skipping. Thedetail.school_info.nursery_provisionfield name is also assumed and not checked against the API response shape./school$/with a span selector. It would also match unrelated spans ending in 'school', and it does not guard against 'Girls' school' variants that end in a different form, so it is weak. ThewithSchoolhelper is also loosely typed (info: object).singleSexLabelcompares case-sensitively against 'Girls' and 'Boys', whilehasNurseryClassesis case-insensitive. Inconsistent normalization could silently drop the chip if GIAS casing varies.🤖 AI Code Review (Claude Code)
Replaces boolean-style truthiness checks on GIAS text fields in the school header and place table with helpers (hasNurseryClasses, singleSexLabel). This fixes spurious 'Nursery' chips and the "Girls's school" label. The change is small, well tested with unit and e2e tests, and looks healthy.
🟡 Minor
search=schoolwithpage_size=1and assumes the API honours thegenderfilter. It also locates the header withpage.locator('header', { has: h1 }), which could match a different header element. This is brittle but not incorrect, and it skips cleanly when there is no data.nursery_provisiontype changes from boolean to string. Other consumers, such as comparison views or API mocks that still pass booleans, would not be flagged at runtime and now silently read as no nursery. A grep for remaining usages would confirm that none are left.