diff --git a/apps/webapp/.server-changes/task-filter-icons.md b/apps/webapp/.server-changes/task-filter-icons.md new file mode 100644 index 00000000000..1bfb63e1cf0 --- /dev/null +++ b/apps/webapp/.server-changes/task-filter-icons.md @@ -0,0 +1,6 @@ +--- +area: webapp +type: fix +--- + +Use the "all tasks" icon (`TasksIcon`) for the Tasks/Task type filter buttons on the Runs, Logs, Errors, and metrics dashboard pages (and the task-derived queue indicators), and show the clock icon for Scheduled runs in the run inspector header instead of the standard task icon. diff --git a/apps/webapp/app/components/logs/LogsTaskFilter.tsx b/apps/webapp/app/components/logs/LogsTaskFilter.tsx index 6c15464cc49..584ad943f6f 100644 --- a/apps/webapp/app/components/logs/LogsTaskFilter.tsx +++ b/apps/webapp/app/components/logs/LogsTaskFilter.tsx @@ -14,7 +14,7 @@ import { } from "~/components/primitives/Select"; import { useSearchParams } from "~/hooks/useSearchParam"; import { TaskTriggerSourceIcon } from "~/components/runs/v3/TaskTriggerSource"; -import { TaskIcon } from "~/assets/icons/TaskIcon"; +import { TasksIcon } from "~/assets/icons/TasksIcon"; import { appliedSummary, FilterMenuProvider } from "~/components/runs/v3/SharedFilters"; import { AppliedFilter } from "~/components/primitives/AppliedFilter"; @@ -41,7 +41,7 @@ export function LogsTaskFilter({ possibleTasks }: LogsTaskFilterProps) { } + icon={} variant="secondary/small" shortcut={shortcut} tooltipTitle="Filter by task" @@ -67,7 +67,7 @@ export function LogsTaskFilter({ possibleTasks }: LogsTaskFilterProps) { }> } + icon={} value={appliedSummary( selectedTasks.map((v) => { const task = possibleTasks.find((task) => task.slug === v); diff --git a/apps/webapp/app/components/metrics/QueuesFilter.tsx b/apps/webapp/app/components/metrics/QueuesFilter.tsx index 3da71e0c7d0..f3aac782bf0 100644 --- a/apps/webapp/app/components/metrics/QueuesFilter.tsx +++ b/apps/webapp/app/components/metrics/QueuesFilter.tsx @@ -3,7 +3,7 @@ import { RectangleStackIcon } from "@heroicons/react/20/solid"; import { useFetcher } from "@remix-run/react"; import { matchSorter } from "match-sorter"; import { type ReactNode, useMemo } from "react"; -import { TaskIcon } from "~/assets/icons/TaskIcon"; +import { TasksIcon } from "~/assets/icons/TasksIcon"; import { AppliedFilter } from "~/components/primitives/AppliedFilter"; import { ComboBox, @@ -194,7 +194,7 @@ function QueuesDropdown({ className="text-text-bright" icon={ queue.type === "task" ? ( - + ) : ( ) diff --git a/apps/webapp/app/components/runs/v3/QueueName.tsx b/apps/webapp/app/components/runs/v3/QueueName.tsx index c5d8feeb46b..e65b86a220e 100644 --- a/apps/webapp/app/components/runs/v3/QueueName.tsx +++ b/apps/webapp/app/components/runs/v3/QueueName.tsx @@ -1,4 +1,4 @@ -import { TaskIconSmall } from "~/assets/icons/TaskIcon"; +import { TasksIcon } from "~/assets/icons/TasksIcon"; import { SimpleTooltip } from "~/components/primitives/Tooltip"; import { cn } from "~/utils/cn"; import { RectangleStackIcon } from "@heroicons/react/20/solid"; @@ -19,9 +19,7 @@ export function QueueName({ {type === "task" ? ( + } content={`This queue was automatically created from your "${name}" task`} /> diff --git a/apps/webapp/app/components/runs/v3/RunFilters.tsx b/apps/webapp/app/components/runs/v3/RunFilters.tsx index f2f3482ff60..6f504af5347 100644 --- a/apps/webapp/app/components/runs/v3/RunFilters.tsx +++ b/apps/webapp/app/components/runs/v3/RunFilters.tsx @@ -22,7 +22,7 @@ import { ClockIcon } from "~/assets/icons/ClockIcon"; import { ListCheckedIcon } from "~/assets/icons/ListCheckedIcon"; import { MachineDefaultIcon } from "~/assets/icons/MachineIcon"; import { StatusIcon } from "~/assets/icons/StatusIcon"; -import { TaskIcon } from "~/assets/icons/TaskIcon"; +import { TasksIcon } from "~/assets/icons/TasksIcon"; import { formatMachinePresetName, MachineLabelCombo, @@ -259,7 +259,7 @@ export function filterIcon(filterKey: string): ReactNode | undefined { case "statuses": return ; case "tasks": - return ; + return ; case "tags": return ; case "bulkId": @@ -429,7 +429,7 @@ const filterTypes = [ { name: "schedule", title: "Schedule ID", icon: }, { name: "bulk", title: "Bulk action", icon: }, { name: "error", title: "Error ID", icon: }, - { name: "source", title: "Task type", icon: }, + { name: "source", title: "Task type", icon: }, ] as const; type FilterType = (typeof filterTypes)[number]["name"]; @@ -1239,7 +1239,7 @@ function QueuesDropdown({ value={queue.value} icon={ queue.type === "task" ? ( - + ) : ( ) diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index 09c4944a4dd..069e0c891a1 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -10,7 +10,7 @@ import { BookOpenIcon, CheckIcon } from "@heroicons/react/24/solid"; import { useLocation } from "@remix-run/react"; import { formatDuration, formatDurationMilliseconds } from "@trigger.dev/core/v3"; import { useCallback, useRef } from "react"; -import { TaskIconSmall } from "~/assets/icons/TaskIcon"; +import { TasksIcon } from "~/assets/icons/TasksIcon"; import { MachineLabelCombo } from "~/components/MachineLabelCombo"; import { MachineTooltipInfo } from "~/components/MachineTooltipInfo"; import { Badge } from "~/components/primitives/Badge"; @@ -470,7 +470,7 @@ export function TaskRunsTable({ buttonClassName="w-fit" button={ - + {run.queue.name} } diff --git a/apps/webapp/app/presenters/v3/SpanPresenter.server.ts b/apps/webapp/app/presenters/v3/SpanPresenter.server.ts index 11b1662be12..5e8a6db9ed3 100644 --- a/apps/webapp/app/presenters/v3/SpanPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/SpanPresenter.server.ts @@ -297,6 +297,7 @@ export class SpanPresenter extends BasePresenter { const taskKind = RunAnnotations.safeParse(run.annotations).data?.taskKind; const isAgentRun = taskKind === "AGENT"; + const isScheduled = taskKind === "SCHEDULED"; let region: { name: string; location: string | null } | null = null; @@ -404,6 +405,7 @@ export class SpanPresenter extends BasePresenter { isRunning: RUNNING_STATUSES.includes(run.status), isError: isFailedRunStatus(run.status), isAgentRun, + isScheduled, payload, payloadType: run.payloadType, output, diff --git a/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx b/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx index 450b9c69662..6f5b615d6bd 100644 --- a/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx +++ b/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx @@ -392,12 +392,23 @@ function RunBody({
{run.taskIdentifier} diff --git a/apps/webapp/app/v3/mollifier/syntheticSpanRun.server.ts b/apps/webapp/app/v3/mollifier/syntheticSpanRun.server.ts index d5d682426d0..f36d5a5d28e 100644 --- a/apps/webapp/app/v3/mollifier/syntheticSpanRun.server.ts +++ b/apps/webapp/app/v3/mollifier/syntheticSpanRun.server.ts @@ -72,6 +72,7 @@ export async function buildSyntheticSpanRun(args: { const taskKind = RunAnnotations.safeParse(run.annotations).data?.taskKind; const isAgentRun = taskKind === "AGENT"; + const isScheduled = taskKind === "SCHEDULED"; const queueName = run.queue ?? "task/"; const isCancelled = run.status === "CANCELED"; @@ -149,6 +150,7 @@ export async function buildSyntheticSpanRun(args: { isRunning: false, isError: isFailed, isAgentRun, + isScheduled, payload, payloadType: run.payloadType ?? "application/json", output: undefined,