From 96f776fc6348ca46b6f7da3927a7e40ce20fed48 Mon Sep 17 00:00:00 2001 From: Sean Oliver <882952+seanoliver@users.noreply.github.com> Date: Mon, 9 Mar 2026 09:22:23 -0700 Subject: [PATCH] graduate auto-RLS project creation experiment (test variant wins) (#43499) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem The `projectCreationEnableRlsEventTrigger` A/B experiment tested showing an opt-in "Enable automatic RLS" checkbox in the project creation flow, which sets up a Postgres event trigger to auto-enable RLS on every new table in the public schema. The test variant passed with a +3.3pp lift. ## Changes - `SecurityOptions.tsx` — removed PostHog flag check, checkbox is now always rendered - `pages/new/[slug].tsx` — removed experiment flag reads, exposure tracking (`useTrackExperimentExposure`), and the conditional `rlsOptionVariant` telemetry property The underlying feature logic (`enableRlsEventTrigger` form field, `AUTO_ENABLE_RLS_EVENT_TRIGGER_SQL`, submission handling) is unchanged — we're just removing the scaffolding that was gating it. ## Testing Verified `pnpm typecheck` passes clean. The "Enable automatic RLS" checkbox now shows unconditionally in the Security Options section of project creation. GROWTH-653 --- .../ProjectCreation/SecurityOptions.tsx | 55 ++++++++----------- apps/studio/pages/new/[slug].tsx | 23 +------- 2 files changed, 27 insertions(+), 51 deletions(-) diff --git a/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx b/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx index 7c0b44857dd..4636b9a450c 100644 --- a/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx +++ b/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx @@ -1,5 +1,4 @@ import Panel from 'components/ui/Panel' -import { usePHFlag } from 'hooks/ui/useFlag' import Link from 'next/link' import { UseFormReturn } from 'react-hook-form' import { @@ -22,10 +21,6 @@ interface SecurityOptionsProps { } export const SecurityOptions = ({ form, layout = 'horizontal' }: SecurityOptionsProps) => { - const rlsExperimentVariant = usePHFlag<'control' | 'test' | false | undefined>( - 'projectCreationEnableRlsEventTrigger' - ) - const shouldShowEnableRlsEventTrigger = rlsExperimentVariant === 'test' const dataApi = useWatch_Shadcn_({ control: form.control, name: 'dataApi' }) return ( @@ -65,32 +60,30 @@ export const SecurityOptions = ({ form, layout = 'horizontal' }: SecurityOptions )} /> - {shouldShowEnableRlsEventTrigger && ( - ( - - - field.onChange(value === true)} - /> - -
- - Enable automatic RLS - - - Create an event trigger that automatically enables Row Level Security on all - new tables in the public schema. - -
-
- )} - /> - )} + ( + + + field.onChange(value === true)} + /> + +
+ + Enable automatic RLS + + + Create an event trigger that automatically enables Row Level Security on all new + tables in the public schema. + +
+
+ )} + /> {!dataApi && ( { const { profile } = useProfile() const { data: currentOrg } = useSelectedOrganizationQuery() - const rlsExperimentVariant = usePHFlag<'control' | 'test' | false | undefined>( - 'projectCreationEnableRlsEventTrigger' - ) - const shouldShowEnableRlsEventTrigger = rlsExperimentVariant === 'test' const isFreePlan = currentOrg?.plan?.id === 'free' const canChooseInstanceSize = !isFreePlan @@ -250,9 +245,6 @@ const Wizard: NextPageWithLayout = () => { { instanceSize: form.getValues('instanceSize'), enableRlsEventTrigger: form.getValues('enableRlsEventTrigger'), - ...((rlsExperimentVariant === 'control' || rlsExperimentVariant === 'test') && { - rlsOptionVariant: rlsExperimentVariant, - }), dataApiEnabled: form.getValues('dataApi'), useOrioleDb: form.getValues('useOrioleDb'), }, @@ -389,15 +381,6 @@ const Wizard: NextPageWithLayout = () => { } }, [instanceSize, watchedInstanceSize, form]) - // Track exposure to RLS option experiment (only when explicitly assigned to a variant) - const shouldTrackRlsExposure = - !!currentOrg?.slug && (rlsExperimentVariant === 'control' || rlsExperimentVariant === 'test') - - useTrackExperimentExposure( - 'project_creation_rls_option', - shouldTrackRlsExposure ? rlsExperimentVariant : undefined - ) - return (