docs(audit): correct postcode finding — full postcodes do trigger proximity search

Recheck with 'B91 3DL' via the search box shows the geocoded radius
search works (distances, nearest-first, radius selector, map toggle).
Original P0.3 tested only a partial postcode, which silently falls back
to text search — refiled as P2.0 (silent mode switch on partial input).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Tudor
2026-07-02 15:01:02 +01:00
co-authored by Claude Fable 5
parent a059fa213e
commit f2b71b67d4
2 changed files with 21 additions and 10 deletions
@@ -32,7 +32,7 @@
- Argument: Parents frequently don't know a school's exact registered name ("Welland" vs "Welland Church of England"). With no suggestions and an exact-ish match required, a misspelling risks a zero-result dead end on the highest-traffic path, and every search costs full typing + a blind submit.
- Severity guess: P1
- **F2. Postcode search shows no distance and isn't sorted by proximity**
- **F2. Postcode search shows no distance and isn't sorted by proximity****⚠ REVISED after recheck, see addendum at end of file: this holds only for PARTIAL postcodes; a full postcode triggers a working proximity search with distances.**
- Evidence: `/?search=B91+3` → "8 schools found", sort "Relevance", top result a Secondary school, phases mixed (secondary/independent/primary/sixth-form), zero distance shown on any card. Screenshot `j1-postcode-results-mobile.png`.
- Criterion violated: Nielsen #2 (Match between system and the real world) + task-flow obstruction. The placeholder invites a "postcode", which sets an expectation of "nearest schools first"; the delivered value (proximity ordering + distance) is missing.
- Argument: On the core "find my school near me" task, a parent who types their postcode expects the closest schools ranked by distance. Instead they get an unordered, distance-less, mixed-phase list led by a secondary school — it reads as broken and gives no way to judge "which is closest," pushing them to abandon. (Name search works, so the overall journey isn't fully blocked → P1 not P0, but this is the weakest link on the primary task.)
@@ -96,3 +96,13 @@
- `j1-search-results-desktop.png`: desktop results for "Welland Primary".
- `j1-focus-searchbox-desktop.png`: keyboard focus state on the search input (orange border + faint ring).
- `j1-home-zoom200-desktop.png`: full home at 720px (≈200% reflow) — no horizontal scroll, cards reflow to 2×2.
- `j1-fullpostcode-results-mobile.png` (recheck): mobile results for full postcode "B91 3DL" — "13 schools within 1.0 miles", distance on every card, nearest-first.
## Recheck addendum (2026-07-02) — F2 tested with a FULL postcode
The original Attempt B used the partial postcode `B91 3`. Rechecked with the full postcode **`B91 3DL`** typed into the home search box and submitted:
- The submit handler (`FilterBar.tsx` `isValidPostcode()`, full-postcode regex `/^[A-Z]{1,2}[0-9][A-Z0-9]?\s*[0-9][A-Z]{2}$/i`) recognised it and routed to **`/?postcode=B91+3DL&radius=1`** — the geocoded radius search, not text search.
- Result: heading **"13 schools within 1.0 miles of B91 3DL"**, **every card shows distance** ("0.1 mi", "0.2 mi" … "1.0 mi"), **sorted nearest-first**, plus a "Within: 0.5/1/3/5 miles" radius selector, a List/Map toggle, and a "Nearest first" sort option. Screenshot `j1-fullpostcode-results-mobile.png`. This is exactly the experience F2 asked for — it exists and works well.
- **F2 as originally stated is therefore wrong for full postcodes.** The residual, real finding is narrower: input that *looks like* a location but fails the full-postcode regex — outcodes ("B91"), partials ("B91 3"), postcodes with typos — **silently falls back to name/address text search** (`/?search=…`) with no distances, relevance ordering, and no notice that a full postcode would unlock proximity search. The two result pages look similar enough that a parent won't know which mode they're in. Severity re-guessed at P1→P2 (degraded sub-path with a working primary path and a working "Schools near me" alternative; the failure is silent-mode-switching, not a missing capability).
- Exit-cause list item 1 ("postcode expectation mismatch") should be read with this narrower scope: it applies to partial/malformed postcode input only.
@@ -13,6 +13,7 @@ Full evidence trail: `docs/superpowers/specs/2026-07-02-ux-audit-notes/` (six no
These are strengths the fixes below must not regress:
- **Name search is genuinely excellent.** "Welland Primary" → the correct school as sole top result, in 3 taps with instant loads — comfortably under the 15s target. Result cards are information-rich (Ofsted grade+year, RWM % with trend arrow, "+12 pts vs national", pupil count, LA) and adapt correctly to phase (Attainment 8 for secondary, RWM for primary).
- **Full-postcode proximity search works, and works well** *(verified on 2026-07-02 recheck)* — typing a full postcode (e.g. `B91 3DL`) into the home search box yields "13 schools within 1.0 miles of B91 3DL", distance on every card, nearest-first ordering, a 0.55 mile radius selector, and a List/Map toggle; the "Schools near me" geolocation button offers the same without typing. Only partial input degrades (see P2.0).
- **Search is the unmistakable primary action** — above the fold on both viewports, 70px tap target, plain-English placeholder, content order puts the task first.
- **The primary (KS2) school page explains its data in plain English** — "End-of-primary-school tests taken by Year 6 pupils", the in-place "Why is combined lower?" explainer, legends on subject charts. This is the model the secondary template should copy.
- **Everything is anchored to the national average** ("+14 pts", "National avg 39.1") — a non-specialist can judge good/bad without leaving the page.
@@ -43,13 +44,6 @@ These are strengths the fixes below must not regress:
- Recommendation: restack the mobile hero so map, H1, and compare button occupy non-overlapping space (e.g. compare button below the identity block or docked, map height capped above the H1). One template, both school-detail components (see P2.6).
- Uplift: **school-page bounce-back-to-Google — decrease, moderate** (fixes the first-glance orientation on every SEO landing; the page content behind it is already strong, so retention should follow).
- **P0.3 — Postcode search returns a distance-less, unsorted, mixed-phase list** *(J1-F2)*
- Evidence: `/?search=B91+3` → "8 schools found", sort "Relevance", **no distance on any card**, top result a Secondary school, phases interleaved (secondary/independent/primary/sixth-form) — behaviour consistent with a text match on the postcode column rather than a geographic radius search. Screenshot `j1-postcode-results-mobile.png`. The geolocation "Schools near me" button proves proximity machinery exists but the typed-postcode path isn't wired to it.
- Criterion: Nielsen #2 (match between system and the real world) + task-flow obstruction on the highest-traffic path. The placeholder explicitly invites "School name **or postcode**".
- Argument: a parent typing their postcode expects nearest-first with distances. What they get looks broken — no way to judge which school is closest, led by the wrong phase. Home is 63% of entries and 46% of exits; this is the largest observed task-level leak feeding that exit rate, on the discovery path used by exactly the parents who *don't* already know a school name.
- Recommendation: detect postcode-shaped queries, geocode (postcodes.io is already integrated), sort by distance, and show "X.X miles" on each card — i.e. route the postcode text path through the same logic as "Schools near me". Default the phase filter sensibly or surface it prominently on postcode results.
- Uplift: **home 46% exit rate — decrease, moderate-to-large** (repairs the primary discovery task for the know-my-area-not-my-school segment; large band justified because the failure currently reads as "site is broken" rather than "site lacks a feature").
### P1 — High
- **P1.1 — Filter and Sort selects on home results have no accessible name** *(J1-F3)*
@@ -103,6 +97,13 @@ These are strengths the fixes below must not regress:
### P2 — Medium
- **P2.0 — Partial or malformed postcode input silently falls back to text search with no distances** *(J1-F2, corrected on 2026-07-02 recheck — the original P0 claim that postcode search lacks proximity was wrong: a full postcode works, see "What works today")*
- Evidence: the search submit handler routes input through a strict full-postcode regex (`FilterBar.tsx` `isValidPostcode()`). `B91 3DL``/?postcode=…&radius=1`: "13 schools within 1.0 miles", distance on every card, nearest-first, radius selector, map toggle (`j1-fullpostcode-results-mobile.png`). But `B91 3` (an outcode+sector a parent plausibly types) → `/?search=B91+3`: text-matched, relevance-ordered, distance-less, mixed-phase results led by a secondary school (`j1-postcode-results-mobile.png`) — with no notice that a different, better mode exists.
- Criterion: Nielsen #1 (visibility of system status — silent mode switch) and #9 (help users recognise and recover); error tolerance for the "or postcode" promise in the placeholder.
- Argument: the two result pages look near-identical, so a parent who types "B91" or fat-fingers a character never learns that proximity search exists; they just get an apparently arbitrary list on the highest-traffic path.
- Recommendation: detect postcode-*shaped* input that fails full validation (outcode/sector patterns, near-miss typos) and either geocode it anyway (postcodes.io supports outcodes) or show an inline nudge — "Enter a full postcode like B91 3DL to see schools by distance."
- Uplift: **home 46% exit rate — decrease, small-to-moderate** (recovers the postcode-search subset who type partial input; the full-postcode path already works, which caps the band).
- **P2.1 — Mobile data tables hide the decision-critical columns behind unaffordanced horizontal scroll** *(merges J3-F1, J4-F3)*
- Evidence: compare's "Detailed Comparison" table is 626px inside a 324px wrapper — only Year + the first school's column visible, no scroll cue (`j3-compare-two-schools-mobile.png`); rankings shows RANK/SCHOOL/AREA but the metric % (the ranking's justification) sits off-screen (scrollWidth 551 > 324) (`j4-rankings-mobile.png`).
- Criterion: mobile-usability standard (primary content hidden off-viewport); Nielsen #6 — the user must memorise school A's numbers while scrolling to school B.
@@ -201,8 +202,8 @@ P0.1 contrast token fixes; P1.1 label the two selects; P1.4 chart `aria-label`s
**Batch 2 — School-template mobile fold (small effort, direct SEO-retention uplift).**
P0.2 un-overlap the H1/map/compare button; P2.5 scrollable section nav; P3.8 trend-chart legend + badge overlap; P3.3 add-confirmation live region. One template, all SEO landings.
**Batch 3 — Location search done right (moderate effort, biggest home-funnel lever).**
P0.3 postcode → geocoded, distance-sorted, distance-labelled results (reuse the "Schools near me" machinery); P1.6 autocomplete on the home search (reuse the compare modal's live search); P1.7 mobile value-prop line. Together these target the 46% home exit rate from three directions.
**Batch 3 — Home search assistance (small-moderate effort, home-funnel lever).**
P1.6 autocomplete on the home search (reuse the compare modal's live search); P2.0 graceful handling of partial/malformed postcodes (geocode outcodes or nudge toward a full postcode — the full-postcode proximity search already works); P1.7 mobile value-prop line. Together these target the 46% home exit rate from three directions.
**Batch 4 — Discovery and sharing bridges (moderate effort, compare-funnel uplift).**
P1.2 "Schools nearby" module on school pages (feeds compare); P1.3 URL-over-localStorage precedence for shared links; P2.2 mobile +Compare on rankings rows; P3.1/P3.2 compare state-clarity nits.