From 5b4bc14754f5fb6ca94262c18c65ea0576d64fed Mon Sep 17 00:00:00 2001 From: Andrew Valleteau Date: Wed, 25 Feb 2026 15:36:25 +0100 Subject: [PATCH] feat(branching): reduce default branching limit for pro account (#42872) - Add a warning about spend cap not applied on brahching when enabling github integration - Reduce default concurrent branches to avoid extra costs incurring Screenshot 2026-02-16 at 18 58 14 Fixes: DEVWF-1144 --- .../GitHubIntegrationConnectionForm.tsx | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx index df206af555b..218c82d9ca5 100644 --- a/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx +++ b/apps/studio/components/interfaces/Settings/Integrations/GithubIntegration/GitHubIntegrationConnectionForm.tsx @@ -1,11 +1,5 @@ import { zodResolver } from '@hookform/resolvers/zod' import { PermissionAction } from '@supabase/shared-types/out/constants' -import { ChevronDown, Loader2, PlusIcon, RefreshCw } from 'lucide-react' -import { useEffect, useMemo, useState } from 'react' -import { useForm } from 'react-hook-form' -import { toast } from 'sonner' -import * as z from 'zod' - import { IS_PLATFORM } from 'common' import { useBranchCreateMutation } from 'data/branches/branch-create-mutation' import { useBranchUpdateMutation } from 'data/branches/branch-update-mutation' @@ -20,9 +14,17 @@ import type { GitHubConnection } from 'data/integrations/integrations.types' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' +import { DOCS_URL } from 'lib/constants' import { openInstallGitHubIntegrationWindow } from 'lib/github' import { EMPTY_ARR } from 'lib/void' +import { ChevronDown, Loader2, PlusIcon, RefreshCw } from 'lucide-react' +import { useEffect, useMemo, useState } from 'react' +import { useForm } from 'react-hook-form' +import { toast } from 'sonner' import { + Alert_Shadcn_, + AlertDescription_Shadcn_, + AlertTitle_Shadcn_, Button, Card, CardContent, @@ -44,8 +46,10 @@ import { PopoverTrigger_Shadcn_, Switch, } from 'ui' +import { InlineLink } from 'components/ui/InlineLink' import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' +import * as z from 'zod' const GITHUB_ICON = ( @@ -204,7 +208,7 @@ const GitHubIntegrationConnectionForm = ({ new_branch_per_pr: true, supabaseDirectory: '.', supabaseChangesOnly: true, - branchLimit: '50', + branchLimit: '3', }, }) @@ -343,7 +347,7 @@ const GitHubIntegrationConnectionForm = ({ new_branch_per_pr: true, supabaseDirectory: '.', supabaseChangesOnly: true, - branchLimit: '50', + branchLimit: '3', }) } catch (error) { console.error('Error removing integration:', error) @@ -626,6 +630,18 @@ const GitHubIntegrationConnectionForm = ({ + + Branching and billing + + Branching Compute is not covered by your organization's Spend Cap. Costs + should be closely monitored, as they may be incurred.{' '} + + Learn more + + + {/* Automatic Branching Section */}