From 7197ec1c9694fadb471b6b00c2dff9e59eea9a4e Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 13 Sep 2026 14:34:52 +0200 Subject: [PATCH] fix(roadtrip): a stay that outlasts the day takes the road with it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three things the day boundary was swallowing, all from the same stay. The stop after it stayed on yesterday. It is reached a full day later but at a later reading on the clock, and the only rule watching for a new day was "the clock went backwards" — which that never does. The schedule's own count knows, as long as it is read as a difference: a day whose first arrivals came out negative is lifted whole, and reading the lifted offsets raw once moved an early stop to tomorrow while leaving the late one behind. It now crosses over properly, marked as having set off the day before. The morning after started at the exact minute the stay ended, as if the road to the first stop took no time. The carried minute is a departure; the drive from there is added to it. And that drive was invisible. It was on the map and in the day's total, but the rail jumped straight to a stop at 08:11 after a stay that ended at 08:00. It gets the same band any other drive gets, above the stop it arrives at — except where a stop crossed over, which already draws that road under its own block. --- .../components/Roadtrip/RoadtripSidebar.tsx | 5 +++ shared/src/roadtrip/assemble.ts | 8 ++++- shared/src/roadtrip/nightSpill.spec.ts | 34 ++++++++++++++++--- shared/src/roadtrip/nightSpill.ts | 26 +++++++++++--- shared/src/roadtrip/planning-types.ts | 11 ++++++ 5 files changed, 75 insertions(+), 9 deletions(-) diff --git a/client/src/components/Roadtrip/RoadtripSidebar.tsx b/client/src/components/Roadtrip/RoadtripSidebar.tsx index f7cbb3f47..41a798387 100644 --- a/client/src/components/Roadtrip/RoadtripSidebar.tsx +++ b/client/src/components/Roadtrip/RoadtripSidebar.tsx @@ -1609,6 +1609,11 @@ function DaySection({ day, selectedAssignmentId, onSelectStop, onReorderStop, on {/* Folded to the header, and with it off the map: what is not listed here is not drawn there either, which is the whole point of putting a day away. */}