Skip to content

Commit 7f2365f

Browse files
authored
Adds a tooltip to the Status header showing deployment status descriptions (#1554)
1 parent f560594 commit 7f2365f

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

apps/webapp/app/components/runs/v3/DeploymentStatus.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,34 @@ export function deploymentStatusTitle(status: WorkerDeploymentStatus, isBuilt: b
118118
}
119119
}
120120
}
121+
122+
// PENDING and CANCELED are not used so are ommited from the UI
123+
export const deploymentStatuses: WorkerDeploymentStatus[] = [
124+
"BUILDING",
125+
"DEPLOYING",
126+
"DEPLOYED",
127+
"FAILED",
128+
"TIMED_OUT",
129+
];
130+
131+
export function deploymentStatusDescription(status: WorkerDeploymentStatus): string {
132+
switch (status) {
133+
case "PENDING":
134+
return "The deployment is queued and waiting to be processed.";
135+
case "BUILDING":
136+
return "The code is being built and prepared for deployment.";
137+
case "DEPLOYING":
138+
return "The deployment is in progress and tasks are being indexed.";
139+
case "DEPLOYED":
140+
return "The deployment has completed successfully.";
141+
case "CANCELED":
142+
return "The deployment was manually canceled.";
143+
case "FAILED":
144+
return "The deployment encountered an error and could not complete.";
145+
case "TIMED_OUT":
146+
return "The deployment exceeded the maximum allowed time and was stopped.";
147+
default: {
148+
assertNever(status);
149+
}
150+
}
151+
}

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ import {
3535
TableRow,
3636
} from "~/components/primitives/Table";
3737
import { TextLink } from "~/components/primitives/TextLink";
38-
import { DeploymentStatus } from "~/components/runs/v3/DeploymentStatus";
38+
import {
39+
DeploymentStatus,
40+
deploymentStatuses,
41+
deploymentStatusDescription,
42+
} from "~/components/runs/v3/DeploymentStatus";
3943
import { RetryDeploymentIndexingDialog } from "~/components/runs/v3/RetryDeploymentIndexingDialog";
4044
import { RollbackDeploymentDialog } from "~/components/runs/v3/RollbackDeploymentDialog";
4145
import { useOrganization } from "~/hooks/useOrganizations";
@@ -120,7 +124,30 @@ export default function Page() {
120124
<TableHeaderCell>Deploy</TableHeaderCell>
121125
<TableHeaderCell>Env</TableHeaderCell>
122126
<TableHeaderCell>Version</TableHeaderCell>
123-
<TableHeaderCell>Status</TableHeaderCell>
127+
<TableHeaderCell
128+
tooltip={
129+
<div className="flex flex-col divide-y divide-grid-dimmed">
130+
{deploymentStatuses.map((status) => (
131+
<div
132+
key={status}
133+
className="grid grid-cols-[8rem_1fr] gap-x-2 py-2 first:pt-1 last:pb-1"
134+
>
135+
<div className="mb-0.5 flex items-center gap-1.5 whitespace-nowrap">
136+
<DeploymentStatus status={status} isBuilt={false} />
137+
</div>
138+
<Paragraph
139+
variant="extra-small"
140+
className="!text-wrap text-text-dimmed"
141+
>
142+
{deploymentStatusDescription(status)}
143+
</Paragraph>
144+
</div>
145+
))}
146+
</div>
147+
}
148+
>
149+
Status
150+
</TableHeaderCell>
124151
<TableHeaderCell>Tasks</TableHeaderCell>
125152
<TableHeaderCell>Deployed at</TableHeaderCell>
126153
<TableHeaderCell>Deployed by</TableHeaderCell>

0 commit comments

Comments
 (0)