Skip to content

fix(topology): pass query object to useLastAlerts to render node alert badges (#6836) - #6844

Open
MyDude92 wants to merge 1 commit into
keephq:mainfrom
MyDude92:fix/topology-alert-badges-query
Open

MyDude92 wants to merge 1 commit into
keephq:mainfrom
MyDude92:fix/topology-alert-badges-query

Conversation

@MyDude92

@MyDude92 MyDude92 commented Sep 24, 2026 •

Copy link
Copy Markdown

🎯 Objective

Fixes #6836. Binds topology map node alert badges to active alert telemetry by passing a query parameter object to useLastAlerts rather than undefined.


📊 Before vs. After Benchmark

Parameter Supplied SWR Query Resolution Alerts Hook Result Topology Node Alert Badges
useLastAlerts(undefined) SWR key resolves to null Query skipped (0 items) ❌ Hidden (Never Render)
useLastAlerts({ cel: '', limit: 1000, offset: 0 }) Active fetch initiated Active alerts populated ✅ Visible with firing count

🛠️ Precise Kernel Diff & Verification

-  const { data: allAlerts } = useLastAlerts(undefined);
+  const { data: allAlerts } = useLastAlerts({ cel: '', limit: 1000, offset: 0 });
npm test -- topology-map.test.tsx
  • Validation: Verified SWR key trigger and non-zero badge counts on topology service nodes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Alert badges never render on topology map nodes

1 participant