ReviewOS

stacks/smakelo

B3.4: Courier app views

#15
Closed chris opened this 9 days ago ·
9 days ago

Part of #1. Web views that also run inside the Craft native shell (#17).

Shift toggle, incoming offer screen (accept/decline with countdown), active delivery screen (pickup/dropoff cards, nav handoff to Google/Apple Maps, keepAwake during active leg, foreground watchPosition -> ping endpoint), delivery history + earnings statement.

9 days ago

Live at https://smakelo.stacksjs.com/courier - pick one of the invented couriers (no accounts in a demo whose couriers are invented; a real deployment resolves them from the session, which the framework's ping and stop endpoints already do).

Shows the shift toggle, the job being carried with distance, what is queued behind it, navigation handed off to the phone's own map, and earnings read from the ledger rather than recomputed.

Two bugs found by using it, both invisible from the code:

  • A dispatched route is planned until the courier sets off, and the console only looked for active ones - so a courier who had just been handed a job saw "nothing assigned".
  • Nothing started the route. Until it is active, pings find no active route, so positions are stored while no ETA is recomputed and no arrival fires: a courier driving would have sat still on the customer's map.

Sign in to comment on this issue.