Skip to content

: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.

chore(workflows): remove workflows-new-navigation flag (#114340)

Meikel Ratz756dba10dcae
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index a1b584120948..29d4b862844f 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -642,7 +642,6 @@ export const FEATURE_FLAGS = {
WORKFLOWS_INTERNAL_EVENT_FILTERS: 'workflows-internal-event-filters', // owner: @haven #team-workflows
WORKFLOWS_ISP_SENDING_HEALTH: 'workflows-isp-sending-health', // owner: #team-workflows
WORKFLOWS_LINEAR_VIEW: 'workflows-linear-view', // owner: #team-workflows
- WORKFLOWS_NEW_NAVIGATION: 'workflows-new-navigation', // owner: #team-workflows, groups the workflows tabs into Workflows, Templates and Messaging
WORKFLOWS_ONBOARDING_WIZARD: 'workflows-onboarding-wizard', // owner: #team-workflows, step-by-step setup after the first-run path choice, needs workflows-guided-onboarding
WORKFLOWS_PUSH_NOTIFICATIONS: 'workflows-push-notifications', // owner: #team-workflows
WORKFLOWS_TRIGGER_VOLUME_ESTIMATE: 'workflows-trigger-volume-estimate', // owner: @mayteio #team-workflows
diff --git a/products/workflows/frontend/Broadcasts/BroadcastsScene.tsx b/products/workflows/frontend/Broadcasts/BroadcastsScene.tsx
index 04155fe2b456..1a6b935f14ae 100644
--- a/products/workflows/frontend/Broadcasts/BroadcastsScene.tsx
+++ b/products/workflows/frontend/Broadcasts/BroadcastsScene.tsx
@@ -4,9 +4,7 @@ import { router } from 'kea-router'
import { LemonButton } from '@posthog/lemon-ui'
import { AccessControlAction } from 'lib/components/AccessControlAction'
-import { FEATURE_FLAGS } from 'lib/constants'
import { LemonTabs } from 'lib/lemon-ui/LemonTabs'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { SceneExport } from 'scenes/sceneTypes'
import { urls } from 'scenes/urls'
@@ -23,7 +21,6 @@ import {
MESSAGING_TAB_CONTENT,
MessagingNavTabKey,
isMessagingSetupTab,
- messagingNavTabs,
} from '../messagingTabs'
import { BroadcastsFeaturePreview } from './BroadcastsFeaturePreview'
import { BroadcastsTable } from './BroadcastsTable'
@@ -42,8 +39,6 @@ export function BroadcastsScene(): JSX.Element {
const currentTab: MessagingNavTabKey | 'broadcasts' = MESSAGING_NAV_TAB_KEYS.includes(lastSegment)
? lastSegment
: 'broadcasts'
- const { featureFlags } = useValues(featureFlagLogic)
- const newNavigationEnabled = !!featureFlags[FEATURE_FLAGS.WORKFLOWS_NEW_NAVIGATION]
const broadcastsTab = {
label: 'Broadcasts',
@@ -84,38 +79,30 @@ export function BroadcastsScene(): JSX.Element {
}
/>
<EmailSuspensionBanner />
- {newNavigationEnabled ? (
- <LemonTabs<'broadcasts' | 'library' | 'messaging-setup'>
- activeKey={currentTab === 'broadcasts' || currentTab === 'library' ? currentTab : 'messaging-setup'}
- tabs={[
- broadcastsTab,
- {
- label: 'Templates',
- key: 'library',
- link: urls.broadcasts('library'),
- content: MESSAGING_TAB_CONTENT.library,
- },
- {
- label: 'Messaging',
- key: 'messaging-setup',
- link: urls.broadcasts('channels'),
- content: (
- <MessagingSetup
- tab={isMessagingSetupTab(currentTab) ? currentTab : 'channels'}
- linkFor={(tab) => urls.broadcasts(tab)}
- />
- ),
- },
- ]}
- sceneInset
- />
- ) : (
- <LemonTabs
- activeKey={currentTab}
- tabs={[broadcastsTab, ...messagingNavTabs((tab) => urls.broadcasts(tab))]}
- sceneInset
- />
- )}
+ <LemonTabs<'broadcasts' | 'library' | 'messaging-setup'>
+ activeKey={currentTab === 'broadcasts' || currentTab === 'library' ? currentTab : 'messaging-setup'}
+ tabs={[
+ broadcastsTab,
+ {
+ label: 'Templates',
+ key: 'library',
+ link: urls.broadcasts('library'),
+ content: MESSAGING_TAB_CONTENT.library,
+ },
+ {
+ label: 'Messaging',
+ key: 'messaging-setup',
+ link: urls.broadcasts('channels'),
+ content: (
+ <MessagingSetup
+ tab={isMessagingSetupTab(currentTab) ? currentTab : 'channels'}
+ linkFor={(tab) => urls.broadcasts(tab)}
+ />
+ ),
+ },
+ ]}
+ sceneInset
+ />
</SceneContent>
)
}
diff --git a/products/workflows/frontend/Channels/MessageChannels.tsx b/products/workflows/frontend/Channels/MessageChannels.tsx
index f4d55e086b3b..7c51179f101b 100644
--- a/products/workflows/frontend/Channels/MessageChannels.tsx
+++ b/products/workflows/frontend/Channels/MessageChannels.tsx
@@ -1,37 +1,23 @@
import { useActions, useValues } from 'kea'
-import * as reporterPng from '@posthog/brand/hoggies/png/reporter'
-import { LemonSkeleton } from '@posthog/lemon-ui'
-
-import { pngHoggie } from 'lib/brand/hoggies'
-import { ProductIntroduction } from 'lib/components/ProductIntroduction/ProductIntroduction'
import { SetupTaskId } from 'lib/components/ProductSetup'
-import { FEATURE_FLAGS } from 'lib/constants'
import { EmailIntegrationsList } from 'lib/integrations/EmailIntegrationsList'
import { IntegrationsList } from 'lib/integrations/IntegrationsList'
import { integrationsLogic } from 'lib/integrations/integrationsLogic'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { ChannelCatalog } from './ChannelCatalog'
import { ChannelSetupModal } from './ChannelSetupModal'
-const HedgehogReporter = pngHoggie(reporterPng)
-
const MESSAGING_CHANNEL_TYPES = ['email', 'slack', 'twilio', 'firebase', 'apns'] as const
export type ChannelType = (typeof MESSAGING_CHANNEL_TYPES)[number]
export function MessageChannels(): JSX.Element {
- const { setupModalOpen, integrations, integrationsLoading, setupModalType, selectedIntegration } =
- useValues(integrationsLogic)
- const { openSetupModal, closeSetupModal, markTaskAsCompleted } = useActions(integrationsLogic)
- const { featureFlags } = useValues(featureFlagLogic)
- const showCatalog = !!featureFlags[FEATURE_FLAGS.WORKFLOWS_NEW_NAVIGATION]
+ const { setupModalOpen, integrations, setupModalType, selectedIntegration } = useValues(integrationsLogic)
+ const { closeSetupModal, markTaskAsCompleted } = useActions(integrationsLogic)
const allWorkflowIntegrations =
integrations?.filter((integration) => MESSAGING_CHANNEL_TYPES.includes(integration.kind as ChannelType)) ?? []
- const showProductIntroduction = !showCatalog && !integrationsLoading && !allWorkflowIntegrations.length
-
return (
<>
<ChannelSetupModal
@@ -46,27 +32,10 @@ export function MessageChannels(): JSX.Element {
/>
<div className="flex flex-col gap-4" data-attr="message-channels">
- {showCatalog && <ChannelCatalog />}
- {showCatalog && allWorkflowIntegrations.length > 0 && (
+ <ChannelCatalog />
+ {allWorkflowIntegrations.length > 0 && (
<h3 className="mb-0 text-base font-semibold">Your connections</h3>
)}
- {!showCatalog && integrationsLoading && !integrations?.length && (
- <>
- <LemonSkeleton className="h-20" />
- <LemonSkeleton className="h-20" />
- <LemonSkeleton className="h-20" />
- </>
- )}
- {showProductIntroduction && (
- <ProductIntroduction
- thingName="channel integration"
- description="Set up messaging channels to automatically send emails, SMS, or Slack notifications triggered by user actions and events."
- docsURL="https://posthog.com/docs/workflows/configure-channels"
- action={() => openSetupModal(undefined, 'email')}
- customHog={HedgehogReporter}
- isEmpty
- />
- )}
<EmailIntegrationsList />
<IntegrationsList titleText="" onlyKinds={MESSAGING_CHANNEL_TYPES.filter((type) => type !== 'email')} />
</div>
diff --git a/products/workflows/frontend/Workflows/NewWorkflowModal.tsx b/products/workflows/frontend/Workflows/NewWorkflowModal.tsx
index 37dd5eb1c71a..9e3b886470e7 100644
--- a/products/workflows/frontend/Workflows/NewWorkflowModal.tsx
+++ b/products/workflows/frontend/Workflows/NewWorkflowModal.tsx
@@ -2,9 +2,7 @@ import { useActions, useValues } from 'kea'
import { LemonInput, LemonSelect } from '@posthog/lemon-ui'
-import { FEATURE_FLAGS } from 'lib/constants'
import { LemonModal } from 'lib/lemon-ui/LemonModal'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { isMobile } from 'lib/utils/dom'
import { newWorkflowLogic } from './newWorkflowLogic'
@@ -16,9 +14,6 @@ export function NewWorkflowModal(): JSX.Element {
const { hideNewWorkflowModal } = useActions(newWorkflowLogic)
const { newWorkflowModalVisible } = useValues(newWorkflowLogic)
- const { featureFlags } = useValues(featureFlagLogic)
- const newNavigationEnabled = !!featureFlags[FEATURE_FLAGS.WORKFLOWS_NEW_NAVIGATION]
-
const { templateFilter, tagFilter, availableTags } = useValues(workflowTemplatesLogic)
const { setTemplateFilter, setTagFilter } = useActions(workflowTemplatesLogic)
@@ -47,7 +42,7 @@ export function NewWorkflowModal(): JSX.Element {
// A focused input makes iOS pan the viewport on swipe instead of scrolling the list.
autoFocus={!isMobile()}
/>
- {newNavigationEnabled && <WorkflowTemplateTypePicker />}
+ <WorkflowTemplateTypePicker />
{availableTags.length > 0 && (
<LemonSelect
className="shrink-0 min-w-56 whitespace-nowrap"
diff --git a/products/workflows/frontend/Workflows/WorkflowsTable.tsx b/products/workflows/frontend/Workflows/WorkflowsTable.tsx
index f4f1d2d17561..061d8a0868e8 100644
--- a/products/workflows/frontend/Workflows/WorkflowsTable.tsx
+++ b/products/workflows/frontend/Workflows/WorkflowsTable.tsx
@@ -118,7 +118,6 @@ function WorkflowActionsSummary({ workflow }: { workflow: HogFlow }): JSX.Elemen
export function WorkflowsTable(): JSX.Element {
const { featureFlags } = useValues(featureFlagLogic)
const selfOptimisingEnabled = !!featureFlags[FEATURE_FLAGS.SELF_OPTIMISING_WORKFLOWS]
- const newNavigationEnabled = !!featureFlags[FEATURE_FLAGS.WORKFLOWS_NEW_NAVIGATION]
const guidedOnboardingEnabled = !!featureFlags[FEATURE_FLAGS.WORKFLOWS_GUIDED_ONBOARDING]
const logic = workflowsLogic()
const {
@@ -132,7 +131,6 @@ export function WorkflowsTable(): JSX.Element {
} = useValues(logic)
// Only an unfiltered Automations tab is truly empty. With a search or filter, the plain message fits.
const showAutomationEmptyState =
- newNavigationEnabled &&
guidedOnboardingEnabled &&
filters.type === 'automation' &&
!filters.search &&
@@ -406,25 +404,23 @@ export function WorkflowsTable(): JSX.Element {
<div className="workflows-section" data-attr="workflows-table" data-loading={workflowsLoading}>
<>
{guidedOnboardingEnabled && <MessagingSetupReminderBanner />}
- {newNavigationEnabled && (
- <div className="mb-3">
- <LemonSegmentedButton<WorkflowTypeFilter>
- size="small"
- value={filters.type}
- onChange={selectTypeTab}
- options={[
- { value: 'all', label: 'All', 'data-attr': 'workflows-type-tab-all' },
- { value: 'messaging', label: 'Messaging', 'data-attr': 'workflows-type-tab-messaging' },
- {
- value: 'automation',
- label: 'Automations',
- 'data-attr': 'workflows-type-tab-automation',
- },
- { value: 'loop', label: 'Loops', 'data-attr': 'workflows-type-tab-loop' },
- ]}
- />
- </div>
- )}
+ <div className="mb-3">
+ <LemonSegmentedButton<WorkflowTypeFilter>
+ size="small"
+ value={filters.type}
+ onChange={selectTypeTab}
+ options={[
+ { value: 'all', label: 'All', 'data-attr': 'workflows-type-tab-all' },
+ { value: 'messaging', label: 'Messaging', 'data-attr': 'workflows-type-tab-messaging' },
+ {
+ value: 'automation',
+ label: 'Automations',
+ 'data-attr': 'workflows-type-tab-automation',
+ },
+ { value: 'loop', label: 'Loops', 'data-attr': 'workflows-type-tab-loop' },
+ ]}
+ />
+ </div>
<div className="flex justify-between gap-2 flex-wrap mb-4">
<LemonInput
type="search"
@@ -448,25 +444,6 @@ export function WorkflowsTable(): JSX.Element {
]}
value={filters.status}
/>
- {!newNavigationEnabled && (
- <>
- <span className="ml-1">
- <b>Type</b>
- </span>
- <LemonSelect
- dropdownMatchSelectWidth={false}
- size="small"
- onChange={(value) => setFilters({ type: value as WorkflowTypeFilter })}
- options={[
- { label: 'All', value: 'all' },
- { label: 'Messaging', value: 'messaging' },
- { label: 'Automation', value: 'automation' },
- { label: 'Loop', value: 'loop' },
- ]}
- value={filters.type}
- />
- </>
- )}
<span className="ml-1">
<b>Trigger</b>
</span>
diff --git a/products/workflows/frontend/WorkflowsScene.tsx b/products/workflows/frontend/WorkflowsScene.tsx
index 5b5b0c1ddac2..4b386ef129cb 100644
--- a/products/workflows/frontend/WorkflowsScene.tsx
+++ b/products/workflows/frontend/WorkflowsScene.tsx
@@ -24,7 +24,7 @@ import { EmailSuspensionBanner } from './EmailSuspensionBanner'
import { workflowsEmptyState } from './emptyState/workflowsEmptyState'
import { MessagingSetup } from './MessagingSetup'
import { MessagingTabActions } from './MessagingTabActions'
-import { isMessagingSetupTab, messagingNavTabs } from './messagingTabs'
+import { isMessagingSetupTab } from './messagingTabs'
import { MessagingSetupTabLabel } from './setupGuide/MessagingSetupTabLabel'
import { WorkflowsOnboardingWizard } from './setupGuide/wizard/WorkflowsOnboardingWizard'
import { newWorkflowLogic } from './Workflows/newWorkflowLogic'
@@ -174,13 +174,9 @@ function topTabFor(tab: WorkflowsSceneTab): WorkflowsTopTab {
}
export function WorkflowsScene(props: WorkflowsSceneProps = {}): JSX.Element {
- const { currentTab: routeTab } = useValues(workflowsSceneLogic(props))
+ const { currentTab } = useValues(workflowsSceneLogic(props))
const { featureFlags } = useValues(featureFlagLogic)
- const newNavigationEnabled = !!featureFlags[FEATURE_FLAGS.WORKFLOWS_NEW_NAVIGATION]
const guidedOnboardingEnabled = !!featureFlags[FEATURE_FLAGS.WORKFLOWS_GUIDED_ONBOARDING]
- // The workflow templates page exists only behind its flag. The onboarding wizard is always reachable,
- // because the broadcast setup links to it without a flag.
- const currentTab: WorkflowsSceneTab = !newNavigationEnabled && routeTab === 'templates' ? 'workflows' : routeTab
const { startNewWorkflow } = useActions(newWorkflowLogic)
const { setTypeFilter } = useActions(workflowTemplatesLogic)
const { filters } = useValues(workflowsLogic)
@@ -226,9 +222,7 @@ export function WorkflowsScene(props: WorkflowsSceneProps = {}): JSX.Element {
// Open the template chooser on the type the list shows, so a person on the
// Messaging tab sees messaging templates first.
setTypeFilter(
- newNavigationEnabled && currentTab === 'workflows'
- ? templateTypeForListType(filters.type)
- : 'all'
+ currentTab === 'workflows' ? templateTypeForListType(filters.type) : 'all'
)
startNewWorkflow()
}}
@@ -246,40 +240,31 @@ export function WorkflowsScene(props: WorkflowsSceneProps = {}): JSX.Element {
}
/>
<EmailSuspensionBanner />
- {newNavigationEnabled ? (
- <LemonTabs<WorkflowsTopTab>
- activeKey={topTabFor(currentTab)}
- tabs={[
- workflowsTab,
- {
- label: 'Templates',
- key: 'templates',
- link: urls.workflows('library'),
- content: <WorkflowsTemplates tab={currentTab === 'templates' ? 'templates' : 'library'} />,
- },
- {
- label: guidedOnboardingEnabled ? <MessagingSetupTabLabel /> : 'Messaging',
- key: 'messaging-setup',
- link: urls.workflows('channels'),
- content: (
- <MessagingSetup
- tab={isMessagingSetupTab(currentTab) ? currentTab : 'channels'}
- linkFor={(tab) => urls.workflows(tab)}
- />
- ),
- },
- ]}
- sceneInset
- data-attr="workflows-scene-tabs"
- />
- ) : (
- <LemonTabs
- activeKey={currentTab}
- tabs={[workflowsTab, ...messagingNavTabs((tab) => urls.workflows(tab))]}
- sceneInset
- data-attr="workflows-scene-tabs"
- />
- )}
+ <LemonTabs<WorkflowsTopTab>
+ activeKey={topTabFor(currentTab)}
+ tabs={[
+ workflowsTab,
+ {
+ label: 'Templates',
+ key: 'templates',
+ link: urls.workflows('library'),
+ content: <WorkflowsTemplates tab={currentTab === 'templates' ? 'templates' : 'library'} />,
+ },
+ {
+ label: guidedOnboardingEnabled ? <MessagingSetupTabLabel /> : 'Messaging',
+ key: 'messaging-setup',
+ link: urls.workflows('channels'),
+ content: (
+ <MessagingSetup
+ tab={isMessagingSetupTab(currentTab) ? currentTab : 'channels'}
+ linkFor={(tab) => urls.workflows(tab)}
+ />
+ ),
+ },
+ ]}
+ sceneInset
+ data-attr="workflows-scene-tabs"
+ />
<NewWorkflowModal />
</SceneContent>
)
diff --git a/products/workflows/frontend/messagingTabs.tsx b/products/workflows/frontend/messagingTabs.tsx
index aa0023a98d88..46c0a0eb257d 100644
--- a/products/workflows/frontend/messagingTabs.tsx
+++ b/products/workflows/frontend/messagingTabs.tsx
@@ -1,5 +1,3 @@
-import { LemonTab } from 'lib/lemon-ui/LemonTabs'
-
import { MessageChannels } from './Channels/MessageChannels'
import { OptOutScene } from './OptOuts/OptOutScene'
import { SuppressionScene } from './Suppression/SuppressionScene'
@@ -10,7 +8,7 @@ import { WorkflowsReputation } from './Workflows/Reputation/WorkflowsReputation'
export const MESSAGING_NAV_TAB_KEYS = ['library', 'channels', 'opt-outs', 'suppression', 'reputation'] as const
export type MessagingNavTabKey = (typeof MESSAGING_NAV_TAB_KEYS)[number]
-/** The tabs that configure sending. The new navigation groups them under one "Messaging" tab. */
+/** The tabs that configure sending, grouped under one "Messaging" tab. */
export const MESSAGING_SETUP_TAB_KEYS = ['channels', 'opt-outs', 'suppression', 'reputation'] as const
export type MessagingSetupTabKey = (typeof MESSAGING_SETUP_TAB_KEYS)[number]
@@ -33,16 +31,3 @@ export const MESSAGING_TAB_CONTENT: Record<MessagingNavTabKey, JSX.Element> = {
export function isMessagingSetupTab(tab: string): tab is MessagingSetupTabKey {
return (MESSAGING_SETUP_TAB_KEYS as readonly string[]).includes(tab)
}
-
-/**
- * Sending setup that every messaging surface shares: templates, senders, and who may be sent to.
- * Each surface renders them under its own URL, so switching tabs never leaves the surface.
- */
-export function messagingNavTabs(linkFor: (tab: MessagingNavTabKey) => string): LemonTab<MessagingNavTabKey>[] {
- return MESSAGING_NAV_TAB_KEYS.map((key) => ({
- label: MESSAGING_TAB_LABELS[key],
- key,
- link: linkFor(key),
- content: MESSAGING_TAB_CONTENT[key],
- }))
-}
diff --git a/products/workflows/frontend/setupGuide/workflowsSetupGuideLogic.ts b/products/workflows/frontend/setupGuide/workflowsSetupGuideLogic.ts
index 8056d54f4ea2..c75f13e0a1dd 100644
--- a/products/workflows/frontend/setupGuide/workflowsSetupGuideLogic.ts
+++ b/products/workflows/frontend/setupGuide/workflowsSetupGuideLogic.ts
@@ -19,7 +19,6 @@ import { optOutCategoriesLogic } from '../OptOuts/optOutCategoriesLogic'
import type { MessageCategory } from '../OptOuts/optOutCategoriesLogic'
import { messageTemplatesLogic } from '../TemplateLibrary/messageTemplatesLogic'
import type { MessageTemplate } from '../TemplateLibrary/types'
-import { urlForNewWorkflowComposer } from '../Workflows/newWorkflowLogic'
import { workflowTemplatesLogic } from '../Workflows/templates/workflowTemplatesLogic'
import type { WorkflowTemplateTypeFilter } from '../Workflows/workflowTypeFilters'
import { SetupGuideStep, SetupGuideStepKey, deriveSetupGuideSteps } from './setupGuideSteps'
@@ -309,11 +308,6 @@ export const workflowsSetupGuideLogic = kea<workflowsSetupGuideLogicType>([
}
},
browseTemplates: ({ typeFilter }) => {
- if (!values.featureFlags[FEATURE_FLAGS.WORKFLOWS_NEW_NAVIGATION]) {
- // The templates page is part of the new navigation. Without it, start from nothing.
- router.actions.push(urlForNewWorkflowComposer())
- return
- }
actions.setTypeFilter(typeFilter)
router.actions.push(urls.workflows('templates'))
},