From 44a8c941087d769033b17d0d6cabc373f403439e Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 1 Jun 2026 08:01:42 +0200 Subject: [PATCH] fix(clients): refresh summary counts after a client mutation The summary card derived active/bucket counts from the live client_stats snapshot, which only refreshed on the next traffic broadcast (up to 5s). A removal therefore left the counts stale while only total tracked the refetched server summary. Clear the snapshot in invalidateAll so the card falls back to the authoritative server summary immediately; the next stats event repopulates it for live tracking. --- frontend/src/hooks/useClients.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/hooks/useClients.ts b/frontend/src/hooks/useClients.ts index 99b22cfa..85cdb7c4 100644 --- a/frontend/src/hooks/useClients.ts +++ b/frontend/src/hooks/useClients.ts @@ -264,6 +264,7 @@ export function useClients() { const invalidateAll = useCallback( () => { markLocalInvalidate(); + setAllClientStats([]); return Promise.all([ queryClient.invalidateQueries({ queryKey: keys.clients.root() }), queryClient.invalidateQueries({ queryKey: keys.inbounds.root() }),