소스 검색

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.
MHSanaei 10 시간 전
부모
커밋
44a8c94108
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      frontend/src/hooks/useClients.ts

+ 1 - 0
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() }),