The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat(studio): add Privacy Policy update notice (#50397)
claude[bot]99be7f92ced9
diff --git a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx b/apps/studio/components/interfaces/App/AppBannerWrapper.tsxindex 2c05bd85b65..370fd7d968d 100644--- a/apps/studio/components/interfaces/App/AppBannerWrapper.tsx+++ b/apps/studio/components/interfaces/App/AppBannerWrapper.tsx@@ -8,11 +8,12 @@ import {} from 'ui-patterns/Banners/Select26Promotion'import { OrganizationResourceBanner } from '../Organization/HeaderBanner'-import { isLogsOrObservabilityPath } from './AppBannerWrapper.utils'+import { isLogsOrObservabilityPath, isOrganizationLandingPath } from './AppBannerWrapper.utils'import { ClockSkewBanner } from '@/components/layouts/AppLayout/ClockSkewBanner'import { NoticeBanner } from '@/components/layouts/AppLayout/NoticeBanner'import { StatusPageBanner } from '@/components/layouts/AppLayout/StatusPageBanner'import { BannerLogsAllDeprecation } from '@/components/ui/BannerStack/Banners/BannerLogsAllDeprecation'+import { BannerPrivacyPolicyUpdate } from '@/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate'import { BannerSelect2026 } from '@/components/ui/BannerStack/Banners/BannerSelect2026'import {SELECT_26_BANNER_PRIORITY,@@ -45,6 +46,9 @@ export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {false)+ const [privacyPolicyUpdateAcknowledged, , { isSuccess: isPrivacyPolicyDismissalLoaded }] =+ useLocalStorageQuery(LOCAL_STORAGE_KEYS.PRIVACY_POLICY_UPDATE, false)+const [isSelect26BannerDismissed, , { isSuccess: isSelect26DismissalLoaded }] =useLocalStorageQuery(SELECT_26_STUDIO_DISMISSAL_KEY, false)const isSelect26PromotionActive = useSelect26PromotionActive()@@ -92,6 +96,27 @@ export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {}}, [TOSUpdateAcknowledged, isSuccess, addBanner, dismissBanner])+ 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 2035a8d9bad..48b20261bbb 100644--- a/apps/studio/components/interfaces/App/AppBannerWrapper.utils.ts+++ b/apps/studio/components/interfaces/App/AppBannerWrapper.utils.ts@@ -1,8 +1,16 @@// 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 2a2aac2a315..ee0a3d4e82a 100644--- a/apps/studio/components/ui/BannerStack/BannerStackProvider.tsx+++ b/apps/studio/components/ui/BannerStack/BannerStackProvider.tsx@@ -6,6 +6,7 @@ export const BANNER_ID = {RLS_EVENT_TRIGGER: 'rls-event-trigger-banner',FREE_MICRO_UPGRADE: 'free-micro-upgrade-banner',TOS_UPDATE: 'tos-update-banner',+ PRIVACY_POLICY_UPDATE: 'privacy-policy-update-banner',LOGS_ALL_DEPRECATION: 'logs-all-deprecation-banner',SELECT_26: 'select-2026-banner',EXPLORER: 'explorer-banner',diff --git a/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.test.tsx b/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.test.tsxnew file mode 100644index 00000000000..b0ace47f5d0--- /dev/null+++ b/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.test.tsx@@ -0,0 +1,55 @@+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.tsxnew file mode 100644index 00000000000..6dbcd364efb--- /dev/null+++ b/apps/studio/components/ui/BannerStack/Banners/BannerPrivacyPolicyUpdate.tsx@@ -0,0 +1,95 @@+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 12716cda236..bdb577a3881 100644--- a/apps/studio/tests/components/interfaces/App/AppBannerWrapper.utils.test.ts+++ b/apps/studio/tests/components/interfaces/App/AppBannerWrapper.utils.test.ts@@ -1,6 +1,9 @@import { describe, expect, test } from 'vitest'-import { isLogsOrObservabilityPath } from '@/components/interfaces/App/AppBannerWrapper.utils'+import {+ isLogsOrObservabilityPath,+ isOrganizationLandingPath,+} from '@/components/interfaces/App/AppBannerWrapper.utils'describe('isLogsOrObservabilityPath', () => {test.each([@@ -26,3 +29,16 @@ 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 0ffda24c5ca..23808138393 100644--- a/packages/common/constants/local-storage.ts+++ b/packages/common/constants/local-storage.ts@@ -80,6 +80,7 @@ export const LOCAL_STORAGE_KEYS = {// Notice banner keysAPI_KEYS_FEEDBACK_DISMISSED: (ref: string) => `supabase-api-keys-feedback-dismissed-${ref}`,TERMS_OF_SERVICE_UPDATE: 'terms-of-service-update-2026-08-01',+ 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}`,