production

This commit is contained in:
2026-08-28 11:13:15 +05:30
parent d7348e253f
commit 5723d373b2
162 changed files with 17924 additions and 7026 deletions

View File

@@ -458,6 +458,48 @@ class ApiConfig {
// position zero.
'step': pick(sequenceFieldNames) ?? 0,
// ── The stamp that says whether `step` means anything ──
//
// Dropped here until now, which made the whole sequencing contract
// unreadable: [RouteOrder.isSequenced] looks for this key and the adapter
// never wrote it, so every adapted row looked unsequenced and the app
// fell back to nearest-first on routes the hub had actually solved.
//
// The backend's rule, confirmed 25 Aug: **`sequencedat` is the
// authority, not `step`.** Non-null → a route was assigned, follow `step`
// exactly. Null → no route, and the fallback is correct. `step: 0` with a
// null stamp is not a bug: it is a rider holding fewer than two active
// stops, or a stop without coordinates — neither of which is a route.
'sequencedat': pick(RouteOrder.sequencedAtKeys),
// ── The arrival, as the backend records it ──
//
// Confirmed by the backend team and shipped with their redeploy:
// `/reached` writes an arrival **event**, and `GET /miler/bookings`
// returns it on the row. There is no `Arrived_At_Pickup` booking status
// and there never was — the status stays `Pickup_Scheduled` and the
// stamp beside it is what says he is there.
//
// Carried through here so the rung can be rebuilt from server data alone
// after a refresh or a restart, which is the thing the local arrival
// record exists to stand in for. See [riderStageOf].
'reachedat': pick(const [
'reachedat',
'reachedAt',
'reached_at',
'arrivedat',
]),
'arrivallatitude': pick(const [
'arrivallatitude',
'arrivalLatitude',
'arrival_latitude',
]),
'arrivallongitude': pick(const [
'arrivallongitude',
'arrivalLongitude',
'arrival_longitude',
]),
// ── Which leg this stop is ──
//
// Also live, also previously hardcoded: every row came through as