Skip to content

Conversation

@joshlarson
Copy link
Contributor

@joshlarson joshlarson commented Jan 29, 2026

Scope

Asana Ticket: ❗[AM Alerts] Update CR status station bypass to stop(s) skipped

Implementation

  • A bit of re-shuffling in how <.commuter_rail_status /> combines alert count and effect to form a label.
  • Special-casing in both <.commuter_rail_status /> and <.commuter_rail_route_status /> to map :station_closure to "Stop(s) Skipped" instead of "Station Closure(s)".
  • [Question] Should Alert.human_effect/1 just return "Stop Skipped" when given %Alert{effect: :station_closure}? Should human_effect/1 own pluralized effects (because Inflex.pluralize won't work on Stop Skipped, and also isn't translateable)?
    • IMO these questions don't need to be resolved in this PR, but I have been thinking about them.

Screenshots

Mode page

Before
Screenshot 2026-01-29 at 2 14 17 PM

After
Screenshot 2026-01-29 at 2 13 54 PM

Route page

Before on the left; After on the right
Screenshot 2026-01-29 at 2 16 02 PM

How to test

Right now, there are a lot of test alerts, so there aren't actually any CR routes where a station closure would be visible on the commuter rail status page (since they all get collapsed into Service Alerts or See Alerts. When I tested locally, I commented out service_change: 3 from the definition of @service_impacting_alerts so that the station closures wouldn't get drowned out, which is what's in the screenshots above.

@joshlarson joshlarson requested a review from a team as a code owner January 29, 2026 19:24
@joshlarson joshlarson requested a review from thecristen January 29, 2026 19:24
@thecristen
Copy link
Collaborator

[Question] Should Alert.human_effect/1 just return "Stop Skipped" when given %Alert{effect: :station_closure}?

I'm leaning towards no if there are contexts where "Station Closure" is clearer phrasing, but this is probably a good question for the larger team.

Should human_effect/1 own pluralized effects (because Inflex.pluralize won't work on Stop Skipped, and also isn't translateable)?

Probably-ish. Like maybe there's a plural_human_effect/1 or a modified human_effect/2 that can suss out the plural vs singular forms.

@joshlarson joshlarson enabled auto-merge (squash) January 30, 2026 19:26
@joshlarson joshlarson merged commit cbb9457 into main Jan 30, 2026
17 checks passed
@joshlarson joshlarson deleted the jdl/feat/stops-skipped-for-commuter-rail-status branch January 30, 2026 19:38
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