From ce8a2a1525d5922f41b8107deee2c7d19bdda6d4 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sun, 12 Apr 2026 21:25:00 +0200 Subject: [PATCH] fix: use raw timestamp string for throughput/error chart data Avoids Date round-trip that crashes with toISOString() on invalid timestamps from the timeseries API. Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/src/pages/AgentInstance/AgentInstance.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/pages/AgentInstance/AgentInstance.tsx b/ui/src/pages/AgentInstance/AgentInstance.tsx index 98de8471..3522b3ea 100644 --- a/ui/src/pages/AgentInstance/AgentInstance.tsx +++ b/ui/src/pages/AgentInstance/AgentInstance.tsx @@ -80,7 +80,7 @@ export default function AgentInstance() { ? (new Date(buckets[1].timestamp).getTime() - new Date(buckets[0].timestamp).getTime()) / 1000 : 60; return buckets.map((b: any) => ({ - date: new Date(b.timestamp), + time: b.timestamp, throughput: bucketSecs > 0 ? b.totalCount / bucketSecs : b.totalCount, latency: b.avgDurationMs, errorPct: b.totalCount > 0 ? (b.failedCount / b.totalCount) * 100 : 0, @@ -129,12 +129,12 @@ export default function AgentInstance() { const throughputData = useMemo(() => { if (!chartData.length) return []; - return chartData.map((d: any) => ({ time: d.date.toISOString(), throughput: d.throughput })); + return chartData.map((d: any) => ({ time: d.time, throughput: d.throughput })); }, [chartData]); const errorData = useMemo(() => { if (!chartData.length) return []; - return chartData.map((d: any) => ({ time: d.date.toISOString(), errorPct: d.errorPct })); + return chartData.map((d: any) => ({ time: d.time, errorPct: d.errorPct })); }, [chartData]); // Application logs