The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(studio): remove privacy policy notice (#51299)
Pamela Chia20d6f2197f07
diff --git a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx b/apps/studio/components/interfaces/App/AppBannerWrapper.tsxindex 07705189c50..7ba03996c58 100644--- a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx+++ b/apps/studio/components/interfaces/App/AppBannerWrapper.tsx@@ -4,13 +4,12 @@ import { usePathname } from 'next/navigation'import { PropsWithChildren, useEffect, useRef, useState } from 'react'import { OrganizationResourceBanner } from '../Organization/HeaderBanner'-import { isLogsOrObservabilityPath, isOrganizationLandingPath } from './AppBannerWrapper.utils'+import { isLogsOrObservabilityPath } from './AppBannerWrapper.utils'import { ClockSkewBanner } from '@/components/layouts/AppLayout/ClockSkewBanner'import { NoticeBanner } from '@/components/layouts/AppLayout/NoticeBanner'import { StatusBanner } from '@/components/layouts/AppLayout/StatusBanner'import { StatusPageBanner } from '@/components/layouts/AppLayout/StatusPageBanner'import { BannerLogsAllDeprecation } from '@/components/ui/BannerStack/Banners/BannerLogsAllDeprecation'-import { BannerPrivacyPolicyUpdate } from '@/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate'import { BANNER_ID, useBannerStack } from '@/components/ui/BannerStack/BannerStackProvider'import { useLocalStorageQuery } from '@/hooks/misc/useLocalStorage'import { useTrack } from '@/lib/telemetry/track'@@ -31,30 +30,6 @@ export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {const pathname = usePathname()const track = useTrack()- const [privacyPolicyUpdateAcknowledged, , { isSuccess: isPrivacyPolicyDismissalLoaded }] =- useLocalStorageQuery(LOCAL_STORAGE_KEYS.PRIVACY_POLICY_UPDATE, false)-- useEffect(() => {- if (!isPrivacyPolicyDismissalLoaded || pathname == null) return-- if (isOrganizationLandingPath(pathname) && !privacyPolicyUpdateAcknowledged) {- addBanner({- id: BANNER_ID.PRIVACY_POLICY_UPDATE,- isDismissed: false,- content: <BannerPrivacyPolicyUpdate />,- priority: 0,- })- } else {- dismissBanner(BANNER_ID.PRIVACY_POLICY_UPDATE)- }- }, [- pathname,- privacyPolicyUpdateAcknowledged,- isPrivacyPolicyDismissalLoaded,- addBanner,- dismissBanner,- ])-const [isLogsAllDeprecationDismissed, , { isSuccess: isLogsAllDeprecationLoaded }] =useLocalStorageQuery(LOCAL_STORAGE_KEYS.LOGS_ALL_DEPRECATION_2026_09_23, false)diff --git a/apps/studio/components/interfaces/App/AppBannerWrapper.utils.ts b/apps/studio/components/interfaces/App/AppBannerWrapper.utils.tsindex 48b20261bbb..2035a8d9bad 100644--- a/apps/studio/components/interfaces/App/AppBannerWrapper.utils.ts+++ b/apps/studio/components/interfaces/App/AppBannerWrapper.utils.ts@@ -1,16 +1,8 @@// Anchored to the section root so per-resource log pages (e.g. a single edge// function's logs) don't pull the banner outside Logs/Observability.const LOGS_SECTION_PATH = /^\/project\/[^/]+\/(logs|observability)(\/|$)/-const ORGANIZATION_HOME_PATH = /^\/org\/[^/]+\/?$/export function isLogsOrObservabilityPath(pathname: string | null | undefined): boolean {if (!pathname) return falsereturn LOGS_SECTION_PATH.test(pathname)}--export function isOrganizationLandingPath(pathname: string | null | undefined): boolean {- if (!pathname) return false- return (- pathname === '/org' || pathname === '/organizations' || ORGANIZATION_HOME_PATH.test(pathname)- )-}diff --git a/apps/studio/components/ui/BannerStack/BannerStackProvider.tsx b/apps/studio/components/ui/BannerStack/BannerStackProvider.tsxindex 50148decc82..2ecdcd95600 100644--- a/apps/studio/components/ui/BannerStack/BannerStackProvider.tsx+++ b/apps/studio/components/ui/BannerStack/BannerStackProvider.tsx@@ -5,7 +5,6 @@ export const BANNER_ID = {TABLE_EDITOR_QUEUE_OPERATIONS: 'table-editor-queue-operations-banner',RLS_EVENT_TRIGGER: 'rls-event-trigger-banner',FREE_MICRO_UPGRADE: 'free-micro-upgrade-banner',- PRIVACY_POLICY_UPDATE: 'privacy-policy-update-banner',LOGS_ALL_DEPRECATION: 'logs-all-deprecation-banner',EXPLORER: 'explorer-banner',} as constdiff --git a/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.test.tsx b/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.test.tsxdeleted file mode 100644index b0ace47f5d0..00000000000--- a/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.test.tsx+++ /dev/null@@ -1,55 +0,0 @@-import { QueryClient, QueryClientProvider } from '@tanstack/react-query'-import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { LOCAL_STORAGE_KEYS } from 'common/constants/local-storage'-import { PropsWithChildren } from 'react'-import { beforeEach, describe, expect, it } from 'vitest'--import { BannerStackProvider } from '../BannerStackProvider'-import { BannerPrivacyPolicyUpdate } from './BannerPrivacyPolicyUpdate'--const renderBanner = () => {- const queryClient = new QueryClient({- defaultOptions: { queries: { retry: false } },- })-- const Wrapper = ({ children }: PropsWithChildren) => (- <QueryClientProvider client={queryClient}>- <BannerStackProvider>{children}</BannerStackProvider>- </QueryClientProvider>- )-- return render(<BannerPrivacyPolicyUpdate />, { wrapper: Wrapper })-}--describe('BannerPrivacyPolicyUpdate', () => {- beforeEach(() => window.localStorage.clear())-- it('shows the compact notice and the full update details', async () => {- renderBanner()-- expect(screen.getByText("We've updated our Privacy Policy")).toBeVisible()-- fireEvent.click(screen.getByRole('button', { name: 'Learn more' }))-- expect(await screen.findByRole('dialog')).toBeVisible()- expect(screen.getByRole('link', { name: 'Privacy Policy' })).toHaveAttribute(- 'href',- 'https://supabase.com/privacy'- )- expect(screen.getByRole('link', { name: 'contact us' })).toHaveAttribute(- 'href',- 'mailto:[email protected]'- )- })-- it('persists acknowledgement from the dialog', async () => {- renderBanner()-- fireEvent.click(screen.getByRole('button', { name: 'Learn more' }))- fireEvent.click(await screen.findByRole('button', { name: 'Understood' }))-- await waitFor(() =>- expect(window.localStorage.getItem(LOCAL_STORAGE_KEYS.PRIVACY_POLICY_UPDATE)).toBe('true')- )- })-})diff --git a/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.tsx b/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.tsxdeleted file mode 100644index 6dbcd364efb..00000000000--- a/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.tsx+++ /dev/null@@ -1,95 +0,0 @@-import { LOCAL_STORAGE_KEYS } from 'common'-import {- Badge,- Button,- Dialog,- DialogClose,- DialogContent,- DialogDescription,- DialogFooter,- DialogHeader,- DialogSection,- DialogSectionSeparator,- DialogTitle,- DialogTrigger,-} from 'ui'--import { InlineLink } from '../../InlineLink'-import { BannerCard } from '../BannerCard'-import { BANNER_ID, useBannerStack } from '../BannerStackProvider'-import { useLocalStorageQuery } from '@/hooks/misc/useLocalStorage'--export const BannerPrivacyPolicyUpdate = () => {- const { dismissBanner } = useBannerStack()- const [, setPrivacyPolicyUpdateAcknowledged] = useLocalStorageQuery(- LOCAL_STORAGE_KEYS.PRIVACY_POLICY_UPDATE,- false- )-- const acknowledgeUpdate = () => {- setPrivacyPolicyUpdateAcknowledged(true)- dismissBanner(BANNER_ID.PRIVACY_POLICY_UPDATE)- }-- return (- <BannerCard onDismiss={acknowledgeUpdate}>- <div className="flex flex-col gap-y-2">- <Badge variant="default" className="w-min -ml-0.5 uppercase inline-flex items-center mb-2">- Notice- </Badge>-- <div className="flex flex-col gap-y-1 mb-2">- <p className="text-sm font-medium">We've updated our Privacy Policy</p>- <p className="text-xs text-foreground-lighter text-balance">- The data controller is now Supabase Pte. Ltd. Your rights and protections are unchanged.- </p>- </div>- <PrivacyPolicyUpdateDialog onAcknowledge={acknowledgeUpdate} />- </div>- </BannerCard>- )-}--const PrivacyPolicyUpdateDialog = ({ onAcknowledge }: { onAcknowledge: () => void }) => {- return (- <Dialog>- <DialogTrigger asChild>- <Button className="w-min">Learn more</Button>- </DialogTrigger>- <DialogContent>- <DialogHeader>- <DialogTitle>Privacy Policy update</DialogTitle>- <DialogDescription>- We've updated our Privacy Policy to align with our Data Processing Addendum.- </DialogDescription>- </DialogHeader>-- <DialogSectionSeparator />-- <DialogSection className="text-sm flex flex-col gap-y-2">- <p>- The data controller is now listed as Supabase Pte. Ltd. (previously Supabase, Inc.).- </p>- <p>- This is an organizational change for clarity. Your rights, our obligations, and your- data protections remain unchanged.- </p>- <p>- Read the updated{' '}- <InlineLink href="https://supabase.com/privacy">Privacy Policy</InlineLink> or{' '}- <InlineLink href="mailto:[email protected]">contact us</InlineLink> with any- questions.- </p>- </DialogSection>-- <DialogFooter>- <DialogClose asChild>- <Button className="opacity-100" onClick={onAcknowledge}>- Understood- </Button>- </DialogClose>- </DialogFooter>- </DialogContent>- </Dialog>- )-}diff --git a/apps/studio/tests/components/interfaces/App/AppBannerWrapper.utils.test.ts b/apps/studio/tests/components/interfaces/App/AppBannerWrapper.utils.test.tsindex bdb577a3881..12716cda236 100644--- a/apps/studio/tests/components/interfaces/App/AppBannerWrapper.utils.test.ts+++ b/apps/studio/tests/components/interfaces/App/AppBannerWrapper.utils.test.ts@@ -1,9 +1,6 @@import { describe, expect, test } from 'vitest'-import {- isLogsOrObservabilityPath,- isOrganizationLandingPath,-} from '@/components/interfaces/App/AppBannerWrapper.utils'+import { isLogsOrObservabilityPath } from '@/components/interfaces/App/AppBannerWrapper.utils'describe('isLogsOrObservabilityPath', () => {test.each([@@ -29,16 +26,3 @@ describe('isLogsOrObservabilityPath', () => {expect(isLogsOrObservabilityPath(pathname)).toBe(false)})})--describe('isOrganizationLandingPath', () => {- test.each(['/org', '/organizations', '/org/my-org', '/org/my-org/'])('matches %s', (pathname) => {- expect(isOrganizationLandingPath(pathname)).toBe(true)- })-- test.each([undefined, null, '', '/project/abc', '/org/my-org/general', '/organizations/new'])(- 'does not match %s',- (pathname) => {- expect(isOrganizationLandingPath(pathname)).toBe(false)- }- )-})diff --git a/packages/common/constants/local-storage.ts b/packages/common/constants/local-storage.tsindex 262980f4cd7..f987589efcc 100644--- a/packages/common/constants/local-storage.ts+++ b/packages/common/constants/local-storage.ts@@ -80,7 +80,6 @@ export const LOCAL_STORAGE_KEYS = {GITHUB_AUTHORIZATION_STATE: 'supabase-github-authorization-state',// Notice banner keysAPI_KEYS_FEEDBACK_DISMISSED: (ref: string) => `supabase-api-keys-feedback-dismissed-${ref}`,- PRIVACY_POLICY_UPDATE: 'privacy-policy-update-2026-09-16-dismissed',SUPAVISOR_MAINTENANCE: (ref: string) => `supavisor-maintenance-2026-06-09-${ref}`,REPORT_DATERANGE: 'supabase-report-daterange',PROJECT_PAUSING_STARTED_AT: (ref: string) => `supabase-project-pausing-started-at-${ref}`,