Skip to content

Commit 6890cce

Browse files
committed
Link directly to the waitpoint
1 parent 64d8bbd commit 6890cce

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { type WaitpointDetail } from "~/presenters/v3/WaitpointPresenter.server"
55
import { ForceTimeout } from "~/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route";
66
import { PacketDisplay } from "./PacketDisplay";
77
import { WaitpointStatusCombo } from "./WaitpointStatus";
8-
import { v3WaitpointTokensPath } from "~/utils/pathBuilder";
8+
import { v3WaitpointTokenPath, v3WaitpointTokensPath } from "~/utils/pathBuilder";
99
import { Link } from "@remix-run/react";
1010
import { TextLink } from "~/components/primitives/TextLink";
1111
import { useOrganization } from "~/hooks/useOrganizations";
@@ -43,7 +43,7 @@ export function WaitpointDetailTable({
4343
<Property.Value className="whitespace-pre-wrap">
4444
{linkToList ? (
4545
<TextLink
46-
to={v3WaitpointTokensPath(organization, project, environment, {
46+
to={v3WaitpointTokenPath(organization, project, environment, waitpoint, {
4747
id: waitpoint.friendlyId,
4848
})}
4949
>

apps/webapp/app/utils/pathBuilder.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,12 @@ export function v3WaitpointTokenPath(
330330
organization: OrgForPath,
331331
project: ProjectForPath,
332332
environment: EnvironmentForPath,
333-
token: { friendlyId: string }
333+
token: { friendlyId: string },
334+
filters?: WaitpointSearchParams
334335
) {
335-
return `${v3WaitpointTokensPath(organization, project, environment)}/${token.friendlyId}`;
336+
const searchParams = objectToSearchParams(filters);
337+
const query = searchParams ? `?${searchParams.toString()}` : "";
338+
return `${v3WaitpointTokensPath(organization, project, environment)}/${token.friendlyId}${query}`;
336339
}
337340

338341
export function v3BatchesPath(

0 commit comments

Comments
 (0)