Free Plan Project Limit Incorrectly Blocks Second Project Creation Without Clear UI Message
Supabase dashboard prevents users on the free plan from creating a second project in an organization that already has one active project, despite the free tier historically allowing two active projects. The UI does not display any project limit or quota error, leaving the user unable to determine whether the block is intentional.
The dashboard's project creation gate likely uses an incorrect active-project count (including soft-deleted, paused, or non-active projects) or a hardcoded free-plan limit of 1 in the frontend. Backend quota checks may also count inactive projects, causing the API to reject the second project without a clear message.
1. Log in to a Supabase free plan account. 2. Open an organization that contains exactly one active project. 3. Click 'New project' and fill in the required details. 4. Attempt to create the project. 5. Observe that project creation does not complete and no explanatory error or limit message is shown.
Fixing Code Block
import { useOrgProjectsQuery } from 'data/projects/projects-query'
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
import { Alert, Button } from 'ui'
export function ProjectLimitGate({ onOpenCreateProject }) {
const { data: projects } = useOrgProjectsQuery()
const { data: subscription } = useOrgSubscriptionQuery()
if (!projects || !subscription) return null
const activeProjects = projects.filter(p => p.status === 'ACTIVE').length
const maxProjects = subscription.plan.id === 'free' ? 2 : subscription.plan.id === 'pro' ? 10 : 1
const canCreateProject = activeProjects < maxProjects
return (
<div>
{canCreateProject ? (
<Button onClick={onOpenCreateProject}>New project</Button>
) : (
<Alert type='warning' title='Project limit reached'>
You have {activeProjects} of {maxProjects} active projects. Pause an existing project or upgrade your plan to create more.
</Alert>
)}
</div>
)
}
This component replaces the existing project creation gate. It filters the organization's projects to only those with status 'ACTIVE', computes the actual maximum based on the subscription plan (free=2, pro=10, others=1), and disables the create button while showing a clear warning alert when the limit is reached. This corrects any hardcoded limit and provides the missing UI feedback.
Edge Case Audit
If the backend still enforces a limit of 1 for free plans (e.g., due to legacy billing configuration), the button will be enabled but creation will still fail, preserving the original silent failure. Ensure the backend quota service is updated to permit 2 active projects on free plans before deploying this frontend change. Concurrency can also bypass the client-side check: two simultaneous creation requests may both pass and exceed quota, so enforce limits server-side with a transaction or unique constraint. To roll back, set an environment variable for the free limit to 1 or revert this component; do not remove the backend check entirely.