Skip to content

remove tableCreateGeneratePolicies experiment (failed variant) - #43498

Merged
seanoliver merged 2 commits into
masterfrom
sean/growth-653-auto-rls-experiment-cleanup
Mar 9, 2026
Merged

seanoliver merged 2 commits into
masterfrom
sean/growth-653-auto-rls-experiment-cleanup

Conversation

@seanoliver

Copy link
Copy Markdown
Contributor

Problem

The tableCreateGeneratePolicies A/B experiment tested an AI-assisted policy generator (RLSManagement) as a variation in the table creation side panel. The variation didn't pass — control wins, so the standard RLS checkbox should be the permanent behavior.

Changes

  • Deleted useTableCreateGeneratePolicies hook (PostHog flag + exposure tracking)
  • Deleted the entire RLSManagement/ component directory (variation UI — RLSManagement, PolicyList, PolicyListEmptyState, ToggleRLSButton)
  • Removed experiment flag checks from TableEditor.tsx — RLS checkbox is now always rendered (was already the control)
  • Removed experiment conversion tracking from SidePanelEditor.tsx

Testing

Verified pnpm typecheck passes clean. Table creation side panel renders the RLS checkbox unconditionally as it did in the control.

GROWTH-653

The variation (RLSManagement AI policy generator) did not pass — remove
all experiment scaffolding and make the control (standard RLS checkbox)
permanent. Deletes the PostHog flag check, the feature hook, and the
entire RLSManagement component directory.

GROWTH-653
@seanoliver
seanoliver requested a review from a team as a code owner March 6, 2026 22:34
@vercel

vercel Bot commented Mar 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Mar 9, 2026 3:54pm
studio-staging Ready Ready Preview, Comment Mar 9, 2026 3:54pm
7 Skipped Deployments
Project Deployment Actions Updated (UTC)
cms Ignored Ignored Mar 9, 2026 3:54pm
studio Ignored Ignored Mar 9, 2026 3:54pm
design-system Skipped Skipped Mar 9, 2026 3:54pm
docs Skipped Skipped Mar 9, 2026 3:54pm
learn Skipped Skipped Mar 9, 2026 3:54pm
ui-library Skipped Skipped Mar 9, 2026 3:54pm
zone-www-dot-com Skipped Skipped Mar 9, 2026 3:54pm

Request Review

@coderabbitai

coderabbitai Bot commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 615aee81-07f1-4298-9cab-c619cf49c224

📥 Commits

Reviewing files that changed from the base of the PR and between c6eff2f and 3102045.

📒 Files selected for processing (2)
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Removed Features
    • Automatic policy generation during table creation has been removed.
    • Policy list display UI and row-level security (RLS) management components have been removed, including the RLS toggle control.
  • Behavior Changes
    • Experiment/telemetry tracking related to policy generation has been removed.
    • Confirmation dialog for discarding changes remains visible but its import/placement was simplified.

Walkthrough

This pull request removes the table creation policy generation feature from the Studio application. It deletes the feature flag hook (useTableCreateGeneratePolicies), policy listing and empty-state UI components (PolicyList, PolicyListEmptyState), RLS management components (RLSManagement, ToggleRLSButton), telemetry tracking related to policy-generation experiments, and the generated-policies state and gating in TableEditor. The TableEditor save/duplicate/create payloads now pass an empty generatedPolicies array and the overall policy-generation UI/control flow has been simplified.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant User
participant TableEditor
participant useTableCreateGeneratePolicies
participant PolicyGeneratorService
participant TelemetryService
participant RLSManagement
User->>TableEditor: open create/duplicate table UI
TableEditor->>useTableCreateGeneratePolicies: check flag & exposure
useTableCreateGeneratePolicies->>TelemetryService: track experiment exposure (days_since_project_creation)
TableEditor->>PolicyGeneratorService: request generate starting policies
PolicyGeneratorService-->>TableEditor: return generated policies
TableEditor->>RLSManagement: present policies list / RLS UI
User->>TableEditor: save table (includes generatedPolicies)
TableEditor->>PolicyGeneratorService: (optional) further policy actions

mermaid
sequenceDiagram
participant User
participant TableEditor
participant RLS/Database
User->>TableEditor: open create/duplicate table UI
TableEditor->>TableEditor: no policy-generation flag/hook
TableEditor->>RLS/Database: render simplified RLS/API toggles
User->>TableEditor: save table (generatedPolicies = [])
TableEditor->>RLS/Database: persist table without generated policies


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@supabase

supabase Bot commented Mar 6, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx (1)

379-547: ⚠️ Potential issue | 🟡 Minor

Prettier is still failing on this file.

CI is red on apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx, so this JSX block needs to be reformatted before merge.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx`
around lines 379 - 547, Prettier formatting failed for the JSX in the
TableEditor component (the SidePanel.Content / SidePanel.Separator blocks and
nested components like Checkbox, Admonition, ColumnManagement,
SpreadsheetImport, ConfirmationModal, ForeignKeysManagement, ApiAccessToggle);
run Prettier on this file and reformat the JSX (or run eslint --fix / yarn
prettier --write
apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx)
so opening/closing tags, props alignment, and indentation conform to project
Prettier rules, then re-run CI to confirm the file passes formatting checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx`:
- Around line 379-547: Prettier formatting failed for the JSX in the TableEditor
component (the SidePanel.Content / SidePanel.Separator blocks and nested
components like Checkbox, Admonition, ColumnManagement, SpreadsheetImport,
ConfirmationModal, ForeignKeysManagement, ApiAccessToggle); run Prettier on this
file and reformat the JSX (or run eslint --fix / yarn prettier --write
apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx)
so opening/closing tags, props alignment, and indentation conform to project
Prettier rules, then re-run CI to confirm the file passes formatting checks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Repository UI (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 53175c7d-b347-46ff-b6d0-d30923747fcc

📥 Commits

Reviewing files that changed from the base of the PR and between 14b2af4 and c6eff2f.

📒 Files selected for processing (7)
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/PolicyList.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/PolicyListEmptyState.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/RLSManagement.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/ToggleRLSButton.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
  • apps/studio/hooks/misc/useTableCreateGeneratePolicies.ts
💤 Files with no reviewable changes (6)
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/PolicyListEmptyState.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/ToggleRLSButton.tsx
  • apps/studio/hooks/misc/useTableCreateGeneratePolicies.ts
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/RLSManagement.tsx
  • apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/RLSManagement/PolicyList.tsx

@github-actions

github-actions Bot commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  155 passed
skipped  4 skipped

Details

stats  159 tests across 20 suites
duration  7 minutes, 43 seconds
commit  3102045

Skipped tests

Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@awaseem awaseem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM you just need to format code. approving to unblock

@seanoliver
seanoliver merged commit 0aa2398 into master Mar 9, 2026
23 checks passed
@seanoliver
seanoliver deleted the sean/growth-653-auto-rls-experiment-cleanup branch March 9, 2026 16:23
@github-actions

github-actions Bot commented Mar 9, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1773073565)

Score Average Improvements Regressions
Completeness 97.2% (+0pp) 1 🟢 1 🔴
Conciseness 0% (+0pp) - -
Goal Completion 90.3% (-6pp) 1 🟢 2 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Tool Usage 100% (+0pp) - -
Docs Faithfulness 55.6% (-8pp) - 2 🔴
URL Validity 100% (+0pp) - -
Correctness 91.7% (-8pp) - 1 🔴
Time_to_first_token 0.71tok (+0.44tok) 3 🟢 9 🔴
Llm_calls 8.56 (+0.14) 6 🟢 2 🔴
Tool_calls 3.42 (+0.33) 6 🟢 1 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 47825.22tok (-4647.97tok) 6 🟢 6 🔴
Prompt_cached_tokens 30577.78tok (+2613.33tok) 10 🟢 2 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 3013.86tok (+305.19tok) 4 🟢 8 🔴
Completion_reasoning_tokens 2200.89tok (+213.33tok) 5 🟢 7 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 50839.08tok (-4342.78tok) 6 🟢 6 🔴
Estimated_cost 0.01$ (0$) 6 🟢 6 🔴
Duration 62.9s (+7.51s) 2 🟢 10 🔴
Llm_duration 120.85s (+11.8s) 3 🟢 9 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants