Repository navigation
fix(web): count open anomalies apart from firing incidents on the overview banner - #2360
Conversation
…rview banner Anomaly rules open alert incidents, so a single open anomaly showed as a red "Firing now 1 incident". The banner now counts only non-anomaly incidents as firing, shows an amber "Open anomalies" banner when only anomalies are open, and appends the open anomaly count to the firing one.
This comment has been minimized.
This comment has been minimized.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
This comment has been minimized.
This comment has been minimized.
Maple review🟢 Confidence 9/10 · safe to merge. The anomaly split is correct and pinned by a scene test; the all-clear assertion at The Overview banner now separates anomaly-rule incidents (amber "Open") from firing incidents (red "Firing now"), drawn as one slim strip that disappears when nothing is open. The count split is correct; the two findings already open on this pull request still stand.
Still open from earlier reviews
|
What
Anomaly rules open ordinary alert incidents, so the Overview banner counted an open anomaly as a firing incident: one anomaly showed as a red "Firing now · 1 incident · 1 critical".
The banner now treats incidents from anomaly rules (
signalType: "anomaly") as open anomalies, and is a one-line strip about half the old height:The count split is
heroCountsOfinview-hero.ts, shared by the page and a new/lab/anomaly-alerts?state=overview-bannerstate.Screenshots
/lab/anomaly-alerts?state=overview-banner)After: the three cases, captioned in the lab. Only one strip ever shows on the page; all clear draws nothing.
Not changed
The service health list under the banner still counts an anomaly-rule incident as an alert on its service.
Verification
vitest run src/page/overview src/lab: 130 passed, including a new scene test for both cases.oxlint -c .oxlintrc.effect.jsonclean on the changed files, web typecheck clean,ui:patterns:checkOK.🤖 Generated with Claude Code
Summary by CodeRabbit