mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-08-26 17:31:37 +00:00
PROBLEM 1 (latency): short in-town Auto routes (Twin Falls->Filer ~7 mi) took 60+ seconds because urban OSM-parking density exploded hybrid candidate evaluation. Fixes in router.py: - MIN_HYBRID_DISTANCE_KM 8.0 -> 24.0 (~15 mi): in-town trips never enter hybrid eval at all -- this alone eliminates the reported latency on Matt's routes. - HYBRID_MAX_TRAILHEADS 20 -> 8: fewer candidates even on long trips. - HYBRID_OVERALL_TIMEOUT_S = 6.0: a wall-clock check inside the candidate loop bails hybrid eval past 6 s (logger.warning) and keeps the single-mode / best-so-far winner. - HYBRID_EARLY_ABORT_MIN = 30.0: once a candidate beats the single-mode winner by 30+ min, stop probing the rest and ship it. - Per-stage timing logs (logger.info) in _route_auto / _try_hybrid_auto: "single-mode probing took Xs", "hybrid candidate gathering: N candidates in Xs", "hybrid probing took Xs across N tested candidates". PROBLEM 2 (hybrid render): investigated the missing network polyline. The stated hypothesis (a hybrid drive leg using a non-"network" segment_type) is DISPROVEN -- _build_hybrid_response emits segment_type=="network" for BOTH the drive and offroad legs (verified against the live response), the OFFROUTE_NETWORK_LAYER filter matches it, MODE_COLORS is fully defined, and the store passes data.route correctly. The one real fragility is the MapLibre color match: if network_mode is ever null the whole layer can fail to paint (wilderness still draws via its static color -- matching the exact symptom). Hardened it with ["to-string", ["get","network_mode"]] so a missing/unknown mode falls through to the blue fallback and the layer always paints. I could not reproduce the exact missing-leg render headlessly (all backend shapes + frontend filters are correct), so a Chrome MCP repro is recommended to confirm #2 is resolved; if a render issue remains it should be diagnosed in-browser. Tests: hybrid synthetic-trip distances bumped 20 -> 30 km (past the new 24 km gate); new test_hybrid_early_abort_stops_probing; surface-change integration savings lowered into the 15-30 min band so both candidate sources are still probed (not early-aborted). Full offroute suite: 84 passed. npm run build: clean. PROBLEM 3 (off-road wilderness timeout) is out of scope -- separate follow-up; the wilderness pathfinder is untouched here. Co-authored-by: Matt <mj@k7zvx.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| components | ||
| hooks | ||
| themes | ||
| utils | ||
| api.js | ||
| App.jsx | ||
| config.js | ||
| index.css | ||
| main.jsx | ||
| store.js | ||