fix(dashboard): split active vs running counts in agents overview label

The Overview dropdown previously rendered "X active · Y running" where
both X (stats.activeCount) and Y (activeAgents.length) counted agents
whose state was either "active" or "running" — so an agent that was
merely enabled but idle would still inflate the "running" tally. The
label now counts each state distinctly so "running" only reflects
agents that are mid-heartbeat. Adds AgentsOverviewBar.test.tsx to lock
in the new contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-06 08:04:47 -07:00
parent 6f46ab017f
commit 3e68271693
3 changed files with 111 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
---
"@runfusion/fusion": patch
---
Fix the misleading "X active · Y running" label in the Agents overview
dropdown. Both numbers previously counted agents whose state was either
`active` or `running`, so the "running" tally over-reported by including
idle-but-enabled agents. The label now counts each state distinctly:
"active" reflects only `state === "active"` and "running" reflects only
`state === "running"`.