Skip to content

Conversation

@joshlarson
Copy link
Contributor

@joshlarson joshlarson commented Dec 22, 2025

Before

Screenshot 2025-12-23 at 3 29 29 PM

After

Screenshot 2025-12-23 at 3 29 12 PM

Other Examples

Off-Schedule

Screenshot 2025-12-23 at 3 24 22 PM

Status Lifted from the Prediction

Screenshot 2025-12-23 at 3 27 10 PM Screenshot 2025-12-23 at 3 32 48 PM

Asana Ticket: [SF/UD] CR: Show train number, track number, and status when available, and HH:MM instead of N min

@joshlarson joshlarson force-pushed the jdl/sf2.0/ud/cr-fancy-labels branch from 7d5b675 to cc2d9a7 Compare December 22, 2025 19:44
@joshlarson joshlarson changed the base branch from jdl/sf2.0/ud/more-bus-and-cr-trips to jdl/sf2.0/ud/bus-interleave-schedule-and-prediction-data December 22, 2025 19:44
@joshlarson joshlarson marked this pull request as ready for review December 22, 2025 20:18
@joshlarson joshlarson requested a review from a team as a code owner December 22, 2025 20:18
@joshlarson joshlarson added the dev-blue Deploy to dev-blue label Dec 23, 2025
@joshlarson joshlarson removed the dev-blue Deploy to dev-blue label Dec 23, 2025
Base automatically changed from jdl/sf2.0/ud/bus-interleave-schedule-and-prediction-data to main December 23, 2025 20:42
@joshlarson joshlarson force-pushed the jdl/sf2.0/ud/cr-fancy-labels branch from a55dfbf to 8b0489a Compare December 23, 2025 20:52
@joshlarson joshlarson enabled auto-merge (squash) December 23, 2025 20:53
Comment on lines +166 to +170
|> case do
nil -> nil
"Commuter Rail" -> nil
name -> name |> String.trim("Commuter Rail - ")
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a similar function in Dotcom.ScheduleFinder, I wonder if we should start sharing here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was thinking the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...however, could we treat that as a follow-up? The two implementations aren't exactly compatible with each other, and I'm not sure about blocking this (and the various PR's that have stacked up behind this) on reconciling them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defp arrival_substatus(%{
predicted_schedule: %PredictedSchedule{schedule: nil}
}),
do: :on_time
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this compare the time? Otherwise wouldn't we risk rendering "on time" when showing a status-less added trip that doesn't happen to be on time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. What should it say when a trip has been added? I guess "Added" would be a reasonable choice... I defaulted to "on time", because when a trip doesn't have a schedule, then it definitely hasn't gotten off that schedule.

Can ask Chase, and/or add this to the list of assumptions in Notion.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, I recommend asking. IMO I don't think "Added" would be meaningful, and maybe this is a case for no status

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chase is out of office until next week - shall we come up with a stop-gap guess until he comes back?

Ticket to follow-up on this

}),
headsign: trip.headsign,
platform_name: platform_name(predicted_schedule),
status: predicted_schedule |> PredictedSchedule.status(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this field? I'm not sure if you're using upcoming_departure.status directly (you read the same value into arrival_substatus)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh oops - I added this for debugging and forgot to remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bye!

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.

3 participants