fix(aci): Add Slack Staging action type to new alert builder#112886
fix(aci): Add Slack Staging action type to new alert builder#112886
Conversation
The backend defines a SLACK_STAGING action type, but the frontend ActionType enum and actionNodesMap were missing it. This caused the action to fall back to displaying the raw type string "slack_staging" instead of a proper label with the Slack UI components.
|
|
||
| export enum ActionType { | ||
| SLACK = 'slack', | ||
| SLACK_STAGING = 'slack_staging', |
There was a problem hiding this comment.
Bug: The new SLACK_STAGING action is missing an entry in ActionMetadata, causing it to be omitted from UI summaries or displayed as "undefined" in automation names.
Severity: MEDIUM
Suggested Fix
Add an entry for ActionType.SLACK_STAGING to the ActionMetadata map in static/app/components/workflowEngine/ui/actionMetadata.tsx. This entry should define the name and icon for the new action type, ensuring it is displayed correctly throughout the UI.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: static/app/types/workflowEngine/actions.tsx#L38
Potential issue: The pull request introduces a new action type, `SLACK_STAGING`, but
fails to add a corresponding entry for it in the `ActionMetadata` map. This omission
leads to two distinct UI bugs. First, when an automation's actions are summarized,
`SLACK_STAGING` actions will be silently filtered out and not displayed because their
name resolves to `undefined`. Second, when generating an automation's name, if a
`targetDisplay` is not configured for the action, the name can render as "Notify via
undefined". This results in an incomplete and confusing user experience for automations
utilizing the new action type.
Did we get this right? 👍 / 👎 to inform future reviews.
Without this entry, the action summary and auto-generated names would fall back to generic text instead of showing the Slack icon and "Slack (Staging)" label.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 79bbbe3. Configure here.
Without this, configuring a Slack Staging action with a metric detector would incorrectly show a warning that the action will not fire.
Sentry Snapshot Testing
|
leeandher
left a comment
There was a problem hiding this comment.
thank you! I think it's correct about the ActionMetadata omission though, only fix i see

This new action type wasn't in the frontend config, so it doesn't know what to render for the label or action UI.