fix(navi): Auto-mode usability — boundary chips for non-Drive + 50m snap threshold

(1) DirectionsPanel: show boundary-mode chips for all modes except Drive
(vehicle). Drive is pure Valhalla road routing so boundary mode is irrelevant;
Auto/Foot/MTB/ATV may traverse wilderness and need the chips.

(2) router.py: raise OFF_NETWORK_THRESHOLD_M 10 -> 50. Geocoded street addresses
commonly snap 20-50m from the road centerline; 10m forced normal road routes
into wilderness pathfinding.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt 2026-05-24 16:29:07 +00:00
commit a1e891ba70
2 changed files with 7 additions and 4 deletions

View file

@ -56,8 +56,10 @@ EXPANDED_SEARCH_RADIUS_KM = 100
# Memory limit
MEMORY_LIMIT_GB = 12
# Off-network detection threshold (meters)
OFF_NETWORK_THRESHOLD_M = 10
# Off-network detection threshold (meters). Geocoded street addresses commonly
# snap 20-50m from the road centerline, so a tight value forces normal road routes
# into wilderness pathfinding; 50m keeps on-road endpoints on-network.
OFF_NETWORK_THRESHOLD_M = 50
# Mode to Valhalla costing mapping
MODE_TO_COSTING = {

View file

@ -325,8 +325,9 @@ export default function DirectionsPanel({ onClose }) {
</div>
)}
{/* Boundary mode selector (only for non-auto modes) */}
{routeMode !== "auto" && (
{/* Boundary mode selector hidden only for Drive (vehicle), which is pure
Valhalla road routing; Auto/Foot/MTB/ATV may traverse wilderness. */}
{routeMode !== "vehicle" && (
<div className="flex gap-1">
{BOUNDARY_MODES.map((m) => {
const active = boundaryMode === m.id