Trip planner
Go to file
Greg Pomerantz 1ba39f7333 Fix arrival/return transfer legs + plan restore + router guards
Transfers (airport<->hotel) were the app's weakest surface; this fixes the
long-standing cluster of bugs in one pass:

- saneRoute(): reject OSRM results implausible for the straight-line distance
  (extract coverage holes once produced a 9h 'route' for a 5km taxi hop);
  applied at every routePts call site
- healTransfers() on load: re-sync transfer endpoints against current hotel +
  AIRPORTS table, re-sync stays[] against the day-base hotel objects (the
  saved stays[] carried pre-coord-fix locations, and dayBase() resolves the
  hotel FROM stays — every return leg was routed to the stale hotel), drop
  implausible or endpoint-drifted stored routes so they re-route cleanly,
  default a missing mode to car, and recover arrLandingMin from the booked
  flight time
- the last-stop->hotel ride is now a first-class editable leg (retLeg): the
  rail row opens the route card with drag + walk/taxi toggle, exactly like
  stop-to-stop legs; previously auto-routed returns seed it
- startMin now actually tracks landing + drop-off (syncArrivalStart had a
  null arrLandingMin guard that silently froze the day's start)
- applySavedPlan re-points day: days becomes a new object tree on restore,
  and the current-day reference stayed on the stale base-plan day — the rail
  rendered the base plan instead of the saved one until a day-tab click
- setDay enriches the opened day (idempotent), so a day opened from a saved
  plan gets its legs (incl. the return leg) routed instead of sitting on
  straight-line estimates

Also in this change set: correct LLM model name, keyword-router removal (chat
goes to the LLM), screenshot_map + relocate_stop tools for the UI LLM,
server-side plan store with localStorage migration, thinking toggle +
keep-alive warm-up, three-state LLM guard with proactive model load,
spatial /near /nearest /corridor SQL fixes, and the full data.js
coordinate correction for the Colombia demo.
2026-09-10 22:46:07 -04:00
mock Fix arrival/return transfer legs + plan restore + router guards 2026-09-10 22:46:07 -04:00
router Move runtime artifacts out of the source tree to ~/trips 2026-09-10 10:03:04 -04:00
spatial Fix arrival/return transfer legs + plan restore + router guards 2026-09-10 22:46:07 -04:00
.gitignore spatial: remove the pgvector path entirely 2026-09-10 15:07:32 -04:00
DESIGN.md maps project: design, survey, mock app, and route-aware planning backend 2026-09-06 00:05:17 -04:00
SURVEY.md maps project: design, survey, mock app, and route-aware planning backend 2026-09-06 00:05:17 -04:00