Files
pulse/docs/release-control
rcourtman 362ab2f235 Show open alerts in the Machines and Docker host drawers (#2575)
The Machines/Infrastructure drawer and the Docker host drawer built
"Needs attention" from the alerts embedded in each resource. Nothing in
the backend ever filled that list, so every resource carried `alerts:
[]` and both drawers stayed silent while an alert was open (a mock stack
had 0 of 142 resources with embedded alerts while 14 alerts were active;
a real dev Pulse showed `alerts: []` on a host with an open temperature
alert).

**What changes**

- Both drawers read the websocket `activeAlerts` map, the source the
Proxmox node, guest and Mail Gateway drawers already use, through a new
`getAlertsForUnifiedResource` in `frontend-modern/src/utils/alerts.ts`.
It matches the ids the backend writes for a resource (unified id,
canonical primary/superseded ids, Proxmox source id, metrics target)
and, for agent and Docker hosts, `agent:<id>` and `docker:<host source
id>` plus the disk, RAID, container and service alerts nested under
them. Rows show resource and metric like the other drawers, most severe
first.
- The dead embedded path is removed: frontend `ResourceAlert` and the
unused `hasAlerts` filter, the Proxmox summary `alertCount` nothing
rendered, and backend `ResourceFrontend.alerts` / `ResourceAlertInput`
(which also drops `"alerts":[]` from every resource in each broadcast).
- With incident alerts now reaching the infrastructure drawer, a health
reason counts as stated when it is a whole sentence of an alert's text,
so a storage incident alert that joins its summary and impact does not
repeat beside either reason.
- `utils/__tests__/alerts.test.ts` and
`internal/models/converters_additional_test.go` are registered as proof
files for the policies that own `utils/alerts.ts` and the resource
converters.

**Verification**

- Unit tests for the matcher across agent, Proxmox-linked agent, Docker
host, PBS/PMG and pod identity shapes copied from a live `/api/state`;
drawer tests for a host plus a nested disk alert, a Docker host with
nested service alerts, and the incident-sentence dedupe (each fails on
the previous code).
- Private mock stack on this tree at 1440 and 390 px: Apollo-114's
backend-raised memory alert appears in its Machines drawer, a machine
with no alert shows no section, Ops Services 01 lists its three service
alerts, and the vSphere `archive-tier` and `Edge Stateful` drawers show
one row each. Receipt:
`frontend-modern/browser-verification/89dcce7f1458e2ba.json`.
2026-10-06 15:05:28 +01:00
..