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 the workflows-email-media-library flag (#123298)

Harley Alexander38be6c9320be
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 8d93493b50e6..12d5639b9e1a 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -619,7 +619,6 @@ export const FEATURE_FLAGS = {
WORKFLOWS_COHORT_CONDITIONS: 'workflows-cohort-conditions', // owner: @meikelmosby #team-workflows
WORKFLOWS_EMAIL_DOMAIN_AGENT_SETUP: 'workflows-email-domain-agent-setup', // owner: @silthus #team-workflows
WORKFLOWS_EMAIL_DOMAIN_WIZARD: 'workflows-email-domain-wizard', // owner: @silthus #team-workflows
- WORKFLOWS_EMAIL_MEDIA_LIBRARY: 'workflows-email-media-library', // owner: @mayteio #team-workflows, backs the email editor's Uploads tab with the media library
WORKFLOWS_EMAIL_SENDER_ROTATION: 'workflows-email-sender-rotation', // owner: @arthurdedeus #team-workflows
WORKFLOWS_INTERNAL_EVENT_FILTERS: 'workflows-internal-event-filters', // owner: @haven #team-workflows
WORKFLOWS_LINEAR_VIEW: 'workflows-linear-view', // owner: #team-workflows
diff --git a/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.test.ts b/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.test.ts
index 2dc5302a5b56..c4af268fa340 100644
--- a/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.test.ts
+++ b/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.test.ts
@@ -1,8 +1,6 @@
import { router } from 'kea-router'
import { expectLogic } from 'kea-test-utils'
-import { FEATURE_FLAGS } from 'lib/constants'
-import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { useMocks } from '~/mocks/jest'
@@ -144,21 +142,12 @@ describe('emailTemplaterLogic', () => {
{
description: 'identifies the project to Unlayer in the native editor',
type: 'native_email',
- flagOn: true,
identified: true,
},
- {
- description: 'leaves Unlayer anonymous with the flag off',
- type: 'native_email',
- flagOn: false,
- identified: false,
- },
- { description: 'leaves the destination editor untouched', type: 'email', flagOn: true, identified: false },
- ] as const)('$description', ({ type, flagOn, identified }) => {
+ { description: 'leaves the destination editor untouched', type: 'email', identified: false },
+ ] as const)('$description', ({ type, identified }) => {
preflightLogic.mount()
preflightLogic.actions.loadPreflightSuccess({ realm: Realm.Cloud } as any)
- featureFlagLogic.mount()
- featureFlagLogic.actions.setFeatureFlags([], { [FEATURE_FLAGS.WORKFLOWS_EMAIL_MEDIA_LIBRARY]: flagOn })
logic = emailTemplaterLogic(makeProps({ type }))
logic.mount()
diff --git a/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.tsx b/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.tsx
index 761790c09b16..7c31f17bcdbb 100644
--- a/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.tsx
+++ b/frontend/src/scenes/hog-functions/email-templater/emailTemplaterLogic.tsx
@@ -21,9 +21,7 @@ import { Editor, EmailEditorProps, EditorRef as _EditorRef } from 'react-email-e
import { LemonDialog } from '@posthog/lemon-ui'
import api from 'lib/api'
-import { FEATURE_FLAGS } from 'lib/constants'
import { lemonToast } from 'lib/lemon-ui/LemonToast'
-import { featureFlagLogic, FeatureFlagsSet } from 'lib/logic/featureFlagLogic'
import { objectsEqual } from 'lib/utils/objects'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { teamLogic } from 'scenes/teamLogic'
@@ -236,7 +234,6 @@ function autoRevealAdvancedFields(
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface emailTemplaterLogicValues {
- featureFlags: FeatureFlagsSet // featureFlagLogic
preflight: PreflightStatus | null // preflightLogic
currentProjectId: number | string // teamLogic
activeContentTab: 'plaintext' | 'visual'
@@ -398,11 +395,7 @@ export interface emailTemplaterLogicMeta {
logicProps: (arg: any) => EmailTemplaterLogicProps
mergeTags: (personPropertyDefinitions: PropertyDefinition[]) => UnlayerMergeTags
unlayerEditorProjectId: (preflight: PreflightStatus | null) => 275430 | undefined
- emailMediaLibraryEnabled: (
- arg: EmailTemplaterType,
- unlayerEditorProjectId: 275430 | undefined,
- featureFlags: FeatureFlagsSet
- ) => boolean
+ emailMediaLibraryEnabled: (arg: EmailTemplaterType, unlayerEditorProjectId: 275430 | undefined) => boolean
unlayerEditorUser: (
emailMediaLibraryEnabled: boolean,
currentProjectId: number | string
@@ -427,7 +420,7 @@ export const emailTemplaterLogic = kea<emailTemplaterLogicType>([
props({} as EmailTemplaterLogicProps),
path(['scenes', 'hog-functions', 'email-templater', 'emailTemplaterLogic']),
connect(() => ({
- values: [preflightLogic, ['preflight'], featureFlagLogic, ['featureFlags'], teamLogic, ['currentProjectId']],
+ values: [preflightLogic, ['preflight'], teamLogic, ['currentProjectId']],
})),
actions({
setEmailEditorRef: (emailEditorRef: EditorRef | null) => ({ emailEditorRef }),
@@ -576,12 +569,10 @@ export const emailTemplaterLogic = kea<emailTemplaterLogicType>([
},
],
emailMediaLibraryEnabled: [
- (s) => [(_, props: EmailTemplaterLogicProps) => props.type, s.unlayerEditorProjectId, s.featureFlags],
- (type: EmailTemplaterType, unlayerEditorProjectId: number | undefined, featureFlags: FeatureFlagsSet) =>
+ (s) => [(_, props: EmailTemplaterLogicProps) => props.type, s.unlayerEditorProjectId],
+ (type: EmailTemplaterType, unlayerEditorProjectId: number | undefined) =>
// The Uploads tab needs a paid Unlayer project, and only the native editor loads one.
- type !== 'email' &&
- !!unlayerEditorProjectId &&
- !!featureFlags[FEATURE_FLAGS.WORKFLOWS_EMAIL_MEDIA_LIBRARY],
+ type !== 'email' && !!unlayerEditorProjectId,
],
unlayerEditorUser: [
(s) => [s.emailMediaLibraryEnabled, s.currentProjectId],