From 01902156ce3ec081e358a6347dc8d587752fba17 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Fri, 26 Jun 2026 18:16:39 +1000 Subject: [PATCH] Temporarily disable replication on HA (#47324) Temporarily disables replication on HA projects until they are supported. Requires https://github.com/supabase/supabase/pull/47322 to be merged first. ## Summary by CodeRabbit * **New Features** * Added reusable High Availability UI components for an empty-state message and an availability notice. * Introduced shared High Availability helpers to determine availability status and adjust schema lists accordingly. * Updated the replication page to use the new High Availability flow with a dedicated empty state when enabled. * **Bug Fixes** * Improved High Availability detection consistency, including safer fallback behavior when project data is missing or null. --------- Co-authored-by: Claude Opus 4.8 Co-authored-by: Alaister Young --- .../[ref]/database/replication/index.tsx | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/apps/studio/pages/project/[ref]/database/replication/index.tsx b/apps/studio/pages/project/[ref]/database/replication/index.tsx index f96dd1d7c90..2d48e5b2721 100644 --- a/apps/studio/pages/project/[ref]/database/replication/index.tsx +++ b/apps/studio/pages/project/[ref]/database/replication/index.tsx @@ -1,13 +1,13 @@ -import { Admonition } from 'ui-patterns/admonition' import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' import { Destinations } from '@/components/interfaces/Database/Replication/Destinations' import { ReplicationDiagram } from '@/components/interfaces/Database/Replication/ReplicationDiagram' -import { EmptyReplicationDiagram } from '@/components/interfaces/Database/Replication/ReplicationDiagram/EmptyReplicationDiagram' import DatabaseLayout from '@/components/layouts/DatabaseLayout/DatabaseLayout' import { DefaultLayout } from '@/components/layouts/DefaultLayout' import { ScaffoldContainer, ScaffoldSection } from '@/components/layouts/Scaffold' +import { HighAvailabilityDisabledEmptyState } from '@/components/ui/HighAvailability/HighAvailabilityDisabledEmptyState' import { UnknownInterface } from '@/components/ui/UnknownInterface' +import { useHighAvailability } from '@/hooks/misc/useHighAvailability' import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled' import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject' import { PipelineRequestStatusProvider } from '@/state/replication-pipeline-request-status' @@ -15,12 +15,24 @@ import type { NextPageWithLayout } from '@/types' const DatabaseReplicationPage: NextPageWithLayout = () => { const { data: selectedProject, isPending } = useSelectedProjectQuery() + const { isHighAvailability } = useHighAvailability() const showPgReplicate = useIsFeatureEnabled('database:replication') if (!showPgReplicate) { return } + if (isHighAvailability) { + return ( +
+ +
+ ) + } + return ( @@ -41,31 +53,6 @@ const DatabaseReplicationPage: NextPageWithLayout = () => { - ) : selectedProject?.high_availability ? ( - <> - - - - - - Replication is not currently available for projects with High Availability. Please - contact{' '} - - support - {' '} - if you are interested in using this feature with your High Availability project. - - - - ) : ( <>