[ Bug]: Alert badges never render on topology map nodes
Describe the bug
Topology map nodes never show the "N alerts" badge, even when alerts correlated with the service (alert.service == TopologyService.service) exist and are firing. Incident badges render fine; alert badges never do.
To Reproduce
Steps to reproduce the behavior:
- Have a topology with services (any provider) and at least one alert whose
servicematches a topology service. - Go to 'Topology'.
- Nodes show application tags but no alert badge; in the browser network tab, loading the topology page never issues a
/alerts/queryrequest.
Root cause
keep-ui/app/(keep)/topology/ui/map/topology-map.tsx (line 457):
const { data: allAlerts } = useLastAlerts(undefined);In keep-ui/entities/alerts/model/useAlerts.ts the SWR key is computed as api.isReady() && query ? <key> : null, so with query === undefined the key is null, the fetch never runs, allAlerts stays empty and the alertsCount > 0 branch in service-node.tsx is unreachable.
Expected behavior
Nodes with correlated alerts show an "N alerts" badge; clicking it opens the alert feed filtered by the service (the click handler and CEL filter already work).
Screenshots
Before (firing alert correlated with uniproxy-06 / uniproxy-04 — no badges):

After the fix (badges on both nodes):

Badge click opens the filtered feed (cel=service=="uniproxy-06"):

Additional context
- Observed on main @ fe5c8964, self-hosted (docker compose).
- One-line fix: pass an explicit query, e.g.
useLastAlerts({ cel: "", limit: 1000, offset: 0 }). Happy to submit a PR (AI-assisted, verified on a lab stand with a live firing/resolved alert cycle).
Source: keephq/keep