diff --git a/apps/mobile/src/features/threads/thread-work-log.tsx b/apps/mobile/src/features/threads/thread-work-log.tsx index a316d9daee7ca921d4e37d5dfeedf0bf911b7b14..dec1742d826196d84d181487c4ca7524f3b83f45 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 ( setAvailableWidth(event.nativeEvent.layout.width)} > diff --git a/apps/mobile/src/lib/threadActivity.test.ts b/apps/mobile/src/lib/threadActivity.test.ts index 73080b3dfcc6c742e90a71b8cc819cb827ea3846..28deeb384e5e6f1b33356cc8b23f761b4c79c5a9 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 f30081dd35b413d1af58c14072e9745407d3acea..28f4fc760612a8d77e34c38fe7710582fcd75238 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;