From 53b576ecc110cbcbc7eac5405c6d84e11467ae79 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 14:14:32 +0000 Subject: [PATCH] Invalidate all system-alerts queries on resolve Update PipelineHealthAlerts resolve flow to invalidate all severity-specific system_alerts queries (not just the base key), ensuring resolved alerts disappear from UI. Adds broad invalidation pattern and preserves loading state handling. --- src/components/admin/PipelineHealthAlerts.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/admin/PipelineHealthAlerts.tsx b/src/components/admin/PipelineHealthAlerts.tsx index 85d74299..4d336f39 100644 --- a/src/components/admin/PipelineHealthAlerts.tsx +++ b/src/components/admin/PipelineHealthAlerts.tsx @@ -72,9 +72,9 @@ export function PipelineHealthAlerts() { console.log('✅ Alert resolved successfully'); toast.success('Alert resolved'); - // Invalidate queries to refresh the UI + // Invalidate all system-alerts queries (critical, high, medium, etc.) await Promise.all([ - queryClient.invalidateQueries({ queryKey: queryKeys.monitoring.systemAlerts() }), + queryClient.invalidateQueries({ queryKey: ['system-alerts'] }), queryClient.invalidateQueries({ queryKey: queryKeys.monitoring.systemHealth() }) ]); } catch (err) {