TypeScript
fix(web): stop status animations when Reduce Motion is enabled (#18814)
Alex Southwellbe6dd8b71997
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex 7678f98d7b2..56117435db0 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -5212,7 +5212,7 @@ export default function ChatView(props: ChatViewProps) {<spanclassName={cn("size-1.5 rounded-full bg-foreground",- presentation.waiting && "animate-status-pulse",+ presentation.waiting && "motion-safe:animate-status-pulse",)}aria-hidden="true"/>diff --git a/apps/web/src/components/ConnectionStatusDot.tsx b/apps/web/src/components/ConnectionStatusDot.tsxindex e319b7e1e73..ea4f2365a6b 100644--- a/apps/web/src/components/ConnectionStatusDot.tsx+++ b/apps/web/src/components/ConnectionStatusDot.tsx@@ -37,7 +37,7 @@ export function ConnectionStatusDot({{pingClassName ? (<spanclassName={cn(- "absolute inline-flex h-full w-full animate-status-ping rounded-full",+ "absolute inline-flex h-full w-full motion-safe:animate-status-ping rounded-full",pingClassName,)}/>diff --git a/apps/web/src/components/LegacySidebar.tsx b/apps/web/src/components/LegacySidebar.tsxindex b9c03f52bc3..30cbea2378a 100644--- a/apps/web/src/components/LegacySidebar.tsx+++ b/apps/web/src/components/LegacySidebar.tsx@@ -2281,7 +2281,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec<span className="absolute inset-0 flex items-center justify-center transition-opacity duration-150 group-hover/project-header:opacity-0"><spanclassName={`size-[9px] rounded-full ${projectStatus.dotClass} ${- projectStatus.pulse ? "animate-status-pulse" : ""+ projectStatus.pulse ? "motion-safe:animate-status-pulse" : ""}`}/></span>diff --git a/apps/web/src/components/ThreadStatusIndicators.tsx b/apps/web/src/components/ThreadStatusIndicators.tsxindex d3cc3873d2f..6ec5aec1ec1 100644--- a/apps/web/src/components/ThreadStatusIndicators.tsx+++ b/apps/web/src/components/ThreadStatusIndicators.tsx@@ -829,7 +829,7 @@ export function ThreadStatusLabel({><spanclassName={`size-[9px] rounded-full ${status.dotClass} ${- status.pulse ? "animate-status-pulse" : ""+ status.pulse ? "motion-safe:animate-status-pulse" : ""}`}/></TooltipTrigger>@@ -851,7 +851,7 @@ export function ThreadStatusLabel({><spanclassName={`h-1.5 w-1.5 rounded-full ${status.dotClass} ${- status.pulse ? "animate-status-pulse" : ""+ status.pulse ? "motion-safe:animate-status-pulse" : ""}`}/><span className="hidden md:inline">{status.label}</span>diff --git a/apps/web/src/components/preview/PreviewChromeRow.tsx b/apps/web/src/components/preview/PreviewChromeRow.tsxindex a56601947f4..5df55e06d4f 100644--- a/apps/web/src/components/preview/PreviewChromeRow.tsx+++ b/apps/web/src/components/preview/PreviewChromeRow.tsx@@ -259,7 +259,7 @@ export function PreviewChromeRow({><Camera className={cn(recording && "text-destructive")} />{recording ? (- <span className="absolute right-0.5 top-0.5 size-1.5 animate-status-pulse rounded-full bg-destructive" />+ <span className="absolute right-0.5 top-0.5 size-1.5 motion-safe:animate-status-pulse rounded-full bg-destructive" />) : null}</TooltipTrigger><TooltipPopup>