diff --git a/.server-changes/fix-preview-branch-limit-count.md b/.server-changes/fix-preview-branch-limit-count.md new file mode 100644 index 0000000000..d5f5b26d74 --- /dev/null +++ b/.server-changes/fix-preview-branch-limit-count.md @@ -0,0 +1,6 @@ +--- +area: webapp +type: fix +--- + +The "Preview branches" usage on the Limits page now counts only preview branches. diff --git a/apps/webapp/app/presenters/v3/LimitsPresenter.server.ts b/apps/webapp/app/presenters/v3/LimitsPresenter.server.ts index cbf3abc5ce..e468efd921 100644 --- a/apps/webapp/app/presenters/v3/LimitsPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/LimitsPresenter.server.ts @@ -155,7 +155,8 @@ export class LimitsPresenter extends BasePresenter { const activeBranchCount = await this._replica.runtimeEnvironment.count({ where: { projectId, - branchName: { + type: "PREVIEW", + parentEnvironmentId: { not: null, }, archivedAt: null,