Several stops: show each alert with its own stop, and don't change pages while it scrolls #16

Closed
opened 2026-11-25 16:56:47 -05:00 by cmoriarty · 1 comment
Owner

What happens now

On a sign with several stops, the stop pages rotate on their own timer, and the alert line on the bottom row runs on a separate timer. So the page can change to another stop while a stop's alert is still scrolling. You then read one station's alert under a different station's name and trains. That's confusing.

This is how it was designed. The service-alerts spec says so in two requirements:

  • The turns don't follow pages: "an alert's line, the turns and the dot SHALL carry on across page changes without starting again."
  • The status line doesn't follow pages: "the header keeps scrolling smoothly while the rows above change."

The alert dot also shows on every page, not just on the stop the alert is for.

What it should do

  1. Each alert shows with its own stop. An alert scrolls only while the stop it's for is on screen.
  2. Each alert scrolls at least once per visit. When a stop with an alert comes up, its alert scrolls through at least once before the sign moves on.
  3. No page change during a scroll. The sign waits for the scroll to finish before it goes to the next stop. The page stays up longer than usual when it needs to. (This matters most.)

Questions to settle in the design

  • One alert returned for two stops. Right now it shows only once in the cycle. Should it scroll on each stop it's for?
  • Several alerts on one stop. Should all of them scroll before the page changes, or one per visit, taking turns from visit to visit? A long message plus a stopped train's row could keep a page up for a long time.
  • The dot. Should it show only on the stops that have an alert? Should other pages show something else, such as a dot on that stop's page indicator?
  • Other things that scroll. The same rules probably apply to a stopped train's row (train-display) and to a warning too wide for the row (outage-display). Those are already per stop or per page.
  • One stop. Nothing changes for a sign with one stop.

Done when

  • An OpenSpec change replaces the two "don't follow pages" requirements. The service-alerts spec (and display-motion, if it covers page timing) says when a page may change.
  • A scenario has two stops with an alert on one of them. Its snapshots show the alert scrolling only under its own stop, and the page staying up until the scroll ends. The existing two-stop alert snapshots are approved again.
  • docs/mbta-compliance.md is updated if what the sign shows changes.

Related: #4 (several messages at once, and how they share the turns).

## What happens now On a sign with several stops, the stop pages rotate on their own timer, and the alert line on the bottom row runs on a separate timer. So the page can change to another stop while a stop's alert is still scrolling. You then read one station's alert under a different station's name and trains. That's confusing. This is how it was designed. The `service-alerts` spec says so in two requirements: - **The turns don't follow pages**: "an alert's line, the turns and the dot SHALL carry on across page changes without starting again." - **The status line doesn't follow pages**: "the header keeps scrolling smoothly while the rows above change." The alert dot also shows on every page, not just on the stop the alert is for. ## What it should do 1. **Each alert shows with its own stop.** An alert scrolls only while the stop it's for is on screen. 2. **Each alert scrolls at least once per visit.** When a stop with an alert comes up, its alert scrolls through at least once before the sign moves on. 3. **No page change during a scroll.** The sign waits for the scroll to finish before it goes to the next stop. The page stays up longer than usual when it needs to. (This matters most.) ## Questions to settle in the design - **One alert returned for two stops.** Right now it shows only once in the cycle. Should it scroll on each stop it's for? - **Several alerts on one stop.** Should all of them scroll before the page changes, or one per visit, taking turns from visit to visit? A long message plus a stopped train's row could keep a page up for a long time. - **The dot.** Should it show only on the stops that have an alert? Should other pages show something else, such as a dot on that stop's page indicator? - **Other things that scroll.** The same rules probably apply to a stopped train's row (`train-display`) and to a warning too wide for the row (`outage-display`). Those are already per stop or per page. - **One stop.** Nothing changes for a sign with one stop. ## Done when - An OpenSpec change replaces the two "don't follow pages" requirements. The `service-alerts` spec (and `display-motion`, if it covers page timing) says when a page may change. - A scenario has two stops with an alert on one of them. Its snapshots show the alert scrolling only under its own stop, and the page staying up until the scroll ends. The existing two-stop alert snapshots are approved again. - `docs/mbta-compliance.md` is updated if what the sign shows changes. Related: #4 (several messages at once, and how they share the turns).
Author
Owner

Done in v0.1.11 (commit bd8000e), OpenSpec change alerts-with-their-stop.

What the sign does now

With several stops on pages:

  • Each alert shows with its own stop. A page takes turns only through the alerts MBTA returned for that page's stop. The dot shows only that stop's messages, and Park Street's page has no dot when only Forest Hills has an alert.
  • The page waits for the pass. A page with something to say rests for its dwell (8 s by default), then one message passes, and the page changes only when the pass is over. No page changes during a scroll. A page is never held more than two minutes, as a safety net.
  • One message a visit. With several, each visit passes the next one, going on from where the last visit stopped, so no stop keeps the panel for long.
  • An alert MBTA returns for two stops passes on each of their pages.
  • A stopped train's row and a warning too wide for the row follow the same rules.
  • DOWN still moves on at once, even during a pass. The message it cut short passes whole at that stop's next visit.
  • One stop, or one list of several stops, works as before: 8 s of trains, then a pass, then 30 s between passes.

The dot's new colours, from ticket 4, are in that ticket.

The questions in this ticket

  • One alert for two stops: it passes on each stop's page.
  • Several alerts on one stop: one a visit, taking turns from visit to visit. All of them in one visit would keep one stop up for a minute and more.
  • The dot: only on the stops that have something to say. Coloured page dots for the other stops were offered on the demo page and not taken.
  • Other things that scroll: the same rules.
  • One stop: unchanged.

How it was checked

  • New scenario look-alerts-one-of-two-stops: Forest Hills' closure and delay pass only under Forest Hills' page, the page stays to the end of each pass (checkpoint forest-hills-held-to-the-end-of-the-pass, 25 s into an 8 s dwell), and Park Street follows with no dot.
  • Re-timed and approved again: look-alert-two-stops, warn-alerts-two-stops (its checkpoints renamed for the stop each message passes under), look-short-names in three fonts, warn-one-stop-fails, replay-two-stops-rush.
  • New tests in test/test_looks: test_each_stop_shows_only_its_own_alerts, test_a_page_waits_for_its_line_to_pass, test_one_message_passes_each_visit, test_an_alert_for_two_stops_passes_on_each_page, test_down_moves_on_even_while_a_line_passes.
  • All checks pass: pio test -e native 292 of 292, native_asan 292 of 292, program check 309 checkpoints with 0 differences, the browser build 308 with 0 differences, and both boards build (static RAM unchanged on both). CI passed on the commit.
  • docs/mbta-compliance.md updated.

Release

v0.1.11 was published on 2026-12-01 at 15:58 Boston time, with all seven files. Each sign installs it at its next nightly check (03:00 to 03:59 Boston time), or a minute after its first trains the next time it starts.

Done in **v0.1.11** (commit bd8000e), OpenSpec change `alerts-with-their-stop`. ## What the sign does now With several stops on pages: - **Each alert shows with its own stop.** A page takes turns only through the alerts MBTA returned for that page's stop. The dot shows only that stop's messages, and Park Street's page has no dot when only Forest Hills has an alert. - **The page waits for the pass.** A page with something to say rests for its dwell (8 s by default), then one message passes, and the page changes only when the pass is over. No page changes during a scroll. A page is never held more than two minutes, as a safety net. - **One message a visit.** With several, each visit passes the next one, going on from where the last visit stopped, so no stop keeps the panel for long. - **An alert MBTA returns for two stops passes on each** of their pages. - **A stopped train's row and a warning too wide for the row** follow the same rules. - **DOWN** still moves on at once, even during a pass. The message it cut short passes whole at that stop's next visit. - **One stop, or one list of several stops,** works as before: 8 s of trains, then a pass, then 30 s between passes. The dot's new colours, from ticket 4, are in that ticket. ## The questions in this ticket - **One alert for two stops:** it passes on each stop's page. - **Several alerts on one stop:** one a visit, taking turns from visit to visit. All of them in one visit would keep one stop up for a minute and more. - **The dot:** only on the stops that have something to say. Coloured page dots for the other stops were offered on the demo page and not taken. - **Other things that scroll:** the same rules. - **One stop:** unchanged. ## How it was checked - New scenario `look-alerts-one-of-two-stops`: Forest Hills' closure and delay pass only under Forest Hills' page, the page stays to the end of each pass (checkpoint `forest-hills-held-to-the-end-of-the-pass`, 25 s into an 8 s dwell), and Park Street follows with no dot. - Re-timed and approved again: `look-alert-two-stops`, `warn-alerts-two-stops` (its checkpoints renamed for the stop each message passes under), `look-short-names` in three fonts, `warn-one-stop-fails`, `replay-two-stops-rush`. - New tests in `test/test_looks`: `test_each_stop_shows_only_its_own_alerts`, `test_a_page_waits_for_its_line_to_pass`, `test_one_message_passes_each_visit`, `test_an_alert_for_two_stops_passes_on_each_page`, `test_down_moves_on_even_while_a_line_passes`. - All checks pass: `pio test -e native` 292 of 292, `native_asan` 292 of 292, `program check` 309 checkpoints with 0 differences, the browser build 308 with 0 differences, and both boards build (static RAM unchanged on both). CI passed on the commit. - `docs/mbta-compliance.md` updated. ## Release `v0.1.11` was published on 2026-12-01 at 15:58 Boston time, with all seven files. Each sign installs it at its next nightly check (03:00 to 03:59 Boston time), or a minute after its first trains the next time it starts.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
moriarty-engineering/my-stop#16
No description provided.