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.
This commit is contained in:
gpt-engineer-app[bot]
2025-11-11 14:14:32 +00:00
parent eac8c7a77f
commit 53b576ecc1

View File

@@ -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) {