From c97d730a0059b2947451304bed6bdf6dabc5547d Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:46:58 +0100 Subject: [PATCH] fix: show N/A for agent heap/CPU when no JVM metrics available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Indeterminate progress bars were misleading when agents don't report JVM metrics — replaced with plain "N/A" text. Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/src/pages/AgentHealth/AgentHealth.tsx | 42 ++++++++++++++---------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/ui/src/pages/AgentHealth/AgentHealth.tsx b/ui/src/pages/AgentHealth/AgentHealth.tsx index 0f0d363d..0d76b27c 100644 --- a/ui/src/pages/AgentHealth/AgentHealth.tsx +++ b/ui/src/pages/AgentHealth/AgentHealth.tsx @@ -146,27 +146,33 @@ function AgentOverviewContent({ agent }: { agent: AgentInstance }) {
Heap Memory -
- 85 ? 'error' : heapPercent > 70 ? 'warning' : 'success'} - indeterminate={heapPercent == null} - size="sm" - /> - {heapPercent != null ? `${heapPercent}%` : '\u2014'} -
+ {heapPercent != null ? ( +
+ 85 ? 'error' : heapPercent > 70 ? 'warning' : 'success'} + size="sm" + /> + {heapPercent}% +
+ ) : ( + N/A + )}
CPU -
- 80 ? 'error' : cpuPercent > 60 ? 'warning' : 'success'} - indeterminate={cpuPercent == null} - size="sm" - /> - {cpuPercent != null ? `${cpuPercent}%` : '\u2014'} -
+ {cpuPercent != null ? ( +
+ 80 ? 'error' : cpuPercent > 60 ? 'warning' : 'success'} + size="sm" + /> + {cpuPercent}% +
+ ) : ( + N/A + )}
);