Skip to content

fix(aci): Show empty state in Alerts list projects column when no detectors are connected#111732

Merged
malwilley merged 4 commits intomasterfrom
malwilley/fix-alert-list-projects
Mar 30, 2026
Merged

fix(aci): Show empty state in Alerts list projects column when no detectors are connected#111732
malwilley merged 4 commits intomasterfrom
malwilley/fix-alert-list-projects

Conversation

@malwilley
Copy link
Copy Markdown
Member

@malwilley malwilley commented Mar 27, 2026

Fixes ISWF-2161

When an automation has no connected detectors, the projects column in the automation list view shows all org projects. This happens because useAutomationProjectIds calls useDetectorsQuery({ids: []}), which sends an empty id filter to the API and gets back all detectors.

CleanShot 2026-03-27 at 13 24 36

While looking at this, I noticed that there is a perf improvement we can make here (these requests can be batched) which I filed on our backlog: https://linear.app/getsentry/issue/ISWF-2324/performance-improvement-batch-fetch-requests-for-connected

…onnected

When an automation has no connected detectors, the projects column
showed all projects because useDetectorsQuery({ids: []}) fetched all
detectors. Disable the query when detectorIds is empty and show an
em-dash empty state instead.

Fixes ISWF-2161
@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 27, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 27, 2026
@malwilley malwilley changed the title fix(alerts): Show empty state for projects column when no detectors connected fix(aci): Show empty state in Alerts list projects column when no detectors are connected Mar 27, 2026
@malwilley malwilley marked this pull request as ready for review March 27, 2026 20:25
@malwilley malwilley requested a review from a team as a code owner March 27, 2026 20:25
Copy link
Copy Markdown
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 lgtm -- is there a test case we should think about adding for the state transitions? (Since this is just loading a placeholder, feels like maybe not?)

@malwilley
Copy link
Copy Markdown
Member Author

🎉 lgtm -- is there a test case we should think about adding for the state transitions? (Since this is just loading a placeholder, feels like maybe not?)

We try to avoid testing loading states since those tests can be brittle and often lead to flakes

@malwilley malwilley merged commit 3a2ad5b into master Mar 30, 2026
74 checks passed
@malwilley malwilley deleted the malwilley/fix-alert-list-projects branch March 30, 2026 17:03
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants