diff --git a/.changeset/alert-properties-all-channels.md b/.changeset/alert-properties-all-channels.md new file mode 100644 index 0000000000..15021dc71a --- /dev/null +++ b/.changeset/alert-properties-all-channels.md @@ -0,0 +1,5 @@ +--- +'@hyperdx/app': patch +--- + +Show every notification channel on an alert's summary line, rather than only the first. `AlertPropertiesSummary` read `alert.channel` — the legacy single-value mirror of `channels[0]` — so an alert configured with several targets rendered as though it notified one, with nothing to indicate the others existed. Dispatch was always correct; this was a reporting gap, and it pointed the wrong way: someone checking which targets an alert notifies was shown one and would reasonably conclude a channel had not saved. A single-channel alert still names its webhook exactly as before; several channels now render an icon each plus a count. Affects both surfaces that share the component, the alerts page rows and the alert detail page. diff --git a/packages/app/src/components/alerts/AlertPropertiesSummary.tsx b/packages/app/src/components/alerts/AlertPropertiesSummary.tsx index 51b3f867e3..acdf1c2801 100644 --- a/packages/app/src/components/alerts/AlertPropertiesSummary.tsx +++ b/packages/app/src/components/alerts/AlertPropertiesSummary.tsx @@ -16,6 +16,8 @@ type AlertPropertiesSummaryProps = { showSchedule?: boolean; /** * Display name of the notification webhook (the alert only stores its id). + * Used only when the alert has a single channel; several channels render as + * a count, since one name cannot stand for all of them. * The detail page resolves and passes it; the alerts-page rows keep the * generic "Webhook" label. */ @@ -36,6 +38,14 @@ export function AlertPropertiesSummary({ TILE_ALERT_THRESHOLD_TYPE_OPTIONS[alert.thresholdType] ?? alert.thresholdType; + // `channels` is canonical; `channel` is its legacy single-value mirror of + // channels[0]. Reading the mirror meant an alert with several notification + // targets rendered as though it had one, with nothing to say the others + // existed. Falling back to the mirror keeps rows written before + // multi-channel (and the null-typed channel of an alert with no target) + // rendering exactly as they did. + const channels = alert.channels?.length ? alert.channels : [alert.channel]; + return (