Skip to content

Mark live departure times, and show clock times for later buses - #118

Merged
joreilly merged 4 commits into
mainfrom
departure-live-marker-and-clock-times
Sep 23, 2026
Merged

joreilly merged 4 commits into
mainfrom
departure-live-marker-and-clock-times

Conversation

@joreilly

@joreilly joreilly commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Live vs scheduled: departures with a real-time reading (delaySeconds non-null) show the real-time symbol before the time. Timetable-only departures have no symbol and a muted colour, so they no longer look like a tracked bus. Applies to My stops, a route's stop departures and the map stop sheet.
  • Clock times for later buses: from 20 minutes out a departure shows a clock time (19:36) instead of a countdown (1h 12min). Nearer departures still count down. The tracking card follows the same rule.
  • "Due" only for the last 30 seconds: minutes are rounded to the nearest instead of down. "Due" used to show up to 59s early, and "1 min" covered up to 1m59s. Departure lists, the tracking card and the route map's bus card all share one minutesUntil() helper.
  • Countdown logic is extracted into departureWhen() and covered by DepartureDisplayTest.
  • Strings: adds live_time ("Live time" / "Am beo", the icon's accessibility label) and removes the now-unused countdown_hours_min.
  • Renovate: holds Gradle wrapper updates below 9.7 (allowedVersions: "<9.7"), since 9.7 doesn't work with the current IntelliJ. 9.6.x patch releases still come through. This should make Renovate close Update Gradle to v9.7.1 #117.

Please check the Irish: "Am beo" is my translation.

Test plan

  • :shared:jvmTest (73 pass) and testAndroidHostTest
  • Compiled Android, iOS arm64 + simulator, wasmJs, desktop
  • Checked on a Pixel 7a emulator against live data: live, late, on-time and scheduled rows all render as intended
  • CI green
  • Check it in Irish (Settings → Gaeilge)

🤖 Generated with Claude Code

https://claude.ai/code/session_015L2XVVs7zvasvQEmM78ZMV

joreilly and others added 4 commits September 23, 2026 18:41
A timetable-only time looked exactly like one from a tracked bus. Live
times (the backend sent a delay) now carry the real-time symbol, and
scheduled ones go without it in a muted colour.

From 20 minutes out a departure shows its clock time ("18:42") instead
of "1h 12min": easier to plan with, and it matches the printed timetable.
The countdown logic moves into a plain function so it can be tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015L2XVVs7zvasvQEmM78ZMV
The wrapper is pinned to 9.6.1 because 9.7 doesn't work with the current
IntelliJ, but Renovate kept proposing 9.7.1 (#84, #117). 9.6.x patch
releases are still allowed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015L2XVVs7zvasvQEmM78ZMV
Countdowns rounded down, so "Due" showed up to 59 seconds early and
"1 min" covered anything up to 1m59s. Departure lists, the tracking card
and the route map's bus card now share one rounding helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015L2XVVs7zvasvQEmM78ZMV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015L2XVVs7zvasvQEmM78ZMV
@joreilly
joreilly merged commit 5461269 into main Sep 23, 2026
3 checks passed
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.

1 participant