Slot Scheduler shows 20 miles for all inspectors

Objective

  • Ensure per-inspector mileage in the Slot Scheduler reflects real routing/distance data instead of a repeated constant (observed 20 miles for every inspector on the same property).

Background

  • Reproduced on RIA – 959 Briarleigh; screenshot shows identical miles despite different availability/service-area signals—likely a shared variable, cached default, or Mapbox response handling bug.

Scope

Frontend

  • Dispatch slot UI: attik-frontend/src/app/tools/dispatch/SlotBlock.tsx displays Math.round(slot.info.miles); optimal slot types live in src/util/types/optimalSlotType.ts (miles: number).
  • Direction helpers: src/util/functions/mapbox/mapboxDirectionsIntoMilesTimesStops.ts and StatsBox.tsx (aggregate miles for a route).
  • Form entry: SlotSchedulerForm.tsx / DynamicMapBar.tsx feed the slot search pipeline—trace where info.miles is populated per inspector.

Backend

  • If miles are computed server-side for optimal slots, follow the dispatch/slot API from the frontend useServer / fetch calls (Decision needed on endpoint names).

References

  • attik-frontend/src/app/tools/dispatch/SlotBlock.tsx
  • attik-frontend/src/util/types/optimalSlotType.ts
  • attik-frontend/src/util/functions/mapbox/mapboxDirectionsIntoMilesTimesStops.ts

Original description

In the Slot Scheduler, all inspectors appear to be showing a distance of 20 miles for the same property, which looks incorrect and may indicate a regression.

Example observed on RIA - 959 Briarleigh. In the screenshot, multiple inspectors are listed with different availability/service-area states, but each one shows Miles: 20.

This should be checked to confirm whether the distance calculation or display is being incorrectly reused across all inspectors.

Ryan was able to replicate this bug.

Google chat: https://chat.google.com/room/AAQAfgRDZA4/VEno0uzGot8/VEno0uzGot8?cls=10

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board
🏠

Main App

Date

26 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.