Skip to content

feat(Departures): show in-seat transfers - #3462

Open
thecristen wants to merge 4 commits into
mainfrom
cbj/departures-continues-as
Open

feat(Departures): show in-seat transfers#3462
thecristen wants to merge 4 commits into
mainfrom
cbj/departures-continues-as

Conversation

@thecristen

@thecristen thecristen commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

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:

Implementation

  • 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/1 to detect the presence of a populated next_trip_id and fetch and append even more schedules from that

Note

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 of stop_sequence values.

  • Finagled the code for daily schedules "next arrivals" to find where in the list of schedules we transition from one trip to the next, and insert a new value: a %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

@thecristen
thecristen requested a review from a team as a code owner September 1, 2026 12:52
@thecristen
thecristen requested a review from lvachon1 September 1, 2026 12:52
@thecristen thecristen added the dev-green Deploy to dev-green label Sep 1, 2026
@thecristen thecristen removed the dev-green Deploy to dev-green label Sep 3, 2026
@thecristen
thecristen force-pushed the cbj/departures-continues-as branch from abbac58 to 27dbbaa Compare September 9, 2026 19:37
@thecristen
thecristen force-pushed the cbj/departures-continues-as branch from 27dbbaa to dadab90 Compare September 9, 2026 19:40
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