From 7ab00171beb994f749f200013ebb08c2d9782d64 Mon Sep 17 00:00:00 2001 From: g-but <41178744+g-but@users.noreply.github.com> Date: Wed, 20 May 2026 18:54:53 +0200 Subject: [PATCH] fix(system): SystemStats useFetch gets 10s timeoutMs ceiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /api/system runs four shell tools each capped at 5s; a 10s client-side abort gives 2× margin for network/render jitter while ensuring a hung call resolves to FetchErrorState instead of pinning the panel on stale data for the full 30s poll interval. Uses the timeoutMs option introduced in eed1228 for GitHubStatus. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/system/SystemStats.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/system/SystemStats.tsx b/src/components/system/SystemStats.tsx index 8f2d54205..e53994be6 100644 --- a/src/components/system/SystemStats.tsx +++ b/src/components/system/SystemStats.tsx @@ -39,7 +39,10 @@ function UsageBar({ usedMiB, totalMiB }: { usedMiB: number; totalMiB: number }) } export function SystemStats() { - const { data, loading, error, refetch } = useFetch("/api/system", { intervalMs: 30_000 }); + // 10s ceiling = 2× the server's 5s runTool cap; covers network jitter while + // ensuring a hung /api/system call surfaces FetchErrorState instead of + // pinning the panel on stale data for the full 30s poll interval. + const { data, loading, error, refetch } = useFetch("/api/system", { intervalMs: 30_000, timeoutMs: 10_000 }); if (loading) { return
Loading system status...
;