Skip to content

Commit 053c650

Browse files
committed
Improved the waitpoint display
1 parent 23c77d4 commit 053c650

File tree

1 file changed

+25
-17
lines changed
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.v3.$projectParam.runs.$runParam.spans.$spanParam

1 file changed

+25
-17
lines changed

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.v3.$projectParam.runs.$runParam.spans.$spanParam/route.tsx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import { requireUserId } from "~/services/session.server";
5656
import { cn } from "~/utils/cn";
5757
import { formatCurrencyAccurate } from "~/utils/numberFormatter";
5858
import {
59+
docsPath,
5960
v3BatchPath,
6061
v3RunDownloadLogsPath,
6162
v3RunPath,
@@ -1076,6 +1077,9 @@ function classNameForState(state: TimelineState) {
10761077
}
10771078

10781079
function SpanEntity({ span }: { span: Span }) {
1080+
const organization = useOrganization();
1081+
const project = useProject();
1082+
10791083
switch (span.entityType) {
10801084
case "waitpoint": {
10811085
if (!span.waitpoint) {
@@ -1084,15 +1088,16 @@ function SpanEntity({ span }: { span: Span }) {
10841088

10851089
return (
10861090
<>
1091+
<div className="">
1092+
<Header2>Waitpoint</Header2>
1093+
<Paragraph variant="small">
1094+
A waitpoint pauses your code from continuing until the conditions are met.{" "}
1095+
<TextLink to={docsPath("wait")}>View docs</TextLink>.
1096+
</Paragraph>
1097+
</div>
10871098
<Property.Table>
10881099
<Property.Item>
1089-
<Property.Label>Waitpoint ID</Property.Label>
1090-
<Property.Value className="whitespace-pre-wrap">
1091-
{span.waitpoint?.friendlyId}
1092-
</Property.Value>
1093-
</Property.Item>
1094-
<Property.Item>
1095-
<Property.Label>Waitpoint status</Property.Label>
1100+
<Property.Label>Status</Property.Label>
10961101
<Property.Value>
10971102
<TaskRunAttemptStatusCombo
10981103
status={
@@ -1107,27 +1112,30 @@ function SpanEntity({ span }: { span: Span }) {
11071112
</Property.Value>
11081113
</Property.Item>
11091114
<Property.Item>
1110-
<Property.Label>Waitpoint idempotency key</Property.Label>
1111-
<Property.Value>
1112-
{span.waitpoint.userProvidedIdempotencyKey ? span.waitpoint.idempotencyKey : "–"}
1115+
<Property.Label>ID</Property.Label>
1116+
<Property.Value className="whitespace-pre-wrap">
1117+
{span.waitpoint?.friendlyId}
11131118
</Property.Value>
11141119
</Property.Item>
11151120
<Property.Item>
1116-
<Property.Label>Waitpoint idempotency key expires at</Property.Label>
1121+
<Property.Label>Idempotency key</Property.Label>
11171122
<Property.Value>
1118-
{span.waitpoint.idempotencyKeyExpiresAt ? (
1119-
<DateTime date={span.waitpoint.idempotencyKeyExpiresAt} />
1120-
) : (
1121-
"–"
1122-
)}
1123+
<div>
1124+
{span.waitpoint.userProvidedIdempotencyKey ? span.waitpoint.idempotencyKey : "–"}
1125+
{span.waitpoint.idempotencyKeyExpiresAt ? (
1126+
<>
1127+
Expires at: <DateTime date={span.waitpoint.idempotencyKeyExpiresAt} />
1128+
</>
1129+
) : null}
1130+
</div>
11231131
</Property.Value>
11241132
</Property.Item>
11251133
</Property.Table>
11261134
{span.waitpoint.status === "PENDING" ? (
11271135
<CompleteWaitpointForm waitpoint={span.waitpoint} />
11281136
) : span.waitpoint.output ? (
11291137
<PacketDisplay
1130-
title="Waitpoint output"
1138+
title="Output"
11311139
data={span.waitpoint.output}
11321140
dataType={span.waitpoint.outputType}
11331141
/>

0 commit comments

Comments
 (0)