TypeScript
fix(ui): preserve tool icon detail in light mode (#23896)
Julius Marminge23bd753806eb
diff --git a/apps/mobile/src/features/threads/thread-work-log.tsx b/apps/mobile/src/features/threads/thread-work-log.tsxindex b7ceb8c7b90..91911d02137 100644--- a/apps/mobile/src/features/threads/thread-work-log.tsx+++ b/apps/mobile/src/features/threads/thread-work-log.tsx@@ -1610,14 +1610,17 @@ function ToolActivityImage(props: {<Viewstyle={[StyleSheet.absoluteFill,- props.themeAppearance === "light" ? { filter: [{ brightness: 0.6 }] } : undefined,+ props.themeAppearance === "light" ? { filter: [{ brightness: 0.7 }] } : undefined,]}><Imagesource={props.source}cachePolicy="memory-disk"contentFit="contain"- style={[StyleSheet.absoluteFill, { opacity: loaded ? 0.7 : 0 }]}+ style={[+ StyleSheet.absoluteFill,+ { opacity: loaded ? (props.themeAppearance === "dark" ? 0.7 : 1) : 0 },+ ]}onLoad={() => setLoaded(true)}onError={() => setFailed(true)}/>diff --git a/apps/web/src/components/chat/TimelineToolActivityIcon.tsx b/apps/web/src/components/chat/TimelineToolActivityIcon.tsxindex 8d85ed2eefd..d677d939792 100644--- a/apps/web/src/components/chat/TimelineToolActivityIcon.tsx+++ b/apps/web/src/components/chat/TimelineToolActivityIcon.tsx@@ -194,7 +194,7 @@ function ToolActivityImageIcon(props: {className={cn(props.className,"inline-block overflow-hidden rounded-xs bg-background",- props.muted && "opacity-70",+ props.muted && "dark:opacity-70",)}><img@@ -203,7 +203,7 @@ function ToolActivityImageIcon(props: {aria-hiddendecoding="async"referrerPolicy="no-referrer"- className={cn("block size-full object-contain", props.muted && "light:brightness-60")}+ className={cn("block size-full object-contain", props.muted && "light:brightness-70")}onError={() => handleLoadError(displayedSrc)}/></span>