From be0d05fb08029bedc266894d2d232d494be5f61e Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Tue, 14 Apr 2026 19:39:20 +0900 Subject: [PATCH] Bring Branching 2.0 out of feature preview (#44279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Context Have Branching 2.0 as the default behaviour + remove it from feature preview Behaviour should match staging / prod if branching 2.0 feature preview is toggled on ## To test - [ ] Test branching flow in general for any oddities ## Summary by CodeRabbit * **Chores** * Removed the Branching 2.0 preview and cleared its persisted preview setting; branching UI and branch editing are now available without opt‑in. * Simplified branch management flows and empty states by removing preview-dependent conditions and tooltips. * Made GitHub branch sync optional in create/edit forms and simplified validation and submit behavior. * "Create merge request" and related branch actions now render consistently across the UI. --- .../App/FeaturePreview/Branching2Preview.tsx | 60 ------ .../FeaturePreview/FeaturePreviewContext.tsx | 5 - .../FeaturePreview/FeaturePreviewModal.tsx | 2 - .../App/FeaturePreview/useFeaturePreviews.ts | 9 - .../BranchManagement/BranchSelector.tsx | 22 +- .../BranchManagement/CreateBranchModal.tsx | 200 ++++++++---------- .../BranchManagement/EditBranchModal.tsx | 174 +++++++-------- .../BranchManagement/EmptyStates.tsx | 23 +- .../interfaces/BranchManagement/Overview.tsx | 53 +++-- .../Navigation/LayoutHeader/LayoutHeader.tsx | 8 +- .../project/[ref]/branches/merge-requests.tsx | 101 ++++----- packages/common/constants/local-storage.ts | 2 - 12 files changed, 263 insertions(+), 396 deletions(-) delete mode 100644 apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx diff --git a/apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx deleted file mode 100644 index 6eb5df454af..00000000000 --- a/apps/studio/components/interfaces/App/FeaturePreview/Branching2Preview.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import Image from 'next/image' - -import { InlineLink } from '@/components/ui/InlineLink' -import { BASE_PATH, DOCS_URL } from '@/lib/constants' - -export const Branching2Preview = () => { - return ( -
-

- Create branches, review changes, and merge back into production all through the dashboard. - Read the below limitations and our{' '} - - branching documentation - {' '} - before opting in. -

- - api-docs-side-panel-preview - -
-

Limitations:

-
    -
  • Custom roles created through the dashboard are not captured on branch creation.
  • -
  • - Branches can only be merged to main; merging between preview branches is - not supported. -
  • -
  • - If your branch is out of date, you can pull in latest changes from main, - but keep in mind that all functions will be overwritten. -
  • -
  • - Deleting functions must be done manually on main. -
  • -
  • Migration conflicts must be manually resolved on the preview branch.
  • -
  • - If you have run migrations on main, new branches will be created from - existing migrations instead of a full schema dump. -
  • -
-
- -
-

Enabling this preview will:

-
    -
  • - Allow you to create, manage, review, and merge database branches directly via the - branches page within the dashboard -
  • -
-
-
- ) -} diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx index b26848d2eab..999a763bc1d 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx @@ -95,11 +95,6 @@ export const useUnifiedLogsPreview = () => { return { isEnabled, enable, disable } } -export const useIsBranching2Enabled = () => { - const { flags } = useFeaturePreviewContext() - return flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_BRANCHING_2_0] -} - export const useIsPgDeltaDiffEnabled = () => { const { flags } = useFeaturePreviewContext() const pgDeltaDiffEnabled = useFlag('pgdeltaDiff') diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx index aab353f7742..ffefc4eb0c9 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx @@ -23,7 +23,6 @@ import { } from 'ui/src/components/shadcn/ui/select' import { AdvisorRulesPreview } from './AdvisorRulesPreview' -import { Branching2Preview } from './Branching2Preview' import { CLSPreview } from './CLSPreview' import { useFeaturePreviewContext, useFeaturePreviewModal } from './FeaturePreviewContext' import { FloatingMobileToolbarPreview } from './FloatingMobileToolbarPreview' @@ -40,7 +39,6 @@ import { IS_PLATFORM } from '@/lib/constants' const FEATURE_PREVIEW_KEY_TO_CONTENT: { [key: string]: ReactNode } = { - [LOCAL_STORAGE_KEYS.UI_PREVIEW_BRANCHING_2_0]: , [LOCAL_STORAGE_KEYS.UI_PREVIEW_PG_DELTA_DIFF]: , [LOCAL_STORAGE_KEYS.UI_PREVIEW_ADVISOR_RULES]: , [LOCAL_STORAGE_KEYS.UI_PREVIEW_CLS]: , diff --git a/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts b/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts index 292ce5aa2ad..41c7dafd4c2 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts +++ b/apps/studio/components/interfaces/App/FeaturePreview/useFeaturePreviews.ts @@ -31,15 +31,6 @@ export const useFeaturePreviews = (): FeaturePreview[] => { isPlatformOnly: true, isDefaultOptIn: false, }, - { - key: LOCAL_STORAGE_KEYS.UI_PREVIEW_BRANCHING_2_0, - name: 'Branching via dashboard', - discussionsUrl: 'https://github.com/orgs/supabase/discussions/branching-2-0', - enabled: true, - isNew: false, - isPlatformOnly: true, - isDefaultOptIn: false, - }, { key: LOCAL_STORAGE_KEYS.UI_PREVIEW_ADVISOR_RULES, name: 'Disable Advisor rules', diff --git a/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx b/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx index 75836656669..a208bac22e2 100644 --- a/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx +++ b/apps/studio/components/interfaces/BranchManagement/BranchSelector.tsx @@ -22,6 +22,7 @@ interface BranchSelectorProps { disabled?: boolean isUpdating?: boolean type?: 'primary' | 'outline' + align?: 'end' | 'center' } export const BranchSelector = ({ @@ -30,14 +31,12 @@ export const BranchSelector = ({ disabled = false, isUpdating = false, type = 'primary', + align = 'end', }: BranchSelectorProps) => { const [open, setOpen] = useState(false) const [selectedBranch, setSelectedBranch] = useState(null) - // Filter out branches that are already ready for review or linked to a github branch - const availableBranches = branches.filter( - (branch) => !branch.is_default && !branch.review_requested_at && !branch.git_branch - ) + const availableBranches = branches.filter((branch) => !branch.is_default) const handleBranchSelect = (branch: Branch) => { setSelectedBranch(branch) @@ -51,16 +50,17 @@ export const BranchSelector = ({ } type={type} - disabled={disabled || availableBranches.length === 0 || isUpdating} + disabled={ + disabled || isUpdating || branches.length === 0 || availableBranches.length === 0 + } tooltip={{ content: { side: 'bottom', + align, text: - branches.length === 0 + branches.length === 0 || availableBranches.length === 0 ? 'Create a branch first to start a merge request' - : availableBranches.length === 0 - ? 'All branches currently have merge requests' - : undefined, + : undefined, }, }} > @@ -80,7 +80,7 @@ export const BranchSelector = ({ value={branch.name.replaceAll('"', '')} className="cursor-pointer w-full flex items-center justify-between" onSelect={() => handleBranchSelect(branch)} - disabled={isUpdating} + disabled={isUpdating || !!branch.git_branch || !!branch.review_requested_at} >
{branch.is_default && } @@ -91,6 +91,8 @@ export const BranchSelector = ({ {selectedBranch?.id === branch.id && ( )} + {branch.git_branch && Synced to a Git branch} + {branch.review_requested_at && Merge request opened} ))} diff --git a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx index 8df89e74b80..21a2a3db8ab 100644 --- a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx +++ b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx @@ -32,7 +32,7 @@ import { TooltipTrigger, } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' -import { GenericSkeletonLoader, ShimmeringLoader } from 'ui-patterns/ShimmeringLoader' +import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader' import * as z from 'zod' import { @@ -40,7 +40,6 @@ import { estimateDiskCost, estimateRestoreTime, } from './BranchManagement.utils' -import { useIsBranching2Enabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext' import { BranchingPITRNotice } from '@/components/layouts/AppLayout/EnableBranchingButton/BranchingPITRNotice' import AlertError from '@/components/ui/AlertError' import { ButtonTooltip } from '@/components/ui/ButtonTooltip' @@ -70,7 +69,6 @@ export const CreateBranchModal = () => { const { data: selectedOrg } = useSelectedOrganizationQuery() const { showCreateBranchModal, setShowCreateBranchModal } = useAppStateSnapshot() - const gitlessBranching = useIsBranching2Enabled() const allowDataBranching = useFlag('allowDataBranching') const [isGitBranchValid, setIsGitBranchValid] = useState(false) @@ -101,12 +99,7 @@ export const CreateBranchModal = () => { (val) => (branches ?? []).every((branch) => branch.name !== val), 'A branch with this name already exists' ), - gitBranchName: z - .string() - .refine( - (val) => gitlessBranching || !githubConnection || (val && val.length > 0), - 'Git branch name is required when GitHub is connected' - ), + gitBranchName: z.string().optional(), withData: z.boolean().default(false).optional(), }) @@ -137,11 +130,10 @@ export const CreateBranchModal = () => { { enabled: showCreateBranchModal } ) const computeAddon = addons?.selected_addons.find((addon) => addon.type === 'compute_instance') - const computeSize = !!computeAddon + const computeSize = computeAddon ? (computeAddon.variant.identifier.split('ci_')[1] as DesiredInstanceSize) : undefined - const hasPitrEnabled = - (addons?.selected_addons ?? []).find((addon) => addon.type === 'pitr') !== undefined + const hasPitrEnabled = (addons?.selected_addons ?? []).some((addon) => addon.type === 'pitr') const { data: disk, @@ -174,15 +166,13 @@ export const CreateBranchModal = () => { onSuccess: async (data) => { toast.success(`Successfully created preview branch "${data.name}"`) if (projectRef) { - await Promise.all([ - queryClient.invalidateQueries({ queryKey: projectKeys.detail(projectRef) }), - ]) + await queryClient.invalidateQueries({ queryKey: projectKeys.detail(projectRef) }) } sendEvent({ action: 'branch_create_button_clicked', properties: { branchType: data.persistent ? 'persistent' : 'preview', - gitlessBranching, + gitlessBranching: !data.git_branch, }, groups: { project: ref ?? 'Unknown', @@ -208,18 +198,13 @@ export const CreateBranchModal = () => { !isFormValid || !canCreateBranch || !isSuccessAddons || - !isSuccessConnections || + (!!gitBranchName && !isSuccessConnections) || isLoadingEntitlement || !hasAccessToBranching || - (!gitlessBranching && !githubConnection) || isCreatingBranch || isCheckingGHBranchValidity - const tooltipText = promptPlanUpgrade - ? 'Upgrade to unlock branching' - : !gitlessBranching && !githubConnection - ? 'Set up a GitHub connection first to create branches' - : undefined + const tooltipText = promptPlanUpgrade ? 'Upgrade to unlock branching' : undefined const validateGitBranchName = useCallback( (branchName: string) => { @@ -283,24 +268,16 @@ export const CreateBranchModal = () => { } useEffect(() => { - if (form && showCreateBranchModal) { - form.reset() - } + if (showCreateBranchModal) form.reset() }, [form, showCreateBranchModal]) useEffect(() => { - if (!githubConnection || !debouncedGitBranchName) { - setIsGitBranchValid(gitlessBranching) - form.clearErrors('gitBranchName') - return - } - form.clearErrors('gitBranchName') - validateGitBranchName(debouncedGitBranchName) - }, [debouncedGitBranchName, validateGitBranchName, form, githubConnection, gitlessBranching]) + if (githubConnection && debouncedGitBranchName) validateGitBranchName(debouncedGitBranchName) + }, [debouncedGitBranchName, validateGitBranchName, form, githubConnection]) return ( - setShowCreateBranchModal(open)}> + { )} /> - {githubConnection && ( - ( - - - Sync with Git branch {gitlessBranching ? '(optional)' : ''} - -
- {`GitHub - - {repoOwner}/{repoName} - -
-
- } - description="Automatically deploy changes on every commit" - > -
- - { - field.onChange(e) - setIsGitBranchValid(false) - }} - /> - -
- {field.value ? ( - isCheckingGHBranchValidity ? ( - - ) : isGitBranchValid ? ( - - ) : null - ) : null} -
-
- - )} - /> + {isLoadingConnections && ( +
+ + +
)} - {isLoadingConnections && } {isErrorConnections && ( )} - {isSuccessConnections && ( - <> - {!githubConnection && ( -
-
-
- - {!gitlessBranching && Required} + + {isSuccessConnections && + (githubConnection ? ( + ( + + Sync with Git branch +
+ {`GitHub + + {repoOwner}/{repoName} + +
+
+ } + labelOptional="Optional" + description="Automatically deploy changes on every commit" + > +
+ + { + field.onChange(e) + setIsGitBranchValid(false) + }} + /> + +
+ {field.value ? ( + isCheckingGHBranchValidity ? ( + + ) : isGitBranchValid ? ( + + ) : null + ) : null} +
-

- Keep this preview branch in sync with a chosen GitHub branch -

-
- + + )} + /> + ) : ( +
+
+ +

+ Keep this preview branch in sync with a chosen GitHub branch +

- )} - - )} + +
+ ))} + {allowDataBranching && ( {

-

Targer disk size:

+

Target disk size:

{branchDiskAttributes.size_gb} GB

(${estimatedDiskCost.size.toFixed(2)})

diff --git a/apps/studio/components/interfaces/BranchManagement/EditBranchModal.tsx b/apps/studio/components/interfaces/BranchManagement/EditBranchModal.tsx index 67c9ca8f964..8a35da8fdd7 100644 --- a/apps/studio/components/interfaces/BranchManagement/EditBranchModal.tsx +++ b/apps/studio/components/interfaces/BranchManagement/EditBranchModal.tsx @@ -8,7 +8,6 @@ import { useCallback, useEffect, useState } from 'react' import { useForm, useWatch } from 'react-hook-form' import { toast } from 'sonner' import { - Badge, Button, cn, Dialog, @@ -25,10 +24,9 @@ import { Label_Shadcn_ as Label, } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' -import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' +import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader' import * as z from 'zod' -import { useIsBranching2Enabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext' import { AlertError } from '@/components/ui/AlertError' import { InlineLink } from '@/components/ui/InlineLink' import { useBranchUpdateMutation } from '@/data/branches/branch-update-mutation' @@ -50,9 +48,8 @@ export const EditBranchModal = ({ branch, visible, onClose }: EditBranchModalPro const router = useRouter() const { data: projectDetails } = useSelectedProjectQuery() const { data: selectedOrg } = useSelectedOrganizationQuery() - const gitlessBranching = useIsBranching2Enabled() - const [isGitBranchValid, setIsGitBranchValid] = useState(false) + const [isGitBranchValid, setIsGitBranchValid] = useState(true) const isBranch = projectDetails?.parent_project_ref !== undefined const projectRef = @@ -101,12 +98,7 @@ export const EditBranchModal = ({ branch, visible, onClose }: EditBranchModalPro val === branch?.name || (branches ?? []).every((b) => b.name !== val), 'A branch with this name already exists' ), - gitBranchName: z - .string() - .refine( - (val) => gitlessBranching || !githubConnection || (val && val.length > 0), - 'Git branch name is required when GitHub is connected' - ), + gitBranchName: z.string().optional(), }) const form = useForm>({ @@ -200,24 +192,21 @@ export const EditBranchModal = ({ branch, visible, onClose }: EditBranchModalPro // Pre-fill form when the modal becomes visible and branch data is available useEffect(() => { if (visible && branch) { - setIsGitBranchValid(!!branch.git_branch || gitlessBranching) // Initial validity based on existing link or gitless branching form.reset({ branchName: branch.name ?? '', gitBranchName: branch.git_branch ?? '', }) } - }, [branch, visible, form, gitlessBranching]) + }, [branch, visible, form]) useEffect(() => { if (!githubConnection || !debouncedGitBranchName) { - setIsGitBranchValid(gitlessBranching) - form.clearErrors('gitBranchName') - return + return form.clearErrors('gitBranchName') } form.clearErrors('gitBranchName') validateGitBranchName(debouncedGitBranchName) - }, [debouncedGitBranchName, validateGitBranchName, form, githubConnection, gitlessBranching]) + }, [debouncedGitBranchName, validateGitBranchName, form, githubConnection]) return ( !open && onClose()}> @@ -245,88 +234,88 @@ export const EditBranchModal = ({ branch, visible, onClose }: EditBranchModalPro )} /> - {githubConnection && ( - ( - - - Sync with Git branch {gitlessBranching ? '(optional)' : ''} - -
- {`GitHub - - {repoOwner}/{repoName} - -
- - } - description={ - gitlessBranching - ? 'Automatically deploy changes on every commit' - : 'If linked, migrations from this Git branch will be automatically deployed.' - } - > -
- - { - field.onChange(e) - setIsGitBranchValid(false) - }} - /> - -
- {field.value ? ( - isChecking ? ( - - ) : isGitBranchValid ? ( - - ) : null - ) : null} -
-
-
- )} - /> + {isLoadingConnections && ( +
+ + +
)} - {isLoadingConnections && } + {isErrorConnections && ( )} - {isSuccessConnections && !githubConnection && ( -
-
-
- - {!gitlessBranching && Required} + + {isSuccessConnections && + (githubConnection ? ( + ( + + Sync with Git branch +
+ {`GitHub + + {repoOwner}/{repoName} + +
+
+ } + labelOptional="Optional" + description="Automatically deploy changes on every commit" + > +
+ + { + field.onChange(e) + setIsGitBranchValid(false) + }} + /> + +
+ {field.value ? ( + isChecking ? ( + + ) : isGitBranchValid ? ( + + ) : null + ) : null} +
+
+ + )} + /> + ) : ( +
+
+
+ +
+

+ Optionally connect to a GitHub repository to manage migrations automatically + for this branch. +

-

- {gitlessBranching - ? 'Optionally connect to a GitHub repository to manage migrations automatically for this branch.' - : 'Keep this preview branch in sync with a chosen GitHub branch'} -

+
- -
- )} + ))} @@ -336,11 +325,10 @@ export const EditBranchModal = ({ branch, visible, onClose }: EditBranchModalPro )} - {gitlessBranching && ( - - )} +
) diff --git a/apps/studio/components/interfaces/BranchManagement/Overview.tsx b/apps/studio/components/interfaces/BranchManagement/Overview.tsx index fe43b556e12..af133208449 100644 --- a/apps/studio/components/interfaces/BranchManagement/Overview.tsx +++ b/apps/studio/components/interfaces/BranchManagement/Overview.tsx @@ -28,7 +28,6 @@ import { ConfirmationModal } from 'ui-patterns/Dialogs/ConfirmationModal' import { BranchLoader, BranchManagementSection, BranchRow, BranchRowLoader } from './BranchPanels' import { EditBranchModal } from './EditBranchModal' import { PreviewBranchesEmptyState } from './EmptyStates' -import { useIsBranching2Enabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext' import { DropdownMenuItemTooltip } from '@/components/ui/DropdownMenuItemTooltip' import { TextConfirmModal } from '@/components/ui/TextConfirmModalWrapper' import { useBranchQuery } from '@/data/branches/branch-query' @@ -236,7 +235,6 @@ const PreviewBranchActions = ({ onSelectDeleteBranch: () => void generateCreatePullRequestURL: (branchName?: string) => string }) => { - const gitlessBranching = useIsBranching2Enabled() const queryClient = useQueryClient() const { project_ref: branchRef, parent_project_ref: projectRef } = branch @@ -321,33 +319,30 @@ const PreviewBranchActions = ({ /> - {/* Edit Branch (gitless) */} - {gitlessBranching && ( - { - e.stopPropagation() - setShowEditBranchModal(true) - }} - onClick={(e) => { - e.stopPropagation() - setShowEditBranchModal(true) - }} - tooltip={{ - content: { - side: 'left', - text: !canUpdateBranches - ? 'You need additional permissions to edit branches' - : !isBranchActiveHealthy - ? 'Branch is still initializing. Please wait for it to become healthy before editing.' - : undefined, - }, - }} - > - Edit branch - - )} + { + e.stopPropagation() + setShowEditBranchModal(true) + }} + onClick={(e) => { + e.stopPropagation() + setShowEditBranchModal(true) + }} + tooltip={{ + content: { + side: 'left', + text: !canUpdateBranches + ? 'You need additional permissions to edit branches' + : !isBranchActiveHealthy + ? 'Branch is still initializing. Please wait for it to become healthy before editing.' + : undefined, + }, + }} + > + Edit branch + {!branch.deletion_scheduled_at && ( - {IS_PLATFORM && gitlessBranching && } + {IS_PLATFORM && } )} diff --git a/apps/studio/pages/project/[ref]/branches/merge-requests.tsx b/apps/studio/pages/project/[ref]/branches/merge-requests.tsx index 7d22ca5ef1d..fddabccfbb7 100644 --- a/apps/studio/pages/project/[ref]/branches/merge-requests.tsx +++ b/apps/studio/pages/project/[ref]/branches/merge-requests.tsx @@ -15,7 +15,6 @@ import { } from 'ui' import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' -import { useIsBranching2Enabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext' import { BranchManagementSection, BranchRow, @@ -44,7 +43,6 @@ const MergeRequestsPage: NextPageWithLayout = () => { const { ref } = useParams() const { data: project } = useSelectedProjectQuery() const { data: selectedOrg } = useSelectedOrganizationQuery() - const gitlessBranching = useIsBranching2Enabled() const isBranch = project?.parent_project_ref !== undefined const projectRef = @@ -68,7 +66,6 @@ const MergeRequestsPage: NextPageWithLayout = () => { error: branchesError, isPending: isLoadingBranches, isError: isErrorBranches, - isSuccess: isSuccessBranches, } = useBranchesQuery({ projectRef }) const [[mainBranch], previewBranchesUnsorted] = partition(branches, (branch) => branch.is_default) const previewBranches = previewBranchesUnsorted.sort((a, b) => @@ -190,30 +187,26 @@ const MergeRequestsPage: NextPageWithLayout = () => { {!isError && (
- {gitlessBranching && ( - <> - {isBranch && !isCurrentBranchReadyForReview && currentBranch && ( -
-
-
- - {currentBranch.name} - last viewed -
- -
+ {isBranch && !isCurrentBranchReadyForReview && currentBranch && ( +
+
+
+ + {currentBranch.name} + last viewed
- )} - + +
+
)} { ) : ( )} @@ -322,7 +314,6 @@ const MergeRequestsPageWrapper = ({ children }: PropsWithChildren<{}>) => { const { ref } = useParams() const { data: project } = useSelectedProjectQuery() const { data: selectedOrg } = useSelectedOrganizationQuery() - const gitlessBranching = useIsBranching2Enabled() const isBranch = project?.parent_project_ref !== undefined const projectRef = @@ -373,36 +364,36 @@ const MergeRequestsPageWrapper = ({ children }: PropsWithChildren<{}>) => { ) } - const primaryActions = gitlessBranching ? ( - - ) : null - - const secondaryActions = ( -
- ) - return ( + } + secondaryActions={ +
+ + +
+ } > {children}
diff --git a/packages/common/constants/local-storage.ts b/packages/common/constants/local-storage.ts index a3561693600..5195a4af689 100644 --- a/packages/common/constants/local-storage.ts +++ b/packages/common/constants/local-storage.ts @@ -19,7 +19,6 @@ export const LOCAL_STORAGE_KEYS = { UI_PREVIEW_INLINE_EDITOR: 'supabase-ui-preview-inline-editor', UI_PREVIEW_UNIFIED_LOGS: 'supabase-ui-preview-unified-logs', UI_ONBOARDING_NEW_PAGE_SHOWN: 'supabase-ui-onboarding-new-page-shown', - UI_PREVIEW_BRANCHING_2_0: 'supabase-ui-branching-2-0', UI_PREVIEW_ADVISOR_RULES: 'supabase-ui-advisor-rules', UI_PREVIEW_QUEUE_OPERATIONS: 'supabase-ui-queue-operations', UI_PREVIEW_TABLE_FILTER_BAR: 'supabase-ui-table-filter-bar', @@ -163,7 +162,6 @@ const LOCAL_STORAGE_KEYS_ALLOWLIST = [ LOCAL_STORAGE_KEYS.HIDE_PROMO_TOAST, LOCAL_STORAGE_KEYS.BLOG_VIEW, LOCAL_STORAGE_KEYS.AI_ASSISTANT_MCP_OPT_IN, - LOCAL_STORAGE_KEYS.UI_PREVIEW_BRANCHING_2_0, LOCAL_STORAGE_KEYS.LINTER_SHOW_FOOTER, LOCAL_STORAGE_KEYS.SIDEBAR_BEHAVIOR, ]