You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fleet badge counts agents that owe a reply, not agents with a measured problem #493
The Fleet badge on the rail counts the wrong thing. The Fleet page definition says it counts agents with a measured problem. The code counts agents that owe someone a reply.
An agent owing a reply is the normal state of a busy fleet, so the badge is lit most of the time and does not tell the person that something is broken.
What the definition says
Fleet page AC23: the badge counts agents that have at least one measured problem; an agent counts once however many problems it has, unknowns never count, and the badge never counts open asks to the person or silence notices.
AC21 lists the measured problems: a failed latest run, a delivery alarm, and a run that has waited past the dispatch threshold.
What the code does
countFleetAlerts in apps/web/src/j5/fleet/fleet.logic.ts counts agents with openAsks > 0.
openAsks comes from apps/server/src/j5/a2a/FleetReadsHttp.ts: open Exchanges whose receiver is that agent.
apps/web/src/j5/fleet/FleetRailEntry.tsx renders that count as the badge.
The test in fleet.logic.test.ts is named "counts alerts from owed asks only".
A failed run or a delivery alarm does not change the badge. It has been this way since the page shipped in #149.
Decision
The definition is right and the code is wrong (Jackson, 2026-10-08).
Done when
The badge counts agents with at least one of the measured problems in AC21, once each.
An agent that only owes a reply does not count.
Unknown facts do not count.
The test asserts those three things.
Mobile: check whether the mobile app shows a Fleet badge and, if it does, that it uses the same count.
Fixed by #664. The rail badge counts agents with a measured problem now, not agents that owe a reply (summarizeFleetProblems in packages/client-runtime/src/j5/fleetFacts.ts, shown by fleetBadgeLabel in FleetRailEntry.tsx). The test at fleetFacts.test.ts:107 makes sure an open ask on its own doesn't light the badge and each agent counts once. Mobile doesn't have a Fleet page, so there's no badge there to fix. Closing.
Activity
bryantderosier commentedon Dec 1, 2026
Fixed by #664. The rail badge counts agents with a measured problem now, not agents that owe a reply (
summarizeFleetProblemsinpackages/client-runtime/src/j5/fleetFacts.ts, shown byfleetBadgeLabelinFleetRailEntry.tsx). The test atfleetFacts.test.ts:107makes sure an open ask on its own doesn't light the badge and each agent counts once. Mobile doesn't have a Fleet page, so there's no badge there to fix. Closing.