Skip to content

Multi-city: chain legs on arrival times and flag what cannot be taken - #70

Merged
davd-gzl merged 1 commit into
mainfrom
fix/multi-city
Sep 29, 2026
Merged

davd-gzl merged 1 commit into
mainfrom
fix/multi-city

Conversation

@davd-gzl

Copy link
Copy Markdown
Collaborator

6/10, medium

Problem

A custom multi-city trip can show an itinerary nobody can travel as finished. Paris to Marseille then Marseille to Lille on the same day defaults leg 1 to 18:10 to 21:13 and leg 2 to 06:34, both ticked, and the trip dialog raises no conflict. Each leg picks its fastest train on its own, since 8f6941e, and the dialog only checks for a leg with no train at all.

"Surprise me" had the same blind spot and one more. With the last leg row empty it overwrote leg 1 instead of filling that row, so it never built a second leg, and the hops it did add took any train on the previous leg's date, arrival or not. Both come from c1b3d06.

Fix

A later leg lists only the trains leaving at least 15 minutes after the previous leg's pick arrives, the same margin the connection search uses, and picking another train re-lists every leg after it. A leg with nothing catchable stays open with a notice naming the arrival time and never gets its tick. Surprise fills the first row missing a destination and picks a hop leaving after the previous arrival, on the first day that has one.

Every leg now keeps its availability calendar, including when its day has no train, and the trip dialog dates each leg. Search stops on a leg or tour city naming no station instead of dropping it, the leg fields and headers get names a screen reader can announce, and the saved-tour dialog drops map buttons that did nothing.

Trains a leg cannot catch are hidden rather than greyed out, with a line saying they were. Each leg still defaults to its own fastest catchable train, so an earlier pick can leave a later leg empty where a slower one would not.

A custom leg now lists only the trains leaving at least 15 minutes after
the previous leg's pick arrives, and re-picking a leg re-lists every
later one. A leg with no such train, or dated before the previous
arrival, stays open with a notice instead of a done mark. Every leg
keeps its availability calendar, and the trip dialog dates each leg.

Surprise me fills an empty trailing row from the previous leg's end
instead of re-rolling leg 1, and picks a hop that leaves after that leg
arrives, on the first day with one.

Search stops on a leg or tour city naming no station and says so; an
unknown city stays in its field. Leg fields, headers and city removers
get proper names, the legs editor's links get a taller touch target, and
the saved-tour dialog drops its map actions, which did nothing.
@davd-gzl
davd-gzl merged commit 9ff43ee into main Sep 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant