:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(workflows): stop Slack step config crashing the workflow editor (#69691)
Kyle Swank25c2345a3cfd
diff --git a/frontend/src/lib/integrations/slackIntegrationLogic.test.ts b/frontend/src/lib/integrations/slackIntegrationLogic.test.tsindex 34130d46dac8..9072ef713e40 100644--- a/frontend/src/lib/integrations/slackIntegrationLogic.test.ts+++ b/frontend/src/lib/integrations/slackIntegrationLogic.test.ts@@ -333,4 +333,25 @@ describe('slackIntegrationLogic — slackChannelsForPicker', () => {}).toFinishAllListeners()expect(logic.values.slackChannelsForPicker.map((c) => c.id)).toEqual(['C2', 'C1', 'C3'])})++ it('sorts channels without a name (inaccessible private channels) without throwing', () => {+ // Slack returns private channels the bot can't access with no `name`; the picker sort+ // must not blow up on them (regression: crashed the whole workflow step config panel).+ logic.actions.loadAllSlackChannelsSuccess({+ channels: [+ fixtureChannel('C1', 'alerts'),+ {+ id: 'C_PRIV',+ is_private: true,+ is_ext_shared: false,+ is_member: false,+ is_private_without_access: true,+ },+ fixtureChannel('C2', 'general'),+ ] as SlackChannelType[],+ lastRefreshedAt: '2026-01-01T00:00:00Z',+ })++ expect(logic.values.slackChannelsForPicker.map((c) => c.id)).toEqual(['C_PRIV', 'C1', 'C2'])+ })})diff --git a/frontend/src/lib/integrations/slackIntegrationLogic.ts b/frontend/src/lib/integrations/slackIntegrationLogic.tsindex 74920395ee56..8a9d9a3e1b97 100644--- a/frontend/src/lib/integrations/slackIntegrationLogic.ts+++ b/frontend/src/lib/integrations/slackIntegrationLogic.ts@@ -97,7 +97,9 @@ export const slackIntegrationLogic = kea<slackIntegrationLogicType>([if (aRecency !== bRecency) {return aRecency - bRecency}- return a.name.localeCompare(b.name)+ // Private channels the bot can't access come back from Slack without a name,+ // so guard the comparator instead of assuming a string.+ return (a.name ?? '').localeCompare(b.name ?? '')})},],diff --git a/frontend/src/types.ts b/frontend/src/types.tsindex 8948fe061af8..581bceb8f6b0 100644--- a/frontend/src/types.ts+++ b/frontend/src/types.ts@@ -5487,7 +5487,8 @@ export interface EmailIntegrationDomainGroupedType {export interface SlackChannelType {id: string- name: string+ // Absent for private channels the bot can't access (is_private_without_access).+ name?: stringis_private: booleanis_ext_shared: booleanis_member: booleandiff --git a/products/conversations/frontend/scenes/settings/SlackSection.tsx b/products/conversations/frontend/scenes/settings/SlackSection.tsxindex c7c7a79c719a..c31354ba1b54 100644--- a/products/conversations/frontend/scenes/settings/SlackSection.tsx+++ b/products/conversations/frontend/scenes/settings/SlackSection.tsx@@ -109,9 +109,9 @@ function SlackChannelSection(): JSX.Element {<LemonInputSelectmode="multiple"value={slackChannelIds}- options={slackChannels.map((c: { id: string; name: string }) => ({+ options={slackChannels.map((c) => ({key: c.id,- label: `#${c.name}`,+ label: `#${c.name ?? c.id}`,}))}onChange={(newValue: string[]) => setSlackChannels(newValue)}loading={slackChannelsLoading}@@ -172,9 +172,9 @@ function SlackChannelSection(): JSX.Element {<LemonInputSelectmode="single"value={slackAlertChannelId ? [slackAlertChannelId] : []}- options={slackChannels.map((c: { id: string; name: string }) => ({+ options={slackChannels.map((c) => ({key: c.id,- label: `#${c.name}`,+ label: `#${c.name ?? c.id}`,}))}onChange={(newValue: string[]) => setSlackAlertChannel(newValue[0] ?? null)}loading={slackChannelsLoading}diff --git a/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsx b/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsxindex d087dc6c4b0f..0cb8450b77cc 100644--- a/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsx+++ b/products/workflows/frontend/Workflows/hogflows/panel/HogFlowEditorPanelBuildDetail.tsx@@ -18,6 +18,8 @@ import { ScrollableShadows } from 'lib/components/ScrollableShadows/ScrollableShimport { LemonField } from 'lib/lemon-ui/LemonField/LemonField'import { urls } from 'scenes/urls'+import { ErrorBoundary } from '~/layout/ErrorBoundary'+import { CategorySelect } from 'products/workflows/frontend/OptOuts/CategorySelect'import { workflowLogic } from '../../workflowLogic'@@ -116,7 +118,9 @@ export function HogFlowEditorPanelBuildDetail(): JSX.Element | null {)}</div><LemonDivider className="my-2" />- {Step?.renderConfiguration(selectedNode)}+ <ErrorBoundary exceptionProps={{ feature: 'workflow-step-config' }}>+ {Step?.renderConfiguration(selectedNode)}+ </ErrorBoundary></ScrollableShadows>{isOptOutEligibleAction(action) && (