| ... | ... | @@ -2260,11 +2260,18 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { |
| 2260 | 2260 | ); |
| 2261 | 2261 | const markdownStyles = useMarkdownStyles(onMarkdownLinkPress, renderMarkdownImage); |
| 2262 | 2262 | const reviewCommentColors = useReviewCommentColors(); |
| 2263 | const unsettledTurnId = |
| 2264 | props.latestTurn && |
| 2265 | (props.latestTurn.completedAt === null || props.latestTurn.state === "running") |
| 2266 | ? props.latestTurn.turnId |
| 2267 | : null; |
| 2263 | 2268 | // 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. |
| 2265 | 2271 | const listAppearanceData = useMemo( |
| 2266 | 2272 | () => ({ |
| 2267 | 2273 | dispatchingMessageId: props.dispatchingMessageId, |
| 2274 | unsettledTurnId, |
| 2268 | 2275 | copiedRowId, |
| 2269 | 2276 | expandedWorkRows, |
| 2270 | 2277 | workRowSizing, |
| ... | ... | @@ -2277,6 +2284,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { |
| 2277 | 2284 | }), |
| 2278 | 2285 | [ |
| 2279 | 2286 | props.dispatchingMessageId, |
| 2287 | unsettledTurnId, |
| 2280 | 2288 | copiedRowId, |
| 2281 | 2289 | expandedWorkRows, |
| 2282 | 2290 | workRowSizing, |
| ... | ... | @@ -2472,12 +2480,6 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { |
| 2472 | 2480 | } |
| 2473 | 2481 | return new Set(terminalIdsByTurn.values()); |
| 2474 | 2482 | }, [props.feed]); |
| 2475 | | const unsettledTurnId = |
| 2476 | | props.latestTurn && |
| 2477 | | (props.latestTurn.completedAt === null || props.latestTurn.state === "running") |
| 2478 | | ? props.latestTurn.turnId |
| 2479 | | : null; |
| 2480 | | |
| 2481 | 2483 | useEffect(() => { |
| 2482 | 2484 | const previous = previousLatestTurnRef.current; |
| 2483 | 2485 | previousLatestTurnRef.current = props.latestTurn; |