feat: include and mark 'Open, but proposed to close' schools #22

Merged
tudor merged 3 commits from feat/proposed-to-close-schools into main 2026-07-08 21:23:24 +00:00
Owner

GIAS lists some operating schools as Open, but proposed to close; the exact status = 'Open' filter silently excluded them from the site even though they still teach and publish results.

Pipeline

  • dim_school / dim_location now keep both statuses (filters must stay identical — the API inner-joins the dims); accepted_values test updated. Schools drop out automatically when GIAS flips them to Closed (marts fully rebuild every run).

API

  • status exposed on list items and school_info (via _MAIN_QUERYSCHOOL_COLUMNS).

UI (mockup options A + E as agreed)

  • Listings: amber "⚠ Proposed to close" tag in the attributes line of both row components, styled on the existing Selective-tag amber family.
  • Detail pages (primary + secondary): slim amber notice strip under the header: proposed for closure, formal closure process not necessarily started, check with the local authority before applying.
  • Single source of truth: isProposedToClose() in lib/utils.ts; no scattered string comparisons.

Tests: backend 10/10 pytest (2 new), frontend 40/40 Jest (4 new), tsc --noEmit clean.

e2e note: no journey change — the marker only renders for schools carrying the status, and staging data has no stable proposed-to-close URN to pin a fixture on; existing journeys are unaffected (status is additive).

Deploy note: dim_school.status already exists, so the API field and marker logic are live on deploy. The newly included proposed-to-close schools only appear after the next pipeline run rebuilds the dims with the widened filter.

🤖 Generated with Claude Code

GIAS lists some operating schools as `Open, but proposed to close`; the exact `status = 'Open'` filter silently excluded them from the site even though they still teach and publish results. **Pipeline** - `dim_school` / `dim_location` now keep both statuses (filters must stay identical — the API inner-joins the dims); `accepted_values` test updated. Schools drop out automatically when GIAS flips them to `Closed` (marts fully rebuild every run). **API** - `status` exposed on list items and `school_info` (via `_MAIN_QUERY` → `SCHOOL_COLUMNS`). **UI** (mockup options A + E as agreed) - Listings: amber "⚠ Proposed to close" tag in the attributes line of both row components, styled on the existing Selective-tag amber family. - Detail pages (primary + secondary): slim amber notice strip under the header: proposed for closure, **formal closure process not necessarily started**, check with the local authority before applying. - Single source of truth: `isProposedToClose()` in `lib/utils.ts`; no scattered string comparisons. **Tests**: backend 10/10 pytest (2 new), frontend 40/40 Jest (4 new), `tsc --noEmit` clean. **e2e note**: no journey change — the marker only renders for schools carrying the status, and staging data has no stable proposed-to-close URN to pin a fixture on; existing journeys are unaffected (`status` is additive). **Deploy note**: `dim_school.status` already exists, so the API field and marker logic are live on deploy. The newly *included* proposed-to-close schools only appear after the next pipeline run rebuilds the dims with the widened filter. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tudor added 3 commits 2026-07-08 21:06:21 +00:00
These schools are still operating and publish results; they drop out
automatically when GIAS flips them to Closed since marts fully rebuild
each run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(ui): mark proposed-to-close schools in listings and detail pages
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m46s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 21s
PR Checks / Build Frontend (no push) (pull_request) Successful in 50s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 35s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 1m1s
45ab479062
Amber tag in listing rows (option A) and a slim notice strip under the
detail-page header (option E): proposed for closure, formal process not
necessarily started, check with the local authority before applying.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

🤖 AI Code Review (Claude Code)

This PR threads a new status field (GIAS establishment status) end-to-end from the pipeline through the API to the frontend, so schools marked "Open, but proposed to close" are kept in the marts instead of being dropped, and the UI surfaces a warning tag/notice for them. The status filter is updated consistently in both dim_school.sql and dim_location.sql (which are inner-joined), the dbt accepted_values test is updated to match, and both backend and frontend have corresponding tests.

No issues found.

## 🤖 AI Code Review (Claude Code) This PR threads a new `status` field (GIAS establishment status) end-to-end from the pipeline through the API to the frontend, so schools marked "Open, but proposed to close" are kept in the marts instead of being dropped, and the UI surfaces a warning tag/notice for them. The status filter is updated consistently in both dim_school.sql and dim_location.sql (which are inner-joined), the dbt accepted_values test is updated to match, and both backend and frontend have corresponding tests. ✅ No issues found.
tudor merged commit 7370712888 into main 2026-07-08 21:23:24 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tudor/school_compare#22