From a1e891ba70f8e04169c7a0941f27ff5ce0da209d Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 24 May 2026 16:29:07 +0000 Subject: [PATCH] =?UTF-8?q?fix(navi):=20Auto-mode=20usability=20=E2=80=94?= =?UTF-8?q?=20boundary=20chips=20for=20non-Drive=20+=2050m=20snap=20thresh?= =?UTF-8?q?old?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (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) --- backend/services/navi_offroute/router.py | 6 ++++-- frontend/src/components/DirectionsPanel.jsx | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/backend/services/navi_offroute/router.py b/backend/services/navi_offroute/router.py index 40f444b..40aa799 100755 --- a/backend/services/navi_offroute/router.py +++ b/backend/services/navi_offroute/router.py @@ -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 = { diff --git a/frontend/src/components/DirectionsPanel.jsx b/frontend/src/components/DirectionsPanel.jsx index 428abee..d8ac724 100644 --- a/frontend/src/components/DirectionsPanel.jsx +++ b/frontend/src/components/DirectionsPanel.jsx @@ -325,8 +325,9 @@ export default function DirectionsPanel({ onClose }) { )} - {/* 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" && (
{BOUNDARY_MODES.map((m) => { const active = boundaryMode === m.id