Skip to content

Conversation

@joshlarson
Copy link
Contributor

Scope

No ticket. I noticed that SF2.0 was crashing in the presence of 👇 systemwide alert.

Screenshot 2026-01-26 at 3 34 04 PM

That alert has the attributes that it is a :service_change, which status_row_heading/1 tries to endow with endpoint stops, and it has no routes associated with it.

The correct behavior here is to return [] - no endpoint-stops.

The current behavior is to crash and present the (admittedly well-designed) 500 page.

Implementation

  • endpoint_stops/2 checks the route ID's provided, and if there are no non-nil route ID's given, it short-circuits and returns [].

Screenshots

Screenshot 2026-01-26 at 3 37 55 PM

How to test

Visit any bus page (how about this one?) in SF2.0 and rejoice.

Notes

This is only affecting SF2.0 right now, because SF2.0 is the only place where <.status_row_heading /> is rendered for bus alerts. The alerts on the existing bus alerts page, for instance, use a different component that doesn't render endpoint stops.

@joshlarson joshlarson requested a review from a team as a code owner January 26, 2026 20:40
@joshlarson joshlarson requested a review from thecristen January 26, 2026 20:40
@joshlarson joshlarson enabled auto-merge (squash) January 26, 2026 20:43
@joshlarson joshlarson merged commit 8456bc1 into main Jan 26, 2026
26 checks passed
@joshlarson joshlarson deleted the jdl/fix/empty-routes-for-endpoint-stops branch January 26, 2026 21:14
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