Implement order tracking intelligence providers#237
Conversation
|
Follow-up implemented in a1d4680: added Routing & Tracking organization settings, admin Tracking Defaults, provider metadata in tracking-settings responses, boot-time currentUser tracking settings load, richer order Tracking Intelligence display, compact confidence/fallback/stale indicators, and separate summary/provider route cache semantics. Verification: PHP lint/style checks passed; Prettier, ESLint, and ember-template-lint passed for touched frontend files. Pest remains blocked locally because server_vendor/pestphp/pest/vendor/autoload.php is missing and Symfony Console classes are unavailable in the local vendor install. |
|
Tracking display follow-up implemented in 4092d3a: replaced the debug-style tracker panel with an operator summary, removed duplicated stops/route legs from Tracking, formatted ETA/date/distance values, collapsed provider details into a quiet route-quality line, surfaced only one operator-relevant warning, and reduced card/overlay badge clutter to a single compact exception indicator. Verification: Prettier, ESLint, ember-template-lint, and git diff --check passed. Focused Ember test build succeeded, but browser execution failed before loading tests with a global vendor/test harness error: Class extends value undefined / assets/tests.js not loaded. |
|
Tracking panel density follow-up implemented in fcf8c1d: removed the four-column metric layout, reduced metric text size, gave destination its own compact row, wrapped route-quality metadata, replaced the large warning block with a compact warning strip, and tightened label section padding/image sizes. Verification: Prettier, ember-template-lint, and git diff --check passed for the touched template. |
|
Tracking layout correction implemented in 5730556: removed field-info-container from the tracking metric blocks, switched to explicit stacked label/value cards, kept destination stacked and full-width, and restored the warning strip with concrete yellow background classes for dark/light mode instead of opacity utilities. Verification: Prettier, ember-template-lint, and git diff --check passed for the touched template. |
|
Tracking/route ETA split follow-up pushed in 3efc1d7. Summary:
Verification:
Focused test notes:
|
|
Tracking UI overhaul follow-up pushed in 2022aab. What changed in this pass:
Verification:
|
|
Follow-up tracking UI polish pushed in 83f43fb. What changed:
Verification:
Build completed successfully; existing intl/PostCSS warnings are still present in the repo output. |
|
Follow-up pushed in 9356fb6. Corrections in this pass:
Verification:
|
|
Small route summary fix pushed in c4c6234. The ALL STOPS count now uses the same buildRoutePointsFromPayload path as RouteList, so the summary count matches the actual rendered pickup/waypoint/dropoff list instead of manually reading payload.waypoints.length from a shape that can report 0. Verification:
Note: I left the existing local unstaged edit in addon/components/route-list.hbs untouched. |
|
Small progress strip fix pushed in 3022969. For pickup/dropoff-only orders, the tracking progress rail no longer centers the first and last dots inside half-width segments. The first stop anchors to the left edge and the final stop anchors to the right edge, so the rail uses the full available width. Verification:
Note: existing local unstaged addon/components/route-list.hbs change was left untouched. |
|
Tracking settings follow-up pushed in 2aa82eb. Changes:
Verification:
Note: existing local unstaged addon/components/order/details/purchase-rate.hbs edit was left untouched. |
|
Tracking settings advanced toggle pushed in 4cd16fe. Changes:
Verification:
Note: existing local unstaged addon/components/order/details/purchase-rate.hbs edit was left untouched. |
|
Small polish for the tracking advanced toggle pushed in b3ac3ce. Changes:
Verification:
Note: existing local unstaged addon/components/order/details/purchase-rate.hbs edit remains untouched. |
Summary
This refactors FleetOps order tracking into a provider-neutral Order Tracking Intelligence layer instead of the old monolithic
OrderTrackerOSRM helper.Root Cause / Current Limitation
OrderTrackerwas doing too much in one class: stop selection, OSRM calls, progress math, formatting, caching, and fallback behavior. It also only supported OSRM directly, which meant no clean way to use traffic-aware providers or third-party last-mile intelligence providers.Architecture
OrderTrackerinternals with a thin compatibility facade overTrackingIntelligenceService.server/src/Trackingdomain with:TrackingContextBuilderTrackingIntelligenceServiceTrackingProviderManagerTrackingProviderRegistrygoogle_routesosrmcalculatedGET /settings/tracking-settingsPOST /settings/tracking-settingsfleetops.osrm.host.Third-Party Provider Contract
Providers implement
TrackingProviderInterface:Third-party packages can register providers through
TrackingProviderRegistry, allowing Mapbox, TomTom, HERE, GraphHopper, Fleet Engine, or proprietary providers without modifying FleetOps core.Tracker Data Shape
tracker_datais now a canonical nested object with:providerfallback_providerconfidencewarningsdriverprogressactive_stopnext_stoprouteetainsightscapabilitiesEmber consumers were updated to read the new nested shape.
Verification
php -lon touched backend filesphp-cs-fixer fix --dry-run --config=.php-cs-fixer.phpon touched PHP filesgit diff --checkprettier --checkon touched frontend fileseslint --no-cacheon touched JS filesember-template-linton touched HBS filesBlocked in local environment:
./server_vendor/bin/pest server/tests/TrackingIntelligenceTest.phpfails because the local Pest package is missingserver_vendor/pestphp/pest/vendor/autoload.php../server_vendor/bin/phpunit --filter trackingdelegates back to Pest and fails with Pest's "Please run ./vendor/bin/pest instead" guard.phpstaninitially hit sandbox EPERM on its local socket; after escalation it ran but reported many repo/PHPStan-bootstrap issues around Laravel helper discovery, Eloquent magic properties, and generic array annotations.Notes
Google Fleet Engine is intentionally not implemented here. This PR leaves it as a future enterprise/stateful provider adapter because Fleet Engine has a broader vehicle/task lifecycle than a routing provider.