fix(panel): phantom agent states in dashboard + metrics counters

by_state.running / a.state 'running'/'stopped' never exist in the
orchestrator enum (offline/starting/active/waiting/idle/stopping), so
these counters were structurally zero — same class as the agents-page
Active bug, remaining two sites.
This commit is contained in:
Renn F
2026-07-15 16:07:55 +02:00
parent 9b0a8b0fae
commit 14ee9b3b49
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -250,11 +250,11 @@ function PerformanceTabContent() {
// Agent counts
const runningAgents =
status?.by_state?.running ||
agentList.filter((a) => a.state === "running").length;
status?.by_state?.active ||
agentList.filter((a) => a.state === "active").length;
const idleAgents =
status?.by_state?.idle ||
agentList.filter((a) => a.state === "idle" || a.state === "stopped").length;
agentList.filter((a) => a.state === "idle" || a.state === "offline").length;
const waitingAgents =
status?.waiting_count ||
agentList.filter((a) => a.state === "waiting_long").length;
+1 -1
View File
@@ -80,7 +80,7 @@ export function useMetrics() {
blockers,
agents: {
total_agents: agentStatus?.total_agents ?? 0,
running: agentStatus?.by_state?.running ?? 0,
running: agentStatus?.by_state?.active ?? 0,
idle: agentStatus?.by_state?.idle ?? 0,
waiting: agentStatus?.waiting_count ?? 0,
errors: 0,