mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## Problem PR #43704 added the `tableEditorApiAccessToggle` flag to revoke default privileges on project creation, but there's no PostHog instrumentation to measure the rollout or understand how users respond to the new behavior. ## Changes **1. Flag state on project creation** (`project_creation_simple_version_submitted`) Adds `tableEditorApiAccessToggleEnabled` property — reads the raw PostHog flag via `usePHFlag` rather than going through `useDataApiGrantTogglesEnabled`, which coerces `undefined` (flag still loading) to `false` and would silently poison the data. When the flag hasn't loaded, the property is omitted from the event entirely. **2. Per-table toggle tracking** (`table_api_access_toggle_clicked`) New event that fires when a user flips the Data API access switch in the table editor side panel (new tables only — existing tables link out to settings). Tracks `newState: 'enabled' | 'disabled'` and `schemaName` so we can distinguish public-schema toggles from custom schemas. Together these let us answer: what % of projects have the new defaults, and how do those users respond (do they opt tables back in, and in which schemas)? Part of the Secure by Default initiative (#43704)