Skip to content

Add leave-now notifications, using a per-station walking time #2

Description

@ssandys

The README already names this as "the most likely first addition, and the one that would make the widget actively useful rather than merely informative." Headway currently tells you when the train arrives; it does not tell you when to leave.

What it needs. A per-station walking time. Two ways in, cheapest first:

  • a walkMinutes field per saved station, edited from the panel and persisted in headway.json
  • derived from the station coordinates already in StationData.js plus the user's location, which Stations.search already uses for its distance sort

What is already in place. nowSec ticks every second, so a countdown crossing a threshold is detectable without refetching. The notification queue in Service.qml is a real queue rather than a single slot, and already handles a three-message burst — so adding a third notification type does not reintroduce the dropped-message bug documented there.

Design question worth settling first: whether "leave now" fires once per arrival or once per departure window, and what happens when two saved routes at one station qualify at the same moment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions