Skip to content

Add stale-data indicator on map, fix offline caching masking real outages - #173

Merged
bryantran24 merged 1 commit into
mainfrom
last-updated-indicator
Jul 23, 2026
Merged

Add stale-data indicator on map, fix offline caching masking real outages#173
bryantran24 merged 1 commit into
mainfrom
last-updated-indicator

Conversation

@bryantran24

Copy link
Copy Markdown
Collaborator

Closes #142

Summary

  • Adds a "last updated" chip to the map screen (top-left). Hidden during normal polling; only appears if data hasn't refreshed in 30+ seconds, then flashes "Updated" once it recovers. Addresses Add “Last updated” indicator for live bus data #142, but as a hide-unless-stale indicator rather than the always-on timestamp the issue described.
  • Fixes locations/etas/velocities silently serving stale cached data (up to 2 weeks old) when offline instead of failing. They now always set Cache-Control: no-store, so a dropped connection fails honestly instead of looking like a successful poll.

Adds a translucent chip (top-left, opposite the FAB stack) that stays
hidden while polling is healthy, and only appears once vehicle data
hasn't refreshed in 30s+, flashing "Updated" briefly on recovery -
addresses #142 with a hide-unless-stale approach rather than an
always-on timestamp.

Also fixes locations/etas/velocities being served from OkHttp's disk
cache while offline (masking real outages as stale-but-successful
200s); those endpoints now always set Cache-Control: no-store so a
dropped connection fails honestly instead of replaying old data.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bryantran24
bryantran24 merged commit bbc8713 into main Jul 23, 2026
2 checks passed
@bryantran24
bryantran24 deleted the last-updated-indicator branch July 23, 2026 01:19
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.

Add “Last updated” indicator for live bus data

1 participant