Skip to content

Commit 23bd753

Browse files
fix(ui): preserve tool icon detail in light mode (#23896)
1 parent e78297d commit 23bd753

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎apps/mobile/src/features/threads/thread-work-log.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,14 +1610,17 @@ function ToolActivityImage(props: {
16101610
<View
16111611
style={[
16121612
StyleSheet.absoluteFill,
1613-
props.themeAppearance === "light" ? { filter: [{ brightness: 0.6 }] } : undefined,
1613+
props.themeAppearance === "light" ? { filter: [{ brightness: 0.7 }] } : undefined,
16141614
]}
16151615
>
16161616
<Image
16171617
source={props.source}
16181618
cachePolicy="memory-disk"
16191619
contentFit="contain"
1620-
style={[StyleSheet.absoluteFill, { opacity: loaded ? 0.7 : 0 }]}
1620+
style={[
1621+
StyleSheet.absoluteFill,
1622+
{ opacity: loaded ? (props.themeAppearance === "dark" ? 0.7 : 1) : 0 },
1623+
]}
16211624
onLoad={() => setLoaded(true)}
16221625
onError={() => setFailed(true)}
16231626
/>

‎apps/web/src/components/chat/TimelineToolActivityIcon.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function ToolActivityImageIcon(props: {
194194
className={cn(
195195
props.className,
196196
"inline-block overflow-hidden rounded-xs bg-background",
197-
props.muted && "opacity-70",
197+
props.muted && "dark:opacity-70",
198198
)}
199199
>
200200
<img
@@ -203,7 +203,7 @@ function ToolActivityImageIcon(props: {
203203
aria-hidden
204204
decoding="async"
205205
referrerPolicy="no-referrer"
206-
className={cn("block size-full object-contain", props.muted && "light:brightness-60")}
206+
className={cn("block size-full object-contain", props.muted && "light:brightness-70")}
207207
onError={() => handleLoadError(displayedSrc)}
208208
/>
209209
</span>

0 commit comments

Comments
 (0)