The panel has been complete except for the one part that answers. Its
composer was deliberately disabled — it used to accept text, light up the
send button, and swallow the submit, because no assistant endpoint
existed. This connects it to the one that does.
It is enabled only when a model is configured AND the page has an agent,
checked at runtime via /assistant/status rather than assumed at build
time. The placeholder says which of the two is missing:
"Not connected yet" no model on this deployment
"No assistant for this page yet" no agent for this route
"Ask about this page" live
Two different facts, two different sentences. A person on Inventory can
move to Sales and get an answer today; a person whose deployment has no
model can do nothing from the browser. Flattening both into "not
connected" would be true and useless.
The old rule is kept: never accept a message nothing will read.
An answer shows its working — the tools it ran, their row counts, and a
link to the page holding the same rows. Buddy states things with the
confidence of a sentence, and the only honest way to present that is
beside the evidence, so a person can disagree with it. Refused calls are
shown too: an answer that quietly dropped one would look like Buddy chose
not to look.
A partial answer says so in amber, not as a grey hint. An answer cut off
mid-sentence reads as a complete one otherwise, which is the failure the
flag exists to prevent.
The thread clears on navigation. An answer about Sales sitting above the
Inventory page reads as being about what is on screen; losing the history
is the smaller cost.
Phase 2 ships one agent, covering Console and Sales. The rest arrive as
backend config, not as changes here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three of the features the old console had and ours did not, built on what
the data can actually support rather than on what the column names imply.
Two findings changed the shape of the work:
`riderlogs` is not a GPS trail. Every ping a rider sends carries the SAME
coordinate — one rider's 2,404 pings on 14 August all read 11.052998,
76.929958, and the same holds on every day and region checked. Distance,
speed and "time moving" cannot come from it. The Fleet page therefore
reports presence only: who was online and for how long, inferred from the
gaps between check-ins, because `login`, `logout` and `workhours` are empty
on all 320,132 August rows. It says out loud that it cannot tell a rider
parked all day from one who crossed the city.
The delivery ladder is not the order its columns are in. `starttime` is
later than `arrivaltime` on 316 of 316 rows, which looks corrupt and is not:
`starttime` is per-DROP, stamped when the rider sets off for that address
having finished the last one. Read as assign -> arrive -> pickup -> start ->
deliver, every duration is positive. On tenant 916 that shows the bottleneck
is not the riding: a median 69.5 minutes passes between handing an order to
a rider and that rider reaching the shop, against 0.6 minutes at the counter.
- Map tab on dispatch, fed by `deliveries.riderslat/lon` — the only rider
positions that move (353 distinct across 461 rows). Tenant-scoped, so a
shop sees its own rounds. The line joins stops in worked order and says
it is not a route.
- Plan vs actual tab: promised against delivered, and a step breakdown of
where the hours go. `actualkms` is excluded — it equals the planned `kms`
to the decimal on every delivered row, so it is a copy, not a measurement.
- Fleet page in the platform console: a presence gantt and a map of where
each rider is registered.
- `ridername` holds a delivery status on more rows than it holds a name for
two riders in five, so names are resolved by excluding the status
vocabulary first.
- leaflet, wrapped directly rather than via react-leaflet, lazy-loaded so
only the pages with a map pay for it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JYEsb8PNZ19G9R8gUjTU7n