# Dispatch Spot Next Phase Handoff — v166

## Completed version
v166 — Routes stabilization and data-contract hardening

## What changed
- Hardened `/routes` API response handling so the page safely accepts wrapped payload objects or direct arrays.
- Added stale-selection cleanup so invalid preselected load, truck, or driver IDs are safely cleared instead of breaking the route workspace.
- Added route dataset health visibility for loads, trucks, and drivers.

## What's visible
- On `/routes`, a new **Routes data-contract check** section appears below the setup card.
- Each card shows dataset count and whether loads, trucks, and drivers are ready or need attention.
- If a stale selection is passed into the route workspace, the page now safely resets it instead of crashing.

## Important note
- No Prisma schema changes.
- Schema-safe frontend/service-layer package.
- Next planned package: v167 Route weather integration foundation.
