feat(Departures): show in-seat transfers - #3462
Open
thecristen wants to merge 4 commits into
Open
Conversation
thecristen
force-pushed
the
cbj/departures-continues-as
branch
from
September 9, 2026 19:37
abbac58 to
27dbbaa
Compare
thecristen
force-pushed
the
cbj/departures-continues-as
branch
from
September 9, 2026 19:40
27dbbaa to
dadab90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Asana Ticket: Follow up on "🛜 🐞 Daily Schedules sometimes doesn't show school trips "
This leverages the addition to transfers to the V3 API from this PR:
/transfersendpoint api#1074Implementation
When fetching and parsing schedules, we include the included trip's from_trip_transfers. When parsing trips, we use that included transfer to populate a new property:
next_trip_id. This indicates a trip you can transfer to.I edited
Schedules.Repo.schedule_for_trip/1to detect the presence of a populatednext_trip_idand fetch and append even more schedules from thatNote
This output results in longer lists of schedules/predictions which might now cover more than one trip. This complicates filtering based on
stop_sequence, because new trips will have a new sequence ofstop_sequencevalues.%Dotcom.ScheduleFinder.TripHeading{}to hold the route/headsign for later rendering.Screenshots
Dev on left, this PR on right
Screen.Recording.2026-09-10.at.10.02.58.mov
How to test
In transfers.txt we can see the trips which come into play, so we can look up those trips and find departures pages to test. I've been enjoying these:
http://localhost:4001/departures?route_id=57&direction_id=1&stop_id=917
http://localhost:4001/departures?route_id=741&direction_id=0&stop_id=place-crtst
http://localhost:4001/departures?route_id=Boat-F10&direction_id=0&stop_id=Boat-Aquarium
http://localhost:4001/departures?route_id=37&direction_id=1&stop_id=11839