Conversation
…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
saponifi3d
approved these changes
Mar 27, 2026
Contributor
saponifi3d
left a comment
There was a problem hiding this comment.
🎉 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?)
Member
Author
We try to avoid testing loading states since those tests can be brittle and often lead to flakes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
useAutomationProjectIdscallsuseDetectorsQuery({ids: []}), which sends an emptyidfilter to the API and gets back all detectors.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