From 9b1c59ddf3b7da55be03192afd666f361ff5c34f Mon Sep 17 00:00:00 2001 From: Malachi Willey Date: Mon, 13 Apr 2026 16:44:29 -0700 Subject: [PATCH 1/5] fix(automations): Add Slack Staging action type to builder 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. --- static/app/types/workflowEngine/actions.tsx | 1 + static/app/views/automations/components/actionNodes.tsx | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/static/app/types/workflowEngine/actions.tsx b/static/app/types/workflowEngine/actions.tsx index 764fbd20e2116f..9a7c6b3c9bfc2c 100644 --- a/static/app/types/workflowEngine/actions.tsx +++ b/static/app/types/workflowEngine/actions.tsx @@ -35,6 +35,7 @@ export enum ActionTarget { export enum ActionType { SLACK = 'slack', + SLACK_STAGING = 'slack_staging', MSTEAMS = 'msteams', DISCORD = 'discord', PAGERDUTY = 'pagerduty', diff --git a/static/app/views/automations/components/actionNodes.tsx b/static/app/views/automations/components/actionNodes.tsx index a1f7f3c3113019..935ed4a91bb8bb 100644 --- a/static/app/views/automations/components/actionNodes.tsx +++ b/static/app/views/automations/components/actionNodes.tsx @@ -217,6 +217,15 @@ export const actionNodesMap = new Map([ validate: validateSlackAction, }, ], + [ + ActionType.SLACK_STAGING, + { + label: t('Slack (Staging)'), + action: SlackNode, + details: SlackDetails, + validate: validateSlackAction, + }, + ], [ ActionType.WEBHOOK, { From 0da1342bbad148ee8b92dc5180930da145c9998f Mon Sep 17 00:00:00 2001 From: Malachi Willey Date: Mon, 13 Apr 2026 19:23:30 -0700 Subject: [PATCH 2/5] fix(automations): Add slack_staging to test Record --- static/app/views/automations/new.spec.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/app/views/automations/new.spec.tsx b/static/app/views/automations/new.spec.tsx index b52e27ee41a453..ce65fc7ee6f8b7 100644 --- a/static/app/views/automations/new.spec.tsx +++ b/static/app/views/automations/new.spec.tsx @@ -490,6 +490,14 @@ describe('AutomationNewSettings', () => { targetDisplay: null, }, }, + slack_staging: { + type: 'slack_staging', + config: { + targetType: 'specific', + targetIdentifier: '', + targetDisplay: '', + }, + }, }; await waitFor(() => expect(saveWorkflow).toHaveBeenCalled()); From 79bbbe31de67a92fe39a5c5993fb2b34e0e7154a Mon Sep 17 00:00:00 2001 From: Malachi Willey Date: Mon, 13 Apr 2026 21:10:30 -0700 Subject: [PATCH 3/5] fix(automations): Add Slack Staging to ActionMetadata map 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. --- static/app/components/workflowEngine/ui/actionMetadata.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/app/components/workflowEngine/ui/actionMetadata.tsx b/static/app/components/workflowEngine/ui/actionMetadata.tsx index b88dfa67c9df9d..b3e45ca8395c15 100644 --- a/static/app/components/workflowEngine/ui/actionMetadata.tsx +++ b/static/app/components/workflowEngine/ui/actionMetadata.tsx @@ -68,6 +68,10 @@ export const ActionMetadata: Partial< name: t('Slack'), icon: , }, + [ActionType.SLACK_STAGING]: { + name: t('Slack (Staging)'), + icon: , + }, [ActionType.WEBHOOK]: { name: t('Webhook'), icon: , From 52a5ff2cfd92302e94fecc456b121d8d11f1ca75 Mon Sep 17 00:00:00 2001 From: Malachi Willey Date: Tue, 14 Apr 2026 09:02:05 -0700 Subject: [PATCH 4/5] fix(automations): Add SLACK_STAGING to metric detector supported actions Without this, configuring a Slack Staging action with a metric detector would incorrectly show a warning that the action will not fire. --- .../app/views/automations/utils/getIncompatibleActionWarning.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/static/app/views/automations/utils/getIncompatibleActionWarning.tsx b/static/app/views/automations/utils/getIncompatibleActionWarning.tsx index c2cdc9e15ee084..86aae718701193 100644 --- a/static/app/views/automations/utils/getIncompatibleActionWarning.tsx +++ b/static/app/views/automations/utils/getIncompatibleActionWarning.tsx @@ -5,6 +5,7 @@ import type {Detector} from 'sentry/types/workflowEngine/detectors'; const METRIC_DETECTOR_SUPPORTED_ACTIONS = new Set([ ActionType.EMAIL, ActionType.SLACK, + ActionType.SLACK_STAGING, ActionType.MSTEAMS, ActionType.PAGERDUTY, ActionType.OPSGENIE, From bf840c9482e8ef551d2def4516f69dc1a5a3b5a6 Mon Sep 17 00:00:00 2001 From: Malachi Willey Date: Tue, 14 Apr 2026 10:02:01 -0700 Subject: [PATCH 5/5] Fix test --- static/app/views/automations/new.spec.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/static/app/views/automations/new.spec.tsx b/static/app/views/automations/new.spec.tsx index ce65fc7ee6f8b7..8faeaccf3e1aef 100644 --- a/static/app/views/automations/new.spec.tsx +++ b/static/app/views/automations/new.spec.tsx @@ -128,6 +128,11 @@ describe('AutomationNewSettings', () => { handlerGroup: ActionGroup.OTHER, integrations: undefined, }), + ActionHandlerFixture({ + type: ActionType.SLACK_STAGING, + handlerGroup: ActionGroup.NOTIFICATION, + integrations: [{id: 'slack-staging-1', name: 'My Slack Staging Workspace'}], + }), ], }); @@ -332,6 +337,16 @@ describe('AutomationNewSettings', () => { delay: null, }); + await addAction('Slack (Staging)'); + { + const stagingTargets = screen.getAllByRole('textbox', {name: 'Target'}); + const stagingTarget = stagingTargets.at(-1); + expect(stagingTarget).toBeDefined(); + await userEvent.type(stagingTarget as HTMLElement, '#staging-alerts', { + delay: null, + }); + } + await addAction('Discord'); await userEvent.type(screen.getByPlaceholderText('channel ID or URL'), '123', { delay: null, @@ -492,10 +507,11 @@ describe('AutomationNewSettings', () => { }, slack_staging: { type: 'slack_staging', + integrationId: 'slack-staging-1', config: { targetType: 'specific', targetIdentifier: '', - targetDisplay: '', + targetDisplay: '#staging-alerts', }, }, };