Skip to content

Commit da2c384

Browse files
committed
fix(webapp): update task filter icons and the scheduled run icon
Use the all-tasks icon for the task and task-type filter buttons on the Runs, Logs, Errors, and metrics pages and for task-derived queue indicators, and show a clock icon for scheduled runs in the run inspector header.
1 parent f1bd11a commit da2c384

9 files changed

Lines changed: 36 additions & 17 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
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.

apps/webapp/app/components/logs/LogsTaskFilter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from "~/components/primitives/Select";
1515
import { useSearchParams } from "~/hooks/useSearchParam";
1616
import { TaskTriggerSourceIcon } from "~/components/runs/v3/TaskTriggerSource";
17-
import { TaskIcon } from "~/assets/icons/TaskIcon";
17+
import { TasksIcon } from "~/assets/icons/TasksIcon";
1818
import { appliedSummary, FilterMenuProvider } from "~/components/runs/v3/SharedFilters";
1919
import { AppliedFilter } from "~/components/primitives/AppliedFilter";
2020

@@ -41,7 +41,7 @@ export function LogsTaskFilter({ possibleTasks }: LogsTaskFilterProps) {
4141
<TasksDropdown
4242
trigger={
4343
<SelectTrigger
44-
icon={<TaskIcon className="size-4" />}
44+
icon={<TasksIcon className="size-4" />}
4545
variant="secondary/small"
4646
shortcut={shortcut}
4747
tooltipTitle="Filter by task"
@@ -67,7 +67,7 @@ export function LogsTaskFilter({ possibleTasks }: LogsTaskFilterProps) {
6767
<Ariakit.Select render={<div className="group cursor-pointer focus-custom" />}>
6868
<AppliedFilter
6969
label="Task"
70-
icon={<TaskIcon className="size-4" />}
70+
icon={<TasksIcon className="size-4" />}
7171
value={appliedSummary(
7272
selectedTasks.map((v) => {
7373
const task = possibleTasks.find((task) => task.slug === v);

apps/webapp/app/components/metrics/QueuesFilter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { RectangleStackIcon } from "@heroicons/react/20/solid";
33
import { useFetcher } from "@remix-run/react";
44
import { matchSorter } from "match-sorter";
55
import { type ReactNode, useMemo } from "react";
6-
import { TaskIcon } from "~/assets/icons/TaskIcon";
6+
import { TasksIcon } from "~/assets/icons/TasksIcon";
77
import { AppliedFilter } from "~/components/primitives/AppliedFilter";
88
import {
99
ComboBox,
@@ -194,7 +194,7 @@ function QueuesDropdown({
194194
className="text-text-bright"
195195
icon={
196196
queue.type === "task" ? (
197-
<TaskIcon className="size-4 shrink-0 text-blue-500" />
197+
<TasksIcon className="size-4 shrink-0 text-blue-500" />
198198
) : (
199199
<RectangleStackIcon className="size-4 shrink-0 text-purple-500" />
200200
)

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TaskIconSmall } from "~/assets/icons/TaskIcon";
1+
import { TasksIcon } from "~/assets/icons/TasksIcon";
22
import { SimpleTooltip } from "~/components/primitives/Tooltip";
33
import { cn } from "~/utils/cn";
44
import { RectangleStackIcon } from "@heroicons/react/20/solid";
@@ -19,9 +19,7 @@ export function QueueName({
1919
{type === "task" ? (
2020
<SimpleTooltip
2121
button={
22-
<TaskIconSmall
23-
className={cn("size-[1.125rem] text-blue-500", paused && "opacity-50")}
24-
/>
22+
<TasksIcon className={cn("size-[1.125rem] text-blue-500", paused && "opacity-50")} />
2523
}
2624
content={`This queue was automatically created from your "${name}" task`}
2725
/>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { ClockIcon } from "~/assets/icons/ClockIcon";
2222
import { ListCheckedIcon } from "~/assets/icons/ListCheckedIcon";
2323
import { MachineDefaultIcon } from "~/assets/icons/MachineIcon";
2424
import { StatusIcon } from "~/assets/icons/StatusIcon";
25-
import { TaskIcon } from "~/assets/icons/TaskIcon";
25+
import { TasksIcon } from "~/assets/icons/TasksIcon";
2626
import {
2727
formatMachinePresetName,
2828
MachineLabelCombo,
@@ -259,7 +259,7 @@ export function filterIcon(filterKey: string): ReactNode | undefined {
259259
case "statuses":
260260
return <StatusIcon className="size-4 border-text-bright" />;
261261
case "tasks":
262-
return <TaskIcon className="size-4" />;
262+
return <TasksIcon className="size-4" />;
263263
case "tags":
264264
return <TagIcon className="size-4" />;
265265
case "bulkId":
@@ -429,7 +429,7 @@ const filterTypes = [
429429
{ name: "schedule", title: "Schedule ID", icon: <ClockIcon className="size-4" /> },
430430
{ name: "bulk", title: "Bulk action", icon: <ListCheckedIcon className="size-4" /> },
431431
{ name: "error", title: "Error ID", icon: <BugIcon className="size-4" /> },
432-
{ name: "source", title: "Task type", icon: <TaskIcon className="size-4" /> },
432+
{ name: "source", title: "Task type", icon: <TasksIcon className="size-4" /> },
433433
] as const;
434434

435435
type FilterType = (typeof filterTypes)[number]["name"];
@@ -1239,7 +1239,7 @@ function QueuesDropdown({
12391239
value={queue.value}
12401240
icon={
12411241
queue.type === "task" ? (
1242-
<TaskIcon className="size-4 shrink-0 text-blue-500" />
1242+
<TasksIcon className="size-4 shrink-0 text-blue-500" />
12431243
) : (
12441244
<RectangleStackIcon className="size-4 shrink-0 text-purple-500" />
12451245
)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { BookOpenIcon, CheckIcon } from "@heroicons/react/24/solid";
1010
import { useLocation } from "@remix-run/react";
1111
import { formatDuration, formatDurationMilliseconds } from "@trigger.dev/core/v3";
1212
import { useCallback, useRef } from "react";
13-
import { TaskIconSmall } from "~/assets/icons/TaskIcon";
13+
import { TasksIcon } from "~/assets/icons/TasksIcon";
1414
import { MachineLabelCombo } from "~/components/MachineLabelCombo";
1515
import { MachineTooltipInfo } from "~/components/MachineTooltipInfo";
1616
import { Badge } from "~/components/primitives/Badge";
@@ -470,7 +470,7 @@ export function TaskRunsTable({
470470
buttonClassName="w-fit"
471471
button={
472472
<span className="flex items-center gap-1">
473-
<TaskIconSmall className="size-[1.125rem] text-blue-500" />
473+
<TasksIcon className="size-[1.125rem] text-blue-500" />
474474
<span>{run.queue.name}</span>
475475
</span>
476476
}

apps/webapp/app/presenters/v3/SpanPresenter.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ export class SpanPresenter extends BasePresenter {
297297

298298
const taskKind = RunAnnotations.safeParse(run.annotations).data?.taskKind;
299299
const isAgentRun = taskKind === "AGENT";
300+
const isScheduled = taskKind === "SCHEDULED";
300301

301302
let region: { name: string; location: string | null } | null = null;
302303

@@ -404,6 +405,7 @@ export class SpanPresenter extends BasePresenter {
404405
isRunning: RUNNING_STATUSES.includes(run.status),
405406
isError: isFailedRunStatus(run.status),
406407
isAgentRun,
408+
isScheduled,
407409
payload,
408410
payloadType: run.payloadType,
409411
output,

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,23 @@ function RunBody({
392392
<div className="flex items-center justify-between gap-2 overflow-x-hidden px-3 pr-2">
393393
<div className="flex items-center gap-1 overflow-x-hidden">
394394
<RunIcon
395-
name={run.isAgentRun ? "agent" : run.isCached ? "task-cached" : "task"}
395+
name={
396+
run.isAgentRun
397+
? "agent"
398+
: run.isScheduled
399+
? "scheduled"
400+
: run.isCached
401+
? "task-cached"
402+
: "task"
403+
}
396404
spanName={run.taskIdentifier}
397405
className="size-5 min-h-5 min-w-5"
398406
/>
399407
<Header2
400-
className={cn("overflow-x-hidden", run.isAgentRun ? "text-agents" : "text-blue-500")}
408+
className={cn(
409+
"overflow-x-hidden",
410+
run.isAgentRun ? "text-agents" : run.isScheduled ? "text-schedules" : "text-blue-500"
411+
)}
401412
>
402413
<span className="truncate">
403414
{run.taskIdentifier}

apps/webapp/app/v3/mollifier/syntheticSpanRun.server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export async function buildSyntheticSpanRun(args: {
7272

7373
const taskKind = RunAnnotations.safeParse(run.annotations).data?.taskKind;
7474
const isAgentRun = taskKind === "AGENT";
75+
const isScheduled = taskKind === "SCHEDULED";
7576

7677
const queueName = run.queue ?? "task/";
7778
const isCancelled = run.status === "CANCELED";
@@ -149,6 +150,7 @@ export async function buildSyntheticSpanRun(args: {
149150
isRunning: false,
150151
isError: isFailed,
151152
isAgentRun,
153+
isScheduled,
152154
payload,
153155
payloadType: run.payloadType ?? "application/json",
154156
output: undefined,

0 commit comments

Comments
 (0)