Skip to content
TypeScript

fix(mobile): shimmer active tool rows (#8932)

Julius Marminge5ce92c2f1920
diff --git a/apps/mobile/src/features/threads/thread-work-log.tsx b/apps/mobile/src/features/threads/thread-work-log.tsx
index a316d9daee7..dec1742d826 100644
--- a/apps/mobile/src/features/threads/thread-work-log.tsx
+++ b/apps/mobile/src/features/threads/thread-work-log.tsx
@@ -9,6 +9,7 @@ import {
type ColorValue,
Pressable,
ScrollView,
+ StyleSheet,
View,
} from "react-native";
import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
@@ -143,7 +144,7 @@ function ShimmeringWorkContent(props: {
return (
<View
- className="min-w-0 flex-1"
+ className="min-w-0 flex-1 overflow-hidden"
onLayout={(event) => setAvailableWidth(event.nativeEvent.layout.width)}
>
<ShimmerWorkContent
@@ -164,7 +165,7 @@ function ShimmeringWorkContent(props: {
style={[{ width: SHIMMER_WIDTH }, sweepStyle]}
>
<MaskedView
- className="absolute inset-0"
+ style={StyleSheet.absoluteFill}
maskElement={
<Svg width="100%" height="100%">
<Defs>
diff --git a/apps/mobile/src/lib/threadActivity.test.ts b/apps/mobile/src/lib/threadActivity.test.ts
index 73080b3dfcc..28deeb384e5 100644
--- a/apps/mobile/src/lib/threadActivity.test.ts
+++ b/apps/mobile/src/lib/threadActivity.test.ts
@@ -942,8 +942,27 @@ describe("buildThreadFeed", () => {
summary: "Running pnpm",
summaryKind: "command",
live: true,
- shimmer: false,
+ shimmer: true,
});
+ expect(rows[0]).toMatchObject({ live: false, shimmer: false });
+
+ const stoppedRows = deriveThreadFeedPresentation(feed, latestTurn, new Set());
+ expect(stoppedRows.filter((entry) => entry.type === "work-toggle")).toMatchObject([
+ { live: false, shimmer: false },
+ { live: false, shimmer: false },
+ ]);
+
+ const completedRows = deriveThreadFeedPresentation(
+ feed,
+ { ...latestTurn, state: "completed", completedAt: "2026-04-01T00:00:04.000Z" },
+ new Set([turnId]),
+ new Set(),
+ latestTurn.startedAt,
+ );
+ expect(completedRows.filter((entry) => entry.type === "work-toggle")).toMatchObject([
+ { live: false, shimmer: false },
+ { live: false, shimmer: false },
+ ]);
});
it("does not revive cached in-progress tools after work stops", () => {
diff --git a/apps/mobile/src/lib/threadActivity.ts b/apps/mobile/src/lib/threadActivity.ts
index f30081dd35b..28f4fc76061 100644
--- a/apps/mobile/src/lib/threadActivity.ts
+++ b/apps/mobile/src/lib/threadActivity.ts
@@ -1512,10 +1512,8 @@ function appendToolGroupRows(
),
hasFailure: activities.findLast((activity) => activity.toolLike)?.status === "failure",
live,
- shimmer:
- isWorking &&
- latestActivity.lifecycleStatus === "inProgress" &&
- latestActivity.turnId === unsettledTurnId,
+ // Match the live label until the turn or contiguous tool run settles.
+ shimmer: live,
});
if (!expanded) {
return;