Skip to content

Commit 39dee29

Browse files
committed
View runs button improvements
1 parent ce40729 commit 39dee29

File tree

1 file changed

+11
-17
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.batches.$batchParam

1 file changed

+11
-17
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.batches.$batchParam/route.tsx

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ArrowRightIcon, ExclamationTriangleIcon } from "@heroicons/react/20/solid";
1+
import { ExclamationTriangleIcon } from "@heroicons/react/20/solid";
22
import { type LoaderFunctionArgs } from "@remix-run/server-runtime";
33
import { tryCatch } from "@trigger.dev/core";
44
import { motion } from "framer-motion";
@@ -12,17 +12,14 @@ import { DateTime } from "~/components/primitives/DateTime";
1212
import { Header2, Header3 } from "~/components/primitives/Headers";
1313
import { Paragraph } from "~/components/primitives/Paragraph";
1414
import * as Property from "~/components/primitives/PropertyTable";
15-
import {
16-
BatchStatusCombo,
17-
descriptionForBatchStatus,
18-
} from "~/components/runs/v3/BatchStatus";
15+
import { BatchStatusCombo, descriptionForBatchStatus } from "~/components/runs/v3/BatchStatus";
1916
import { useAutoRevalidate } from "~/hooks/useAutoRevalidate";
2017
import { useEnvironment } from "~/hooks/useEnvironment";
2118
import { useOrganization } from "~/hooks/useOrganizations";
2219
import { useProject } from "~/hooks/useProject";
2320
import { findProjectBySlug } from "~/models/project.server";
2421
import { findEnvironmentBySlug } from "~/models/runtimeEnvironment.server";
25-
import { BatchPresenter, type BatchPresenterData } from "~/presenters/v3/BatchPresenter.server";
22+
import { BatchPresenter } from "~/presenters/v3/BatchPresenter.server";
2623
import { requireUserId } from "~/services/session.server";
2724
import { cn } from "~/utils/cn";
2825
import { formatNumber } from "~/utils/numberFormatter";
@@ -35,8 +32,7 @@ const BatchParamSchema = EnvironmentParamSchema.extend({
3532
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
3633
const userId = await requireUserId(request);
3734

38-
const { organizationSlug, projectParam, envParam, batchParam } =
39-
BatchParamSchema.parse(params);
35+
const { organizationSlug, projectParam, envParam, batchParam } = BatchParamSchema.parse(params);
4036

4137
const project = await findProjectBySlug(organizationSlug, projectParam, userId);
4238
if (!project) {
@@ -85,7 +81,8 @@ export default function Page() {
8581
disabled: batch.hasFinished,
8682
});
8783

88-
const showProgressMeter = batch.isV2 && (batch.status === "PROCESSING" || batch.status === "PARTIAL_FAILED");
84+
const showProgressMeter =
85+
batch.isV2 && (batch.status === "PROCESSING" || batch.status === "PARTIAL_FAILED");
8986

9087
return (
9188
<div className="grid h-full max-h-full grid-rows-[2.5rem_2.5rem_1fr_3.25rem] overflow-hidden bg-background-bright">
@@ -141,9 +138,7 @@ export default function Page() {
141138
</Property.Item>
142139
<Property.Item>
143140
<Property.Label>Version</Property.Label>
144-
<Property.Value>
145-
{batch.isV2 ? "v2 (Run Engine)" : "v1 (Legacy)"}
146-
</Property.Value>
141+
<Property.Value>{batch.isV2 ? "v2 (Run Engine)" : "v1 (Legacy)"}</Property.Value>
147142
</Property.Item>
148143
<Property.Item>
149144
<Property.Label>Total runs</Property.Label>
@@ -243,11 +238,11 @@ export default function Page() {
243238
{/* Footer */}
244239
<div className="flex items-center justify-end gap-2 border-t border-grid-dimmed px-2">
245240
<LinkButton
246-
variant="tertiary/medium"
241+
variant="secondary/medium"
247242
to={v3BatchRunsPath(organization, project, environment, batch)}
248-
LeadingIcon={RunsIcon}
249-
leadingIconClassName="text-indigo-500"
250-
TrailingIcon={ArrowRightIcon}
243+
trailingIconClassName="text-runs"
244+
TrailingIcon={RunsIcon}
245+
className="text-text-bright"
251246
>
252247
View runs
253248
</LinkButton>
@@ -304,4 +299,3 @@ function BatchProgressMeter({ successCount, failureCount, totalCount }: BatchPro
304299
</div>
305300
);
306301
}
307-

0 commit comments

Comments
 (0)