Skip to content

Commit e6ee0c1

Browse files
authored
Merge branch 'main' into docs/realtime-docs-updates
2 parents 4921a98 + 7bb8845 commit e6ee0c1

File tree

18 files changed

+1173
-853
lines changed

18 files changed

+1173
-853
lines changed

.changeset/giant-rivers-tease.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
improve contrast for chalkWorker in light mode

.github/workflows/unit-tests-webapp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
16-
shardTotal: [10]
15+
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8]
16+
shardTotal: [8]
1717
env:
1818
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
1919
SHARD_INDEX: ${{ matrix.shardIndex }}

apps/webapp/app/components/BlankStatePanels.tsx

Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import {
55
ChatBubbleLeftRightIcon,
66
ClockIcon,
77
PlusIcon,
8+
QuestionMarkCircleIcon,
89
RectangleGroupIcon,
910
RectangleStackIcon,
1011
ServerStackIcon,
1112
Squares2X2Icon,
1213
} from "@heroicons/react/20/solid";
1314
import { useLocation } from "react-use";
1415
import { BranchEnvironmentIconSmall } from "~/assets/icons/EnvironmentIcons";
15-
import { TaskIcon } from "~/assets/icons/TaskIcon";
1616
import { WaitpointTokenIcon } from "~/assets/icons/WaitpointTokenIcon";
1717
import openBulkActionsPanel from "~/assets/images/open-bulk-actions-panel.png";
1818
import selectRunsIndividually from "~/assets/images/select-runs-individually.png";
@@ -32,8 +32,9 @@ import {
3232
v3NewProjectAlertPath,
3333
v3NewSchedulePath,
3434
} from "~/utils/pathBuilder";
35+
import { AskAI } from "./AskAI";
3536
import { InlineCode } from "./code/InlineCode";
36-
import { environmentFullTitle } from "./environments/EnvironmentLabel";
37+
import { environmentFullTitle, EnvironmentIcon } from "./environments/EnvironmentLabel";
3738
import { Feedback } from "./Feedback";
3839
import { EnvironmentSelector } from "./navigation/EnvironmentSelector";
3940
import { Button, LinkButton } from "./primitives/Buttons";
@@ -42,7 +43,13 @@ import { InfoPanel } from "./primitives/InfoPanel";
4243
import { Paragraph } from "./primitives/Paragraph";
4344
import { StepNumber } from "./primitives/StepNumber";
4445
import { TextLink } from "./primitives/TextLink";
45-
import { InitCommandV3, PackageManagerProvider, TriggerDevStepV3 } from "./SetupCommands";
46+
import { SimpleTooltip } from "./primitives/Tooltip";
47+
import {
48+
InitCommandV3,
49+
PackageManagerProvider,
50+
TriggerDeployStep,
51+
TriggerDevStepV3,
52+
} from "./SetupCommands";
4653
import { StepContentContainer } from "./StepContentContainer";
4754
import { V4Badge } from "./V4Badge";
4855

@@ -87,26 +94,60 @@ export function HasNoTasksDev() {
8794

8895
export function HasNoTasksDeployed({ environment }: { environment: MinimumEnvironment }) {
8996
return (
90-
<InfoPanel
91-
title={`You don't have any deployed tasks in ${environmentFullTitle(environment)}`}
92-
icon={TaskIcon}
93-
iconClassName="text-tasks"
94-
panelClassName="max-w-full"
95-
accessory={
96-
<LinkButton
97-
to={docsPath("deployment/overview")}
98-
variant="docs/small"
99-
LeadingIcon={BookOpenIcon}
100-
>
101-
How to deploy tasks
102-
</LinkButton>
103-
}
104-
>
105-
<Paragraph spacing variant="small">
106-
Run the <TextLink to={docsPath("deployment/overview")}>CLI deploy command</TextLink> to
107-
deploy your tasks to the {environmentFullTitle(environment)} environment.
108-
</Paragraph>
109-
</InfoPanel>
97+
<PackageManagerProvider>
98+
<div>
99+
<div className="mb-6 flex items-center justify-between border-b">
100+
<div className="mb-2 flex items-center gap-2">
101+
<EnvironmentIcon environment={environment} className="-ml-1 size-8" />
102+
<Header1>Deploy your tasks to {environmentFullTitle(environment)}</Header1>
103+
</div>
104+
<div className="flex items-center">
105+
<SimpleTooltip
106+
button={
107+
<LinkButton
108+
variant="small-menu-item"
109+
LeadingIcon={BookOpenIcon}
110+
leadingIconClassName="text-blue-500"
111+
to={docsPath("deployment/overview")}
112+
/>
113+
}
114+
content="Deploy docs"
115+
/>
116+
<SimpleTooltip
117+
button={
118+
<LinkButton
119+
variant="small-menu-item"
120+
LeadingIcon={QuestionMarkCircleIcon}
121+
leadingIconClassName="text-blue-500"
122+
to={docsPath("troubleshooting#deployment")}
123+
/>
124+
}
125+
content="Troubleshooting docs"
126+
/>
127+
<AskAI />
128+
</div>
129+
</div>
130+
<StepNumber stepNumber="1a" title="Run the CLI 'deploy' command" />
131+
<StepContentContainer>
132+
<Paragraph spacing>
133+
This will deploy your tasks to the {environmentFullTitle(environment)} environment. Read
134+
the <TextLink to={docsPath("deployment/overview")}>full guide</TextLink>.
135+
</Paragraph>
136+
<TriggerDeployStep environment={environment} />
137+
</StepContentContainer>
138+
<StepNumber stepNumber="1b" title="Or deploy using GitHub Actions" />
139+
<StepContentContainer>
140+
<Paragraph spacing>
141+
Read the <TextLink to={docsPath("github-actions")}>GitHub Actions guide</TextLink> to
142+
get started.
143+
</Paragraph>
144+
</StepContentContainer>
145+
<StepNumber stepNumber="2" title="Waiting for tasks to deploy" displaySpinner />
146+
<StepContentContainer>
147+
<Paragraph>This page will automatically refresh when your tasks are deployed.</Paragraph>
148+
</StepContentContainer>
149+
</div>
150+
</PackageManagerProvider>
110151
);
111152
}
112153

@@ -477,6 +518,10 @@ export function BranchesNoBranchableEnvironment() {
477518
Preview branches in Trigger.dev create isolated environments for testing new features before
478519
production.
479520
</Paragraph>
521+
<Paragraph variant="small">
522+
You must be on <V4Badge inline /> to access preview branches. Read our{" "}
523+
<TextLink to={docsPath("upgrade-to-v4")}>upgrade to v4 guide</TextLink> to learn more.
524+
</Paragraph>
480525
</InfoPanel>
481526
);
482527
}

apps/webapp/app/components/SetupCommands.tsx

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,64 @@ export function TriggerLoginStepV3({ title }: TabsProps) {
208208
</ClientTabs>
209209
);
210210
}
211+
212+
export function TriggerDeployStep({ title, environment }: TabsProps & { environment: { type: string } }) {
213+
const triggerCliTag = useTriggerCliTag();
214+
const { activePackageManager, setActivePackageManager } = usePackageManager();
215+
216+
// Generate the environment flag based on environment type
217+
const getEnvironmentFlag = () => {
218+
switch (environment.type) {
219+
case "STAGING":
220+
return " --env staging";
221+
case "PREVIEW":
222+
return " --env preview";
223+
case "PRODUCTION":
224+
default:
225+
return "";
226+
}
227+
};
228+
229+
const environmentFlag = getEnvironmentFlag();
230+
231+
return (
232+
<ClientTabs
233+
defaultValue="npm"
234+
value={activePackageManager}
235+
onValueChange={setActivePackageManager}
236+
>
237+
<div className="flex items-center gap-4">
238+
{title && <Header3>{title}</Header3>}
239+
<ClientTabsList className={title ? "ml-auto" : ""}>
240+
<ClientTabsTrigger value={"npm"}>npm</ClientTabsTrigger>
241+
<ClientTabsTrigger value={"pnpm"}>pnpm</ClientTabsTrigger>
242+
<ClientTabsTrigger value={"yarn"}>yarn</ClientTabsTrigger>
243+
</ClientTabsList>
244+
</div>
245+
<ClientTabsContent value={"npm"}>
246+
<ClipboardField
247+
variant="secondary/medium"
248+
iconButton
249+
className="mb-4"
250+
value={`npx trigger.dev@${triggerCliTag} deploy${environmentFlag}`}
251+
/>
252+
</ClientTabsContent>
253+
<ClientTabsContent value={"pnpm"}>
254+
<ClipboardField
255+
variant="secondary/medium"
256+
iconButton
257+
className="mb-4"
258+
value={`pnpm dlx trigger.dev@${triggerCliTag} deploy${environmentFlag}`}
259+
/>
260+
</ClientTabsContent>
261+
<ClientTabsContent value={"yarn"}>
262+
<ClipboardField
263+
variant="secondary/medium"
264+
iconButton
265+
className="mb-4"
266+
value={`yarn dlx trigger.dev@${triggerCliTag} deploy${environmentFlag}`}
267+
/>
268+
</ClientTabsContent>
269+
</ClientTabs>
270+
);
271+
}

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,18 @@ export function SideMenu({
143143
>
144144
<div
145145
className={cn(
146-
"flex items-center justify-between overflow-hidden border-b px-1 py-1 transition duration-300",
146+
"flex items-center overflow-hidden border-b px-1 py-1 transition duration-300",
147147
showHeaderDivider ? "border-grid-bright" : "border-transparent"
148148
)}
149149
>
150-
<ProjectSelector
151-
organizations={organizations}
152-
organization={organization}
153-
project={project}
154-
user={user}
155-
/>
150+
<div className="min-w-0 flex-1">
151+
<ProjectSelector
152+
organizations={organizations}
153+
organization={organization}
154+
project={project}
155+
user={user}
156+
/>
157+
</div>
156158
{isAdmin && !user.isImpersonating ? (
157159
<TooltipProvider disableHoverableContent={true}>
158160
<Tooltip>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type DeploymentErrorProps = {
99

1010
export function DeploymentError({ errorData }: DeploymentErrorProps) {
1111
return (
12-
<div className="flex flex-col gap-2 rounded-sm border border-rose-500/50 p-3">
12+
<div className="mx-3 mb-3 flex flex-col gap-2 rounded-sm border border-rose-500/50 p-3">
1313
<DeploymentErrorHeader title={errorData.name ?? "Error"} titleClassName="text-rose-500" />
1414
{errorData.message && <Callout variant="error">{errorData.message}</Callout>}
1515
{errorData.stack && (
@@ -18,6 +18,7 @@ export function DeploymentError({ errorData }: DeploymentErrorProps) {
1818
showLineNumbers={false}
1919
code={errorData.stack}
2020
maxLines={20}
21+
showTextWrapping
2122
/>
2223
)}
2324
{errorData.stderr && (
@@ -28,6 +29,7 @@ export function DeploymentError({ errorData }: DeploymentErrorProps) {
2829
showLineNumbers={false}
2930
code={errorData.stderr}
3031
maxLines={20}
32+
showTextWrapping
3133
/>
3234
</>
3335
)}

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

Lines changed: 24 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
}
@@ -33,6 +50,7 @@ export function PacketDisplay({
3350
code={data}
3451
maxLines={20}
3552
showLineNumbers={false}
53+
showTextWrapping
3654
/>
3755
);
3856
}

0 commit comments

Comments
 (0)