Skip to content

Commit f812687

Browse files
authored
Improves large output messaging (#2341)
* Adds more information to the large payloads/outputs * Changes the Download logs button to secondary
1 parent df0dc07 commit f812687

File tree

2 files changed

+26
-9
lines changed
  • apps/webapp/app
    • components/runs/v3
    • routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam

2 files changed

+26
-9
lines changed

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

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { CloudArrowDownIcon } from "@heroicons/react/20/solid";
22
import { CodeBlock } from "~/components/code/CodeBlock";
3+
import { InlineCode } from "~/components/code/InlineCode";
34
import { LinkButton } from "~/components/primitives/Buttons";
5+
import { Header3 } from "~/components/primitives/Headers";
46
import { Paragraph } from "~/components/primitives/Paragraph";
7+
import { TextLink } from "~/components/primitives/TextLink";
8+
import { docsPath } from "~/utils/pathBuilder";
59

610
export function PacketDisplay({
711
data,
@@ -15,13 +19,26 @@ export function PacketDisplay({
1519
switch (dataType) {
1620
case "application/store": {
1721
return (
18-
<div className="flex flex-col">
19-
<Paragraph variant="base/bright" className="w-full py-2.5 text-sm">
20-
{title}
22+
<div className="mt-2 flex flex-col">
23+
<Header3>{title}</Header3>
24+
<Paragraph variant="small" className="mb-2">
25+
This {title.toLowerCase()} exceeded the size limit and was automatically offloaded to
26+
object storage. You can retrieve it using{" "}
27+
<InlineCode variant="extra-small">runs.retrieve</InlineCode> or download it directly
28+
below. <TextLink to={docsPath("limits#task-payloads-and-outputs")}>Learn more</TextLink>
29+
.
2130
</Paragraph>
22-
<LinkButton LeadingIcon={CloudArrowDownIcon} to={data} variant="tertiary/medium" download>
23-
Download
24-
</LinkButton>
31+
<div>
32+
<LinkButton
33+
LeadingIcon={CloudArrowDownIcon}
34+
to={data}
35+
variant="secondary/small"
36+
download
37+
className="inline-flex text-text-bright"
38+
>
39+
Download {title.toLowerCase()}
40+
</LinkButton>
41+
</div>
2542
</div>
2643
);
2744
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
import { type LoaderFunctionArgs } from "@remix-run/server-runtime";
88
import {
99
formatDurationMilliseconds,
10-
MachinePresetName,
1110
type TaskRunError,
1211
taskRunErrorEnhancer,
1312
} from "@trigger.dev/core/v3";
@@ -804,14 +803,15 @@ function RunBody({
804803
{run.isCached ? "Jump to original run" : "Focus on run"}
805804
</LinkButton>
806805
)}
806+
<AdminDebugRun friendlyId={run.friendlyId} />
807807
</div>
808-
<AdminDebugRun friendlyId={run.friendlyId} />
809808
<div className="flex items-center gap-4">
810809
{run.logsDeletedAt === null ? (
811810
<LinkButton
812811
to={v3RunDownloadLogsPath({ friendlyId: runParam })}
813812
LeadingIcon={CloudArrowDownIcon}
814-
variant="tertiary/medium"
813+
leadingIconClassName="text-indigo-400"
814+
variant="secondary/medium"
815815
target="_blank"
816816
download
817817
>

0 commit comments

Comments
 (0)