Changes the default search distance from 1 mile to 0.5 miles, and adds a 0.25-mile option.
Typing a postcode, and the near-me button, now search within 0.5 miles.
A postcode URL with no radius now uses 0.5 miles. Before, the Distance control showed "1 mile" while the API applied its own 5-mile default; the page and the map fetch now send the same default the control shows (DEFAULT_RADIUS_MILES in lib/utils.ts).
The Distance control offers 0.25 / 0.5 / 1 / 3 / 5 miles. A distance the user picked is kept as before. The API default stays at 5 miles; its 0.1-mile minimum already allows 0.25.
The radius in the results heading and the map circle was rounded to one decimal place, so 0.25 would have shown and been drawn as 0.3. It now keeps two decimal places, and the list heading reads "within 1 mile of …" instead of "within 1.0 miles of …".
Tests
FilterBarRadius.test.tsx: postcode submit uses radius=0.5; a URL with no radius shows 0.5; a chosen radius is kept; the options include 0.25 but default to 0.5.
ResultsMapView.test.tsx: a quarter-mile search is drawn and labelled as 0.25 in both map and list headings; the list-heading expectation is updated to "1 mile".
The E2E journey "searching by postcode returns nearby schools" now asserts radius=0.5 and the Distance value. It runs against staging after merge.
Changes the default search distance from 1 mile to **0.5 miles**, and adds a **0.25-mile** option.
- Typing a postcode, and the near-me button, now search within 0.5 miles.
- A postcode URL with no `radius` now uses 0.5 miles. Before, the Distance control showed "1 mile" while the API applied its own 5-mile default; the page and the map fetch now send the same default the control shows (`DEFAULT_RADIUS_MILES` in `lib/utils.ts`).
- The Distance control offers 0.25 / 0.5 / 1 / 3 / 5 miles. A distance the user picked is kept as before. The API default stays at 5 miles; its 0.1-mile minimum already allows 0.25.
- The radius in the results heading and the map circle was rounded to one decimal place, so 0.25 would have shown and been drawn as 0.3. It now keeps two decimal places, and the list heading reads "within 1 mile of …" instead of "within 1.0 miles of …".
**Tests**
- `FilterBarRadius.test.tsx`: postcode submit uses `radius=0.5`; a URL with no radius shows 0.5; a chosen radius is kept; the options include 0.25 but default to 0.5.
- `ResultsMapView.test.tsx`: a quarter-mile search is drawn and labelled as 0.25 in both map and list headings; the list-heading expectation is updated to "1 mile".
- The E2E journey "searching by postcode returns nearby schools" now asserts `radius=0.5` and the Distance value. It runs against staging after merge.
- `tsc` clean, jest 524/524.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
New postcode searches, the near-me button and URLs without a radius now
use 0.5 miles. A postcode URL with no radius used to show "1 mile" in the
Distance control while the API applied its own 5-mile default; the page
and the map fetch now send the same default the control displays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This change introduces a shared DEFAULT_RADIUS_MILES constant (0.5) and uses it in the server page, the FilterBar, the near-me redirect and the map fetch. A new postcode search now starts at half a mile in both the UI and the API request. Unit and e2e tests cover the new default. The change looks consistent and low risk.
🟡 Minor
nextjs-app/app/(frontend)/page.tsx: The default radius is now sent to the API on every request, including ones with no postcode (for example the plain home page). This is harmless if the API ignores radius without a postcode, but it is worth confirming. It could be applied only when a postcode is present, which would also keep cache keys and URLs for non-location queries unchanged. The same applies to params.radius ??= DEFAULT_RADIUS_MILES in HomeView's map fetch.
## 🤖 AI Code Review (Claude Code)
This change introduces a shared DEFAULT_RADIUS_MILES constant (0.5) and uses it in the server page, the FilterBar, the near-me redirect and the map fetch. A new postcode search now starts at half a mile in both the UI and the API request. Unit and e2e tests cover the new default. The change looks consistent and low risk.
### 🟡 Minor
- **nextjs-app/app/(frontend)/page.tsx**: The default radius is now sent to the API on every request, including ones with no postcode (for example the plain home page). This is harmless if the API ignores radius without a postcode, but it is worth confirming. It could be applied only when a postcode is present, which would also keep cache keys and URLs for non-location queries unchanged. The same applies to `params.radius ??= DEFAULT_RADIUS_MILES` in HomeView's map fetch.
Adds "Within 0.25 miles" to the Distance control; 0.5 stays the default.
The radius shown in the results heading and drawn on the map was rounded
to one decimal place, which would have turned 0.25 into 0.3. It now keeps
two, and the list heading says "1 mile" rather than "1.0 miles".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tudor
changed title from fix(search): start postcode searches at half a mile to fix(search): default to half a mile, and offer a quarter mile2026-10-01 16:53:09 +00:00
Changes the default postcode-search radius to 0.5 miles through a shared DEFAULT_RADIUS_MILES constant. It applies the constant in the server page, FilterBar, HomeView's map fetch and the Near Me button. It also adds a 0.25-mile option and renders radius labels at two decimals, with unit and e2e tests. The change is consistent and looks healthy.
🟡 Minor
nextjs-app/app/(frontend)/page.tsx: The radius now defaults to 0.5 for every request, including ones with no postcode. This is harmless if the API ignores radius without a postcode. Any existing links with ?postcode= and no radius, which previously got the API's 5-mile default, will now search 0.5 miles. This is a deliberate but user-visible behaviour change. Consider sending the default only when a postcode is present.
## 🤖 AI Code Review (Claude Code)
Changes the default postcode-search radius to 0.5 miles through a shared DEFAULT_RADIUS_MILES constant. It applies the constant in the server page, FilterBar, HomeView's map fetch and the Near Me button. It also adds a 0.25-mile option and renders radius labels at two decimals, with unit and e2e tests. The change is consistent and looks healthy.
### 🟡 Minor
- **nextjs-app/app/(frontend)/page.tsx**: The radius now defaults to 0.5 for every request, including ones with no postcode. This is harmless if the API ignores radius without a postcode. Any existing links with `?postcode=` and no radius, which previously got the API's 5-mile default, will now search 0.5 miles. This is a deliberate but user-visible behaviour change. Consider sending the default only when a postcode is present.
tudor
merged commit e2fc7a8f15 into main2026-10-01 17:49:12 +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.
Changes the default search distance from 1 mile to 0.5 miles, and adds a 0.25-mile option.
radiusnow uses 0.5 miles. Before, the Distance control showed "1 mile" while the API applied its own 5-mile default; the page and the map fetch now send the same default the control shows (DEFAULT_RADIUS_MILESinlib/utils.ts).Tests
FilterBarRadius.test.tsx: postcode submit usesradius=0.5; a URL with no radius shows 0.5; a chosen radius is kept; the options include 0.25 but default to 0.5.ResultsMapView.test.tsx: a quarter-mile search is drawn and labelled as 0.25 in both map and list headings; the list-heading expectation is updated to "1 mile".radius=0.5and the Distance value. It runs against staging after merge.tscclean, jest 524/524.🤖 Generated with Claude Code
🤖 AI Code Review (Claude Code)
This change introduces a shared DEFAULT_RADIUS_MILES constant (0.5) and uses it in the server page, the FilterBar, the near-me redirect and the map fetch. A new postcode search now starts at half a mile in both the UI and the API request. Unit and e2e tests cover the new default. The change looks consistent and low risk.
🟡 Minor
params.radius ??= DEFAULT_RADIUS_MILESin HomeView's map fetch.fix(search): start postcode searches at half a mileto fix(search): default to half a mile, and offer a quarter mile🤖 AI Code Review (Claude Code)
Changes the default postcode-search radius to 0.5 miles through a shared DEFAULT_RADIUS_MILES constant. It applies the constant in the server page, FilterBar, HomeView's map fetch and the Near Me button. It also adds a 0.25-mile option and renders radius labels at two decimals, with unit and e2e tests. The change is consistent and looks healthy.
🟡 Minor
?postcode=and no radius, which previously got the API's 5-mile default, will now search 0.5 miles. This is a deliberate but user-visible behaviour change. Consider sending the default only when a postcode is present.