The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): separate expanded thoughts from the next reply (#25300)
Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
shivam committed
Oct 31, 2026 at 07:06 UTC
95ca05d59659db0d235acdfa7e87fae4c1100125
1 file changed
+57
-5
apps/mobile/src/features/threads/thread-work-log.tsx
+57
-5
@@ -96,6 +96,7 @@ import Animated, {
96
FadeOut,
97
LinearTransition,
98
ReduceMotion,
99
+ useAnimatedScrollHandler,
100
useAnimatedStyle,
101
useSharedValue,
102
withTiming,
@@ -530,11 +531,13 @@ export function ThreadWorkLog(props: ThreadWorkLogProps) {
531
props.activities.every((row) => row.projectedItem.item.type === "reasoning")
532
) {
533
return (
533
- <ScrollView nestedScrollEnabled className="ml-7 max-h-96 py-1">
534
- {props.activities.map((row) => (
535
- <View key={row.id}>{props.renderReasoning(row.workEntry.detail ?? "")}</View>
536
- ))}
537
- </ScrollView>
534
+ <WorkLogBlock continues={props.continuesWorkLog}>
535
+ <ThreadReasoningGroup
536
+ activities={props.activities}
537
+ edgeFadeColor={props.edgeFadeColor}
538
+ renderReasoning={props.renderReasoning}
539
+ />
540
+ </WorkLogBlock>
541
);
542
}
543
@@ -557,6 +560,55 @@ export function ThreadWorkLog(props: ThreadWorkLogProps) {
560
);
561
}
562
563
+function ThreadReasoningGroup(props: {
564
+ readonly activities: ReadonlyArray<ThreadFeedActivity>;
565
+ readonly edgeFadeColor: string;
566
+ readonly renderReasoning: (text: string) => ReactNode;
567
+}) {
568
+ const scrollOffset = useSharedValue(0);
569
+ const contentHeight = useSharedValue(0);
570
+ const viewportHeight = useSharedValue(0);
571
+ const onScroll = useAnimatedScrollHandler((event) => {
572
+ scrollOffset.set(event.contentOffset.y);
573
+ });
574
+ const bottomFadeStyle = useAnimatedStyle(() => ({
575
+ opacity: Math.min(
576
+ 1,
577
+ Math.max(0, contentHeight.value - viewportHeight.value - scrollOffset.value) /
578
+ WORK_GROUP_EDGE_FADE_HEIGHT,
579
+ ),
580
+ }));
581
+
582
+ return (
583
+ <View className="ml-7">
584
+ <Animated.ScrollView
585
+ nestedScrollEnabled
586
+ className="max-h-96"
587
+ contentContainerClassName="py-1"
588
+ scrollEventThrottle={16}
589
+ onScroll={onScroll}
590
+ onLayout={(event) => {
591
+ viewportHeight.set(event.nativeEvent.layout.height);
592
+ }}
593
+ onContentSizeChange={(_width, height) => {
594
+ contentHeight.set(height);
595
+ }}
596
+ >
597
+ {props.activities.map((row) => (
598
+ <View key={row.id}>{props.renderReasoning(row.workEntry.detail ?? "")}</View>
599
+ ))}
600
+ </Animated.ScrollView>
601
+ <Animated.View
602
+ pointerEvents="none"
603
+ className="absolute inset-x-0 bottom-0"
604
+ style={[{ height: WORK_GROUP_EDGE_FADE_HEIGHT }, bottomFadeStyle]}
605
+ >
606
+ <EdgeFade color={props.edgeFadeColor} direction="up" />
607
+ </Animated.View>
608
+ </View>
609
+ );
610
+}
611
+
612
function ThreadWorkGroupList(props: {
613
readonly activities: ReadonlyArray<ThreadFeedActivity>;
614
readonly edgeFadeColor: string;