mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
91801b10c0
Five files, about 570 lines, that shipped without one. The cases are chosen for what a later change could break quietly rather than for the line count. useRouteAlternatives carries the decision the feature rests on: when a leg already has vias, the road actually being driven is NOT among what the router offers for the two bare endpoints, because it was asked a different question. It is fetched separately and put at the top — without that, opening the picker on a leg you have reshaped shows three roads, none of which is the one you are on and no way back to it. Also pinned: a via that barely moves the route produces one entry rather than two, a second ask abandons the answer still in flight, and only driving, walking and cycling ever reach the router. RoadtripStayModal writes `places.duration_minutes`, which the schedule has read for years and nothing could write. The case that matters is that clearing sends a zero and never a null: the update statement folds a null into "leave it alone", so a null could give a stop a stay and never take one away. The clock cases pin the thing a slider is for over a text box, which is watching the departure move. StopKindPicker is a portal, so it gets the cases a portal makes easy to get wrong: nothing without an anchor, outside-click and Escape both closing, the anchor itself not counting as outside, and picking the kind a stop already has taking it back off rather than setting it twice. RoadtripCategoryPicker stays open on a click, which is the whole reason it is multi-select, and names the kinds rather than counting them. RoadtripAlternativesBar reports each offer by its own index rather than by its position — a position drifts the moment the driven road is prepended — and shows loading, failed and "only one way" as three different answers instead of an empty list.