Skip to content

VSN-2100/ feat(trip tracking) : add real-time passenger trip tracking with HTTP polling

fatima senan a demandé de fusionner feature/VSN-2100 vers develop

The changes included in this MR are as follows :

  • Implement real-time driver position tracking using HTTP polling (every 3s)
  • Fix multiple navigation and state management bugs in the tracking screen

Updated: Tracking store (trackingStore.ts)

  • Connect/disconnect polling actions integrated into Zustand store
  • Dedicated validatePassengerTrip() function for API data validation (id, date format, status)
  • 5-minute cache on fetchTrips to avoid redundant API calls on tab switches

Fixed: Tracking screen

  • Stale tripId from Expo Router: only use tripId param when fromPlanning === "true"
  • Trip selection: sort by closest to current time instead of returning first match
  • Back button: useEffect deps changed from [] to [fromPlanning] so it reacts to navigation changes
  • Always disconnect polling in cleanup, removed !isTrackingActive guard

Rapports de requête de fusion