| ... | @@ -210,6 +210,7 @@ function formatMessageTime(input: string): string { | ... | @@ -210,6 +210,7 @@ function formatMessageTime(input: string): string { |
| 210 | // text fits at the current font settings. Larger accessibility text is measured. | 210 | // text fits at the current font settings. Larger accessibility text is measured. |
| 211 | const TURN_FOLD_HEIGHT = 42; // min-h-11 (38.5) + mb-1 (3.5), with the mobile 14px rem | 211 | const TURN_FOLD_HEIGHT = 42; // min-h-11 (38.5) + mb-1 (3.5), with the mobile 14px rem |
| 212 | const THREAD_FEED_LAYOUT_TRANSITION = LinearTransition.duration(THREAD_DISCLOSURE_TRANSITION_MS); | 212 | const THREAD_FEED_LAYOUT_TRANSITION = LinearTransition.duration(THREAD_DISCLOSURE_TRANSITION_MS); |
| | 213 | const THREAD_FEED_IMMEDIATE_TRANSITION = LinearTransition.duration(0); |
| 213 | // Tailwind spacing on the mobile 14px rem: px-3.5 on the user bubble, px-1 on | 214 | // Tailwind spacing on the mobile 14px rem: px-3.5 on the user bubble, px-1 on |
| 214 | // assistant rows. Images size their frame from these before their own layout. | 215 | // assistant rows. Images size their frame from these before their own layout. |
| 215 | const USER_BUBBLE_HORIZONTAL_PADDING = 3.5 * 3.5; | 216 | const USER_BUBBLE_HORIZONTAL_PADDING = 3.5 * 3.5; |
| ... | @@ -2865,8 +2866,13 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { | ... | @@ -2865,8 +2866,13 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) { |
| 2865 | entry.type === "message" ? `message:${entry.message.role}` : entry.type | 2866 | entry.type === "message" ? `message:${entry.message.role}` : entry.type |
| 2866 | } | 2867 | } |
| 2867 | getFixedItemSize={getFixedItemSize} | 2868 | getFixedItemSize={getFixedItemSize} |
| | 2869 | // LegendList swaps its position and size component types when this |
| | 2870 | // becomes undefined, remounting the feed and replaying row entrances. |
| | 2871 | // Keep those containers mounted while ordinary updates stay immediate. |
| 2868 | itemLayoutAnimation={ | 2872 | itemLayoutAnimation={ |
| 2869 | disclosureToggleSettling ? THREAD_FEED_LAYOUT_TRANSITION : undefined | 2873 | disclosureToggleSettling |
| | 2874 | ? THREAD_FEED_LAYOUT_TRANSITION |
| | 2875 | : THREAD_FEED_IMMEDIATE_TRANSITION |
| 2870 | } | 2876 | } |
| 2871 | onItemSizeChanged={handleItemSizeChanged} | 2877 | onItemSizeChanged={handleItemSizeChanged} |
| 2872 | // Measure rows well before they scroll into view so estimate→actual | 2878 | // Measure rows well before they scroll into view so estimate→actual |