TypeScript
fix(web): restore the running tool label shine (#9777)
maria935917f50a2d
diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsxindex 4e55991f870..df952aeca38 100644--- a/apps/web/src/components/chat/MessagesTimeline.tsx+++ b/apps/web/src/components/chat/MessagesTimeline.tsx@@ -1918,11 +1918,13 @@ function LiveActivityRow({iconName,toolIcon,failed = false,+ active = false,}: {label: string;iconName?: WorkEntryIconName;toolIcon?: ToolActivityIcon | undefined;failed?: boolean;+ active?: boolean;}) {return (<div className="min-h-6 w-fit max-w-full min-w-0 overflow-hidden rounded-md text-sm leading-relaxed">@@ -1932,6 +1934,7 @@ function LiveActivityRow({toolIcon={toolIcon}failed={failed}announceFailure={failed}+ active={active}/></div>);@@ -1943,12 +1946,14 @@ function LiveActivityContent({toolIcon,failed = false,announceFailure = false,+ active = false,}: {label: string;iconName: WorkEntryIconName | undefined;toolIcon?: ToolActivityIcon | undefined;failed?: boolean;announceFailure?: boolean;+ active?: boolean;}) {const showTrailingFailureMark =failed && iconName !== undefined && !toolIconAcceptsTint(iconName, toolIcon);@@ -1978,7 +1983,7 @@ function LiveActivityContent({/></span>) : null}- <span className="min-w-0 flex-1 truncate">{label}</span>+ <span className={cn("min-w-0 flex-1 truncate", active && "live-tool-shine")}>{label}</span>{showTrailingFailureMark ? (<XIcon aria-hidden className={cn("size-3 shrink-0", failedToolIconClassName)} />) : null}@@ -2004,6 +2009,7 @@ function LiveWorkEntryTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "iconName={workEntryIconName(row.entry)}toolIcon={row.entry.toolIcon ?? row.entry.toolSource?.icon}failed={failed}+ active={row.active}/></button>);diff --git a/apps/web/src/index.css b/apps/web/src/index.cssindex 54bb5b70d5f..1369cd31f5b 100644--- a/apps/web/src/index.css+++ b/apps/web/src/index.css@@ -425,6 +425,34 @@ 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;+ }+}+@property --assistant-citation-highlight-opacity {syntax: "<number>";inherits: true;