: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(aio): gate white labelling behind the enterprise feature in feedback wizard (#79602)
Carlos Marchal926c3baa7b7e
diff --git a/products/ai_observability/frontend/feedback-view/wizard/FeedbackSurveyWizard.tsx b/products/ai_observability/frontend/feedback-view/wizard/FeedbackSurveyWizard.tsxindex 25789599a99d..5733100a8054 100644--- a/products/ai_observability/frontend/feedback-view/wizard/FeedbackSurveyWizard.tsx+++ b/products/ai_observability/frontend/feedback-view/wizard/FeedbackSurveyWizard.tsx@@ -5,10 +5,11 @@ import { IconArrowLeft, IconArrowRight, IconCheck, IconDocument } from '@posthogimport { LemonButton, LemonCheckbox, LemonInput, LemonSwitch, LemonTabs, LemonTextArea } from '@posthog/lemon-ui'import { CodeSnippet, Language } from 'lib/components/CodeSnippet'+import { upgradeModalLogic } from 'lib/components/UpgradeModal/upgradeModalLogic'import { dayjs } from 'lib/dayjs'import { ColorInput } from 'scenes/surveys/wizard/ColorInput'-import { Survey, SurveyAppearance } from '~/types'+import { AvailableFeature, Survey, SurveyAppearance } from '~/types'import { getManualCaptureExample, getReactExample } from './codeExamples'import { FeedbackPreviewMock } from './FeedbackPreviewMock'@@ -138,6 +139,7 @@ function ConfigureStep(): JSX.Element {} = useValues(feedbackSurveyWizardLogic)const { setStep, setSurveyName, setFollowUpEnabled, setFollowUpQuestion, updateAppearance, createSurvey } =useActions(feedbackSurveyWizardLogic)+ const { guardAvailableFeature } = useValues(upgradeModalLogic)const [thumbState, setThumbState] = useState<'none' | 'up' | 'down'>('down')@@ -225,7 +227,15 @@ function ConfigureStep(): JSX.Element {<LemonCheckboxlabel="Hide PostHog branding"checked={appearance.whiteLabel}- onChange={(checked) => updateAppearance({ whiteLabel: checked })}+ onChange={(checked) => {+ if (checked) {+ guardAvailableFeature(AvailableFeature.WHITE_LABELLING, () =>+ updateAppearance({ whiteLabel: checked })+ )+ } else {+ updateAppearance({ whiteLabel: checked })+ }+ }}size="small"/></div>