Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion lib/jour_dash/trip/graph.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading