diff --git a/CLAUDE.md b/CLAUDE.md index 96be5a2..95a18c7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,7 @@ Everything about a delivery lives in one Journey execution of the graph defined Node flow, in dependency order: - **Inputs**: `location_driver`, `location_pickup`, `location_dropoff`, `item_to_deliver`, `delivery_price_cents` (set at start), then `picked_up?`, `handed_off?`, `dropped_off?`, `rating` (set later by the UI). -- **GPS simulation**: `time_simulation` is a `tick_recurring` (every 6s) that stays active until `payment_collection` exists. It unblocks the `mutate` node `driver_location_current_update`, which advances `location_driver` by one step (`mutates: :location_driver`). +- **GPS simulation**: `time_simulation` is a `tick_recurring` (every 5s) that stays active until `payment_collection` exists. It unblocks the `mutate` node `driver_location_current_update`, which advances `location_driver` by one step (`mutates: :location_driver`). - **`current_activity`** (compute): recomputed whenever the driver location or any flag changes. Produces labels like `driving_to_pickup`, `waiting_for_item`, `driving_to_dropoff`, `waiting_for_customer`, `handed_off`, `dropped_off`, `payment_collected`. The UI buttons key off these strings. - **`payment_collection`** → **`trip_completed_at`**: fire once `handed_off?` or `dropped_off?` is true. `trip_completed_at != nil` is the UI's "done" signal. - **`rating_reminder_timer`** (`tick_once`, +10s after payment) → **`rating_reminder`** (compute, only if `rating` is still unset). diff --git a/lib/jour_dash/trip/graph.ex b/lib/jour_dash/trip/graph.ex index 19b9d15..1cb3bae 100644 --- a/lib/jour_dash/trip/graph.ex +++ b/lib/jour_dash/trip/graph.ex @@ -144,7 +144,7 @@ defmodule JourDash.Trip.Graph do tick_recurring( :time_simulation, unblocked_when(:payment_collection, fn x -> not provided?(x) end), - fn _ -> {:ok, System.system_time(:second) + 6} end, + fn _ -> {:ok, System.system_time(:second) + 5} end, keep_latest_completed_computations: 10 ), # Generates a simulated GPS reading on every tick and stores it