Skip to content

fix(aci): Add Slack Staging action type to new alert builder#112886

Merged
malwilley merged 5 commits intomasterfrom
malwilley/slack-staging-label
Apr 14, 2026
Merged

fix(aci): Add Slack Staging action type to new alert builder#112886
malwilley merged 5 commits intomasterfrom
malwilley/slack-staging-label

Conversation

@malwilley
Copy link
Copy Markdown
Member

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

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.
@malwilley malwilley requested a review from leeandher April 13, 2026 23:47
@malwilley malwilley requested a review from a team as a code owner April 13, 2026 23:47
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 13, 2026

export enum ActionType {
SLACK = 'slack',
SLACK_STAGING = 'slack_staging',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added

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.
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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
Copy link
Copy Markdown
Contributor

sentry bot commented Apr 14, 2026

Sentry Snapshot Testing

Name Added Removed Modified Renamed Unchanged Status
sentry-frontend
sentry-frontend
0 0 0 0 204 ✅ Unchanged

Copy link
Copy Markdown
Member

@leeandher leeandher left a comment

Choose a reason for hiding this comment

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

thank you! I think it's correct about the ActionMetadata omission though, only fix i see

@malwilley malwilley merged commit 28b349e into master Apr 14, 2026
83 of 87 checks passed
@malwilley malwilley deleted the malwilley/slack-staging-label branch April 14, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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