From b629292d5b9367d4fff091808aa40316a3994740 Mon Sep 17 00:00:00 2001 From: Waleed Date: Sat, 11 Jul 2026 18:41:06 -0700 Subject: [PATCH] improvement(chat): shimmer active subagent and tool labels instead of spinners (#5612) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * improvement(chat): shimmer active subagent and tool labels instead of spinners * improvement(chat): address review — focus-visible chevron, single shimmer source, reduced-motion rest color * improvement(chat): pulse shimmer text under reduced motion so running state stays visible * improvement(chat): reset background-clip in reduced-motion shimmer fallback * fix(chat): apply reduced-motion shimmer fallback in dark mode too --- .../components/agent-group/agent-group.tsx | 37 +++++++--------- .../components/agent-group/tool-call-item.tsx | 36 ++++++++++++--- apps/sim/components/ui/index.ts | 1 + .../sim/components/ui/shimmer-text.module.css | 44 +++++++++++++++++++ apps/sim/components/ui/shimmer-text.tsx | 17 +++++++ .../components/ui/thinking-loader.module.css | 26 +++-------- 6 files changed, 115 insertions(+), 46 deletions(-) create mode 100644 apps/sim/components/ui/shimmer-text.module.css create mode 100644 apps/sim/components/ui/shimmer-text.tsx diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx index ce8d57b6dc..0314907eef 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx @@ -1,7 +1,8 @@ 'use client' import { useEffect, useLayoutEffect, useRef, useState } from 'react' -import { ChevronDown, cn, Expandable, ExpandableContent, PillsRing } from '@sim/emcn' +import { ChevronDown, cn, Expandable, ExpandableContent } from '@sim/emcn' +import { ShimmerText } from '@/components/ui' import type { ToolCallData } from '../../../../types' import { getAgentIcon, isToolDone } from '../../utils' import { ToolCallItem } from './tool-call-item' @@ -63,11 +64,7 @@ export function AgentGroup({ const AgentIcon = getAgentIcon(agentName) const hasItems = items.length > 0 const resolved = isAgentGroupResolved(items) - // Pure projection of the run's own state: a subagent header spins while it is - // delegating with no resolved work yet. A terminal turn closes the lane (its - // subagent block is stamped ended), which clears `isDelegating`, so no - // transport gating is needed to stop an aborted-before-first-tool spinner. - const showDelegatingSpinner = isDelegating && !resolved + const isWorking = (isDelegating && !resolved) || (isStreaming && isLaneOpen) // Expand while the turn is live and any of: the lane is open (the subagent is // actively running), this is the current/latest section, or there is unresolved @@ -89,19 +86,19 @@ export function AgentGroup({