TypeScript
fix(web): bring back the live shimmer on work log rows (#16372)
Julius Marminge8f75697b9e02
diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsxindex 71cbce5a755..89d44b6abf7 100644--- a/apps/web/src/components/chat/MessagesTimeline.tsx+++ b/apps/web/src/components/chat/MessagesTimeline.tsx@@ -3554,7 +3554,7 @@ function LiveActivityRow({const showShimmer = animated && shimmer;return (<div- ref={showShimmer ? observeVisibleAnimation : undefined}+ ref={animated ? observeVisibleAnimation : undefined}className="relative min-h-6 w-fit max-w-full min-w-0 overflow-hidden rounded-md text-sm leading-relaxed"><LiveActivityContent@@ -3620,7 +3620,13 @@ function LiveActivityContent({) : null}label={- <span className={cn("block truncate", (highlighted || active) && "text-foreground")}>+ <span+ className={cn(+ "block truncate",+ highlighted && "text-foreground",+ active && "live-tool-shine",+ )}+ >{label}</span>}@@ -3756,6 +3762,7 @@ function WorkGroupHeader(props: {}) {return (<WorkLogButton+ ref={props.active && !props.failed ? observeVisibleAnimation : undefined}aria-label={props.failed ? `${props.label}, tool call failed` : props.label}aria-expanded={props.expanded}onClick={props.onToggle}@@ -3768,7 +3775,7 @@ function WorkGroupHeader(props: {/>}label={- <span className={cn("block truncate", props.active && !props.failed && "text-foreground")}>+ <span className={cn("block truncate", props.active && !props.failed && "live-tool-shine")}>{props.label}</span>}diff --git a/apps/web/src/index.css b/apps/web/src/index.cssindex a4b80193dce..46b57325a3f 100644--- a/apps/web/src/index.css+++ b/apps/web/src/index.css@@ -499,6 +499,35 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil}}+@keyframes live-tool-shine {+ from {+ background-position:+ -4.5rem 0,+ 0 0;+ }+ to {+ background-position:+ calc(100% + 4.5rem) 0,+ 0 0;+ }+}++@utility live-tool-shine {+ @media (prefers-reduced-motion: no-preference) and (forced-colors: none) {+ color: transparent;+ background-image:+ linear-gradient(to right, transparent, var(--contrast-foreground), transparent),+ linear-gradient(var(--contrast-secondary-label), var(--contrast-secondary-label));+ background-size:+ 4.5rem 100%,+ 100% 100%;+ background-repeat: no-repeat;+ background-clip: text;+ animation: live-tool-shine 2.2s steps(30) infinite;+ animation-play-state: var(--visible-animation-state, paused);+ }+}+@utility visible-animate-spin {animation: var(--animate-spin);animation-play-state: var(--visible-animation-state, paused);