Skip to content
TypeScript

fix(web): respect reduced motion in thread loading controls (#22100)

Alex Southwell3d5baafecf5c
diff --git a/apps/web/src/components/chat/ThreadLineageWorkflowRow.tsx b/apps/web/src/components/chat/ThreadLineageWorkflowRow.tsx
index 2e00e47ee7d..f1df96dd921 100644
--- a/apps/web/src/components/chat/ThreadLineageWorkflowRow.tsx
+++ b/apps/web/src/components/chat/ThreadLineageWorkflowRow.tsx
@@ -3,7 +3,7 @@ import type {
RuntimeSubagent,
} from "@t3tools/client-runtime/state/subagentRuntime";
import type { ProviderDriverKind, ProviderInstanceId, ServerProvider } from "@t3tools/contracts";
-import { ChevronDownIcon, LoaderCircleIcon, SquareIcon } from "lucide-react";
+import { ChevronDownIcon, SquareIcon } from "lucide-react";
import { useState, type ReactNode } from "react";
import { AgentElapsed } from "./AgentElapsed";
@@ -14,6 +14,7 @@ import { cn } from "../../lib/utils";
import { ThreadDetailsControl } from "./ThreadDetailsControl";
import { CollapsibleSectionHeader, SectionHeaderStatus } from "../ui/collapsible-section-header";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
+import { Spinner } from "../ui/spinner";
import {
THREAD_DETAILS_PANEL_SPLIT_GROUP_CLASS,
THREAD_DETAILS_PANEL_SPLIT_SEPARATOR_CLASS,
@@ -158,7 +159,7 @@ export function ThreadLineageWorkflowRow({
}
>
{stopping ? (
- <LoaderCircleIcon aria-hidden className="size-3 animate-spin" />
+ <Spinner aria-hidden size="xs" />
) : (
<SquareIcon aria-hidden className="size-3 fill-current" />
)}
diff --git a/apps/web/src/components/chat/ThreadRelationshipsControl.tsx b/apps/web/src/components/chat/ThreadRelationshipsControl.tsx
index e107bbc4039..69403392b5c 100644
--- a/apps/web/src/components/chat/ThreadRelationshipsControl.tsx
+++ b/apps/web/src/components/chat/ThreadRelationshipsControl.tsx
@@ -49,7 +49,6 @@ import {
ChevronDownIcon,
CornerLeftUpIcon,
GitForkIcon,
- LoaderCircleIcon,
MoreHorizontalIcon,
PlusIcon,
SquareIcon,
@@ -76,6 +75,7 @@ import { ThreadLineageWorkflowRow } from "./ThreadLineageWorkflowRow";
import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
import { toastManager } from "../ui/toast";
+import { Spinner } from "../ui/spinner";
import { cn } from "~/lib/utils";
import {
THREAD_DETAILS_PANEL_CHEVRON_CLASS,
@@ -802,7 +802,7 @@ export function ThreadRelationshipsPanel(props: {
onClick={() => void merge()}
>
{busyAction === "merge" ? (
- <LoaderCircleIcon className="size-3 animate-spin" />
+ <Spinner size="xs" />
) : (
<PullRequestGlyph.merged className="size-3" />
)}
@@ -841,7 +841,7 @@ export function ThreadRelationshipsPanel(props: {
}
>
{stoppingId === threadId ? (
- <LoaderCircleIcon aria-hidden className="size-3 animate-spin" />
+ <Spinner aria-hidden size="xs" />
) : (
<SquareIcon aria-hidden className="size-3 fill-current" />
)}