Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .server-changes/bound-project-environment-loads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: improvement
---

Project pages now load faster for projects with a large number of preview branches, by no longer loading archived branch environments that aren't shown.
1 change: 1 addition & 0 deletions apps/webapp/app/presenters/ProjectPresenter.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class ProjectPresenter {
version: true,
externalRef: true,
environments: {
where: { archivedAt: null },
select: {
id: true,
slug: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class SelectBestEnvironmentPresenter {
include: {
organization: true,
environments: {
where: { archivedAt: null },
select: {
id: true,
type: true,
Expand All @@ -71,6 +72,7 @@ export class SelectBestEnvironmentPresenter {
include: {
organization: true,
environments: {
where: { archivedAt: null },
select: {
id: true,
type: true,
Expand Down
18 changes: 0 additions & 18 deletions apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,6 @@ export class DeploymentListPresenter {
const project = await this.#prismaClient.project.findFirstOrThrow({
select: {
id: true,
environments: {
select: {
id: true,
type: true,
slug: true,
orgMember: {
select: {
user: {
select: {
id: true,
name: true,
displayName: true,
},
},
},
},
},
},
connectedGithubRepository: {
select: {
branchTracking: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
},
include: {
environments: {
where: { archivedAt: null },
select: {
id: true,
type: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
},
include: {
environments: {
where: { archivedAt: null },
Comment thread
ericallam marked this conversation as resolved.
select: {
id: true,
type: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
},
include: {
environments: {
where: { archivedAt: null },
Comment thread
ericallam marked this conversation as resolved.
select: {
id: true,
type: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
},
include: {
environments: {
where: { archivedAt: null },
select: {
id: true,
type: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
},
include: {
environments: {
where: { archivedAt: null },
select: {
id: true,
type: true,
Expand Down
Loading