From e050814c42033fb45ace6a9bc265f17d17b6de8e Mon Sep 17 00:00:00 2001
From: Maurice <61554723+mauriceboe@users.noreply.github.com>
Date: Mon, 25 May 2026 22:27:49 +0200
Subject: [PATCH] feat(planner): real road routes (OSRM) with travel-time
connectors (#1060)
* feat(planner): real road routes (OSRM) with travel-time connectors
Replace the straight-line "as the crow flies" route with real OSRM road
geometry (FOSSGIS routed-car/-foot) and an Apple-Maps style render
(blue casing under a lighter core) on both the Leaflet and Mapbox GL
maps. Routes are off by default and toggled per session, with a
driving/walking mode switch in the day footer.
Each day shows per-segment travel time/distance connectors between
places, computed from the OSRM legs and split at transport bookings.
Also redesigns the day header for visual consistency: vertical
number+weather capsule, name with a divider before the date, subtle
hotel/rental pills that stay on one line, and a hover-revealed 2x2
action square (edit / add transport / add note / collapse). Drops the
Google Maps button.
* test(planner): update route hook tests for calculateRouteWithLegs
---
client/src/components/Map/MapView.test.tsx | 18 +-
client/src/components/Map/MapView.tsx | 69 +---
client/src/components/Map/MapViewGL.tsx | 46 +--
client/src/components/Map/RouteCalculator.ts | 76 ++++-
.../Planner/DayPlanSidebar.test.tsx | 21 +-
.../src/components/Planner/DayPlanSidebar.tsx | 310 ++++++++++++------
.../src/components/Weather/WeatherWidget.tsx | 13 +-
client/src/hooks/useRouteCalculation.ts | 58 ++--
client/src/index.css | 18 +
client/src/pages/TripPlannerPage.tsx | 12 +-
client/src/types.ts | 11 +
.../hooks/useRouteCalculation.test.ts | 53 +--
server/src/app.ts | 2 +-
13 files changed, 441 insertions(+), 266 deletions(-)
diff --git a/client/src/components/Map/MapView.test.tsx b/client/src/components/Map/MapView.test.tsx
index 902a8f32..ce27ae1c 100644
--- a/client/src/components/Map/MapView.test.tsx
+++ b/client/src/components/Map/MapView.test.tsx
@@ -128,7 +128,8 @@ describe('MapView', () => {
it('FE-COMP-MAPVIEW-006: renders polyline when route has 2+ points', () => {
render(