Skip to content

Commit c778682

Browse files
fix(mobile): restore assistant message bottom padding
- Repaint feed rows when the latest turn settles so footer spacing appears
1 parent c0d4e95 commit c778682

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎apps/mobile/src/features/threads/ThreadFeed.tsx‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,11 +2260,18 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
22602260
);
22612261
const markdownStyles = useMarkdownStyles(onMarkdownLinkPress, renderMarkdownImage);
22622262
const reviewCommentColors = useReviewCommentColors();
2263+
const unsettledTurnId =
2264+
props.latestTurn &&
2265+
(props.latestTurn.completedAt === null || props.latestTurn.state === "running")
2266+
? props.latestTurn.turnId
2267+
: null;
22632268
// LegendList does not invalidate visible rows when only the renderItem closure changes.
2264-
// Keep row-local interaction props in extraData so disclosures and copy feedback repaint.
2269+
// Include turn completion so unchanged message rows reveal their footer and spacing
2270+
// even when the final message update arrives before the turn settles.
22652271
const listAppearanceData = useMemo(
22662272
() => ({
22672273
dispatchingMessageId: props.dispatchingMessageId,
2274+
unsettledTurnId,
22682275
copiedRowId,
22692276
expandedWorkRows,
22702277
workRowSizing,
@@ -2277,6 +2284,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
22772284
}),
22782285
[
22792286
props.dispatchingMessageId,
2287+
unsettledTurnId,
22802288
copiedRowId,
22812289
expandedWorkRows,
22822290
workRowSizing,
@@ -2472,12 +2480,6 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
24722480
}
24732481
return new Set(terminalIdsByTurn.values());
24742482
}, [props.feed]);
2475-
const unsettledTurnId =
2476-
props.latestTurn &&
2477-
(props.latestTurn.completedAt === null || props.latestTurn.state === "running")
2478-
? props.latestTurn.turnId
2479-
: null;
2480-
24812483
useEffect(() => {
24822484
const previous = previousLatestTurnRef.current;
24832485
previousLatestTurnRef.current = props.latestTurn;

0 commit comments

Comments
 (0)