feat(aci): Add inline alert creation inside monitor form#105765
feat(aci): Add inline alert creation inside monitor form#105765
Conversation
| onClick={toggleDrawer} | ||
| > | ||
| {t('Connect an Alert')} | ||
| </Button> |
There was a problem hiding this comment.
Missing ref on Edit Alerts button breaks drawer toggle
Medium Severity
The ref is only attached to the "Connect Existing Alerts" button in the empty state (line 114), but the "Edit Alerts" button in the non-empty state (line 93) also uses toggleDrawer. When alerts exist, ref.current is null, causing shouldCloseOnInteractOutside to always return true. This can cause a race condition where clicking "Edit Alerts" while the drawer is open triggers both the close-on-interact-outside behavior and the onClick toggle, potentially causing the drawer to close then immediately reopen.
Additional Locations (1)
| source: 'drawer', | ||
| success: false, | ||
| }); | ||
| } |
There was a problem hiding this comment.
Missing error message leaves loading indicator stuck on failure
Medium Severity
When createAutomation fails in the catch block, addLoadingMessage was called earlier but no corresponding addErrorMessage is called to replace it. The import on line 5 only includes addLoadingMessage and addSuccessMessage, not addErrorMessage. This leaves the "Creating Alert..." loading indicator visible indefinitely after a failure, with no error feedback shown to the user.
This adds a new "Create Alert" drawer with a similar, slightly stripped down alert creation form. This allows users to quickly create a new alert for their monitor without being taken out of the experience.
Summary of changes:
CleanShot.2026-01-06.at.14.41.34.mp4