Skip to content

Commit a15a2f9

Browse files
committed
fix(webapp,core): resolve lint and type-export checks on the webhook branch
Clean up unused and duplicate imports across the webhook files that oxlint flagged (they were never linted before). Add the missing `webhooks` entry to core's typesVersions so the `@trigger.dev/core/webhooks` subpath passes the package type-export check. Move the webhook nav color into the Tailwind v4 CSS theme (--color-webhooks) and drop the stale tailwind.config.js the v4 migration removed.
1 parent 289bd40 commit a15a2f9

17 files changed

Lines changed: 46 additions & 452 deletions

File tree

apps/webapp/app/components/webhookDeliveries/v1/WebhookDeliveryFilters.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ import {
1717
shortcutFromIndex,
1818
} from "~/components/primitives/Select";
1919
import { ShortcutKey } from "~/components/primitives/ShortcutKey";
20-
import {
21-
Tooltip,
22-
TooltipContent,
23-
TooltipProvider,
24-
TooltipTrigger,
25-
} from "~/components/primitives/Tooltip";
2620
import { useOptimisticLocation } from "~/hooks/useOptimisticLocation";
2721
import { useSearchParams } from "~/hooks/useSearchParam";
2822
import { useShortcutKeys } from "~/hooks/useShortcutKeys";

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ import { TaskTriggerSourceIcon } from "~/components/runs/v3/TaskTriggerSource";
5252
import { TimezoneList } from "~/components/scheduled/timezones";
5353
import { $replica } from "~/db.server";
5454
import { useEnvironment } from "~/hooks/useEnvironment";
55-
import { useOrganization } from "~/hooks/useOrganizations";
56-
import { useProject } from "~/hooks/useProject";
5755
import { useSearchParams } from "~/hooks/useSearchParam";
5856
import {
5957
redirectBackWithErrorMessage,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ import {
5858
docsPath,
5959
EnvironmentParamSchema,
6060
v3EnvironmentPath,
61-
v3RunPath,
62-
v3SessionPath,
6361
v3WebhookDeliveryPath,
6462
} from "~/utils/pathBuilder";
6563
import { parseFiniteInt } from "~/utils/searchParams";

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.webhooks.endpoints.$endpointParam/route.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { type ActionFunctionArgs, type LoaderFunctionArgs } from "@remix-run/ser
44
import { randomBytes } from "node:crypto";
55
import { WebhookRoutingTarget, WebhookVerifierArtifact } from "@trigger.dev/core/v3";
66
import type { WebhookValueSource } from "@trigger.dev/core/v3";
7-
import { useEffect, useState } from "react";
8-
import { Suspense } from "react";
7+
import { Suspense, useEffect, useState } from "react";
98
import { TypedAwait, typeddefer, useTypedLoaderData } from "remix-typedjson";
109
import { z } from "zod";
1110
import { WebhookIcon } from "~/assets/icons/WebhookIcon";
@@ -48,12 +47,7 @@ import {
4847
import { clickhouseFactory } from "~/services/clickhouse/clickhouseFactoryInstance.server";
4948
import { getSecretStore } from "~/services/secrets/secretStore.server";
5049
import { requireUser } from "~/services/session.server";
51-
import {
52-
docsPath,
53-
EnvironmentParamSchema,
54-
v3WebhookTaskPath,
55-
v3WebhooksPath,
56-
} from "~/utils/pathBuilder";
50+
import { docsPath, EnvironmentParamSchema, v3WebhookTaskPath } from "~/utils/pathBuilder";
5751
import { parseFiniteInt } from "~/utils/searchParams";
5852
import { FEATURE_FLAG } from "~/v3/featureFlags";
5953
import { flag } from "~/v3/featureFlags.server";
@@ -98,7 +92,7 @@ async function requireWebhookAccess(request: Request, params: LoaderFunctionArgs
9892
}
9993

10094
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
101-
const { user, project, environment, endpointParam } = await requireWebhookAccess(request, params);
95+
const { project, environment, endpointParam } = await requireWebhookAccess(request, params);
10296

10397
const clickhouse = await clickhouseFactory.getClickhouseForOrganization(
10498
project.organizationId,

apps/webapp/app/services/realtime/sessions.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { RunStore } from "@internal/run-store";
55
import { $replica, prisma } from "~/db.server";
66
import type { AuthenticatedEnvironment } from "~/services/apiAuth.server";
77
import { chatSnapshotStoragePathForSession } from "~/services/realtime/chatSnapshot.server";
8-
import { runStore, runStore as defaultRunStore } from "~/v3/runStore.server";
8+
import { runStore as defaultRunStore } from "~/v3/runStore.server";
99

1010
/**
1111
* Prefix that {@link SessionId.generate} attaches to every Session friendlyId.

apps/webapp/app/services/webhookDeliveriesRepository/webhookDeliveriesRepository.server.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { type ClickHouse } from "@internal/clickhouse";
22
import { type Tracer } from "@internal/tracing";
33
import { type Logger, type LogLevel } from "@trigger.dev/core/logger";
4-
import { type Prisma, WebhookDeliveryStatus } from "@trigger.dev/database";
5-
import { z } from "zod";
4+
import { type Prisma, type WebhookDeliveryStatus } from "@trigger.dev/database";
65
import { type WebhookReplicaDatabase } from "~/db.server";
76
import { startActiveSpan } from "~/v3/tracer.server";
87
import { ClickHouseWebhookDeliveriesRepository } from "./clickhouseWebhookDeliveriesRepository.server";
@@ -15,10 +14,6 @@ export type WebhookDeliveriesRepositoryOptions = {
1514
tracer?: Tracer;
1615
};
1716

18-
const DeliveryStatus = z.enum(
19-
Object.values(WebhookDeliveryStatus) as [WebhookDeliveryStatus, ...WebhookDeliveryStatus[]]
20-
);
21-
2217
export type FilterWebhookDeliveriesOptions = {
2318
organizationId: string;
2419
projectId: string;

apps/webapp/app/tailwind.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@
202202
--color-aiMetrics: var(--color-green-500);
203203
--color-errors: var(--color-amber-500);
204204
--color-agents: var(--color-purple-500);
205+
--color-webhooks: var(--color-teal-500);
205206
--color-sessions: var(--color-pink-500);
206207
--color-playgrounds: var(--color-fuchsia-500);
207208
--color-models: var(--color-violet-500);

0 commit comments

Comments
 (0)