Tanstack Start
Fleet & trackingVehicles

Vehicle history

Historical route, fuel, camera captures, and stops for a vehicle.

Path: /dashboard/fleet-management/vehicles/:vehicleId/history

Purpose

Review time-range–based history: animated route positions, optional fuel events, camera captures, and stops, with a synchronized map.

Prerequisites

  • view_vehicle (same as vehicle detail).
  • APIs: Vehicles.history, Vehicles.stops (when Stops view active), Vehicles.fuelHistory (when Fuel view active), Vehicles.cameraCaptures (when Camera view active).

Date and time range

  1. Open the Vehicle history tab.
  2. If startDate / endDate are not in the URL, the app fills defaults (last 12 hours) and writes them to the search string.
  3. Use the history date filter in the tab bar (calendar control):
    • Adjust start and end datetime.
    • Quick presets include Today, Yesterday, Last 7 days, Last 12 hours (exact labels match the UI).
  4. Apply navigates on the same route with ISO timestamps in startDate and endDate.

Default (route) view

  • Loads history frames for the range.
  • Shows vehicle snapshot card (including chassis, odometer, ignition, speed, movement, timestamp when available in the current frame).
  • Timeline: step through history frames (controls in the UI) to move the vehicle along the route on the map.
  • Quick links switch to specialized views (below).

Fuel history

  1. From the default view, choose Fuel history.
  2. Data loads via fuelHistory with query params startDate, endDate, and mode:
    • Smoothed (default) vs raw is controlled by a toggle in the UI (smoothed / raw API mode).
  3. Selecting a fuel event can fly the map to the event coordinates when latitude/longitude exist.

Camera history

  1. Choose Camera history.
  2. Data loads via cameraCaptures for the range.
  3. Selecting footage can center the map on the capture location when coordinates exist.

Stops

  1. Choose Stops.
  2. stops query runs for the range.
  3. Selecting a stop can center the map on that stop.

Map behavior

  • The map shows route/history path, and optional overlays for fuel, stops, or camera depending on the active view.
  • Fly-to targets reset when you pick different items.

Troubleshooting

  • Loading spinner stuck: History request slow or failing; check network and retry.
  • Empty fuel or camera: No data in range, device without camera, or backend returned an empty list—try widening the date range.
  • Timeline does not move: No history frames; verify telematics ingestion for the period.

On this page