Batch A of applying the compare-screen learnings to the detail page (points 2-3 of the list).
Point 2 — Ofsted sentinel codes & sixth form
The legacy OEIF sub-judgement grid rendered any non-null value via OFSTED_LABELS[value], so:
Ofsted's sentinel code 9 ("not applicable / no judgement") leaked as an undefined label.
The sixth-form judgement was never in the list, so it was dropped entirely.
New shared ofstedLegacyAreas() helper returns only real grades (1-4) and includes Sixth Form provision. Both detail views and the "all sub-grades match the overall" shortcut now use it, so a school with a sixth form shows it, and no sentinel ever renders as a rating.
Point 3 — carried-forward grade labelling
The OEIF disclaimer always said "From September 2024, Ofsted no longer makes an overall effectiveness judgement" even while showing a carried-forward grade — contradictory. It's now grade_source-aware and labels carried-forward grades as such, matching the compare screen's regime handling. (Report-card detection was already fixed in #62.)
Tests: new ofstedLegacyAreas unit tests (sentinel filtering, sixth-form inclusion, early-years). 105 frontend tests green.
Next batches queued: anchoring & provenance (5,6), inclusion/admissions framing (7-10), chart truthfulness (4,12), all-through (11), mobile + expert review (13-15).
Batch A of applying the compare-screen learnings to the detail page (points 2-3 of the list).
## Point 2 — Ofsted sentinel codes & sixth form
The legacy OEIF sub-judgement grid rendered any non-null value via `OFSTED_LABELS[value]`, so:
- Ofsted's sentinel code **9** ("not applicable / no judgement") leaked as an undefined label.
- The **sixth-form judgement** was never in the list, so it was dropped entirely.
New shared `ofstedLegacyAreas()` helper returns only real grades (1-4) and includes Sixth Form provision. Both detail views and the "all sub-grades match the overall" shortcut now use it, so a school with a sixth form shows it, and no sentinel ever renders as a rating.
## Point 3 — carried-forward grade labelling
The OEIF disclaimer always said "From September 2024, Ofsted no longer makes an overall effectiveness judgement" even while showing a **carried-forward** grade — contradictory. It's now `grade_source`-aware and labels carried-forward grades as such, matching the compare screen's regime handling. (Report-card detection was already fixed in #62.)
Tests: new `ofstedLegacyAreas` unit tests (sentinel filtering, sixth-form inclusion, early-years). 105 frontend tests green.
Next batches queued: anchoring & provenance (5,6), inclusion/admissions framing (7-10), chart truthfulness (4,12), all-through (11), mobile + expert review (13-15).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
Batch A of applying compare-screen learnings to the detail page (points 2-3):
- Point 2: the legacy OEIF sub-judgement grid rendered any non-null value
via OFSTED_LABELS[value], so Ofsted's sentinel code 9 ('not applicable')
leaked as an undefined label, and the sixth-form judgement was dropped
entirely. New shared ofstedLegacyAreas() helper returns only real grades
(1-4) and includes Sixth Form provision. Both detail views + the
all-same-grade check use it.
- Point 3: the OEIF disclaimer always claimed 'Ofsted no longer makes an
overall judgement' even when showing a carried-forward grade. It's now
grade_source-aware and labels carried-forward grades as such, matching
the compare screen.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This PR extracts the Ofsted OEIF sub-judgement filtering logic (previously duplicated in SchoolDetailView and SecondarySchoolDetailView) into a single tested ofstedLegacyAreas utility, which correctly drops sentinel/non-applicable codes (values outside 1-4) instead of rendering them, adds the previously-omitted Sixth Form judgement, and adds a disclaimer for grades carried forward from an earlier inspection. All new field accesses (grade_source, sixth_form_provision) match existing type definitions, and the ofsted.grade_source access is safely guarded behind an outer {ofsted && (...)} block in both components. The change is clean, DRY, and covered by new unit tests.
✅ No issues found.
## 🤖 AI Code Review (Claude Code)
This PR extracts the Ofsted OEIF sub-judgement filtering logic (previously duplicated in SchoolDetailView and SecondarySchoolDetailView) into a single tested `ofstedLegacyAreas` utility, which correctly drops sentinel/non-applicable codes (values outside 1-4) instead of rendering them, adds the previously-omitted Sixth Form judgement, and adds a disclaimer for grades carried forward from an earlier inspection. All new field accesses (`grade_source`, `sixth_form_provision`) match existing type definitions, and the `ofsted.grade_source` access is safely guarded behind an outer `{ofsted && (...)}` block in both components. The change is clean, DRY, and covered by new unit tests.
✅ No issues found.
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.
Batch A of applying the compare-screen learnings to the detail page (points 2-3 of the list).
Point 2 — Ofsted sentinel codes & sixth form
The legacy OEIF sub-judgement grid rendered any non-null value via
OFSTED_LABELS[value], so:New shared
ofstedLegacyAreas()helper returns only real grades (1-4) and includes Sixth Form provision. Both detail views and the "all sub-grades match the overall" shortcut now use it, so a school with a sixth form shows it, and no sentinel ever renders as a rating.Point 3 — carried-forward grade labelling
The OEIF disclaimer always said "From September 2024, Ofsted no longer makes an overall effectiveness judgement" even while showing a carried-forward grade — contradictory. It's now
grade_source-aware and labels carried-forward grades as such, matching the compare screen's regime handling. (Report-card detection was already fixed in #62.)Tests: new
ofstedLegacyAreasunit tests (sentinel filtering, sixth-form inclusion, early-years). 105 frontend tests green.Next batches queued: anchoring & provenance (5,6), inclusion/admissions framing (7-10), chart truthfulness (4,12), all-through (11), mobile + expert review (13-15).
🤖 Generated with Claude Code
https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
Batch A of applying compare-screen learnings to the detail page (points 2-3): - Point 2: the legacy OEIF sub-judgement grid rendered any non-null value via OFSTED_LABELS[value], so Ofsted's sentinel code 9 ('not applicable') leaked as an undefined label, and the sixth-form judgement was dropped entirely. New shared ofstedLegacyAreas() helper returns only real grades (1-4) and includes Sixth Form provision. Both detail views + the all-same-grade check use it. - Point 3: the OEIF disclaimer always claimed 'Ofsted no longer makes an overall judgement' even when showing a carried-forward grade. It's now grade_source-aware and labels carried-forward grades as such, matching the compare screen. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB🤖 AI Code Review (Claude Code)
This PR extracts the Ofsted OEIF sub-judgement filtering logic (previously duplicated in SchoolDetailView and SecondarySchoolDetailView) into a single tested
ofstedLegacyAreasutility, which correctly drops sentinel/non-applicable codes (values outside 1-4) instead of rendering them, adds the previously-omitted Sixth Form judgement, and adds a disclaimer for grades carried forward from an earlier inspection. All new field accesses (grade_source,sixth_form_provision) match existing type definitions, and theofsted.grade_sourceaccess is safely guarded behind an outer{ofsted && (...)}block in both components. The change is clean, DRY, and covered by new unit tests.✅ No issues found.