Skip to content

fix(home): show last stop instead of live cues after trip ends - #8

Merged
Backroads4Me merged 1 commit into
Backroads4Me:mainfrom
lucavb:fix/home-ended-trip-label
Aug 19, 2026
Merged

Backroads4Me merged 1 commit into
Backroads4Me:mainfrom
lucavb:fix/home-ended-trip-label

Conversation

@lucavb

@lucavb lucavb commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add current_stop_is_live to GET /api/home so the frontend can distinguish a live stop from the fallback last stop
  • When not live, the home card shows Last Stop, hides the pulse dot, and updates the postmark to ★ LAST STOP ★ with the departure date
  • Share stopLive.js across home and trip pages so stale is_current flags no longer show "currently here" on ended stops

Test plan

  • pytest api/tests/test_home_current_stop.py (8 cases)
  • Ended Vilnius stop locally: "Last Stop", no pulse, postmark shows Aug 13 departure date
  • Active stop (today in date range): "Currently At", pulse dot, and "On the Road" postmark with arrival date

GET /api/home still returns the most recent stop when nothing matches
today, so the card kept "Currently At", the pulse dot, and an "On the
Road" postmark after Vilnius had ended. Add current_stop_is_live and drive
CurrentLocationCard from it, with stopLive.js as a fallback when older
APIs omit the field so web-before-API deploys do not mark every trip ended.

Open-ended stops now stay live through departure day, stale is_current on
past stops is ignored, and trip/stop badges share the same rules. Postmark
dates use the calendar portion of stop dates to avoid timezone drift.
@Backroads4Me
Backroads4Me merged commit cb57076 into Backroads4Me:main Aug 19, 2026
1 check 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.

2 participants