@@ -84,7 +84,6 @@ import {
8484 type KeyboardEvent ,
8585 type MouseEvent ,
8686 type ReactNode ,
87- type CSSProperties ,
8887} from "react" ;
8988import {
9089 LegendList ,
@@ -508,7 +507,6 @@ interface MessagesTimelineProps {
508507 onAnchorReady : ( messageId : MessageId , anchorIndex : number ) => void ;
509508 onAnchorSizeChanged : ( messageId : MessageId , size : number ) => void ;
510509 contentInsetEndAdjustment : number ;
511- composerOverlayHeight ?: number ;
512510 onIsAtEndChange : ( isAtEnd : boolean ) => void ;
513511 /**
514512 * Off while the user is reading history; LegendList's own maintainScrollAtEnd
@@ -609,7 +607,6 @@ const ConversationTimeline = memo(function ConversationTimeline({
609607 onAnchorReady,
610608 onAnchorSizeChanged,
611609 contentInsetEndAdjustment,
612- composerOverlayHeight = 0 ,
613610 onIsAtEndChange,
614611 onContentOverflowChange,
615612 liveFollowEnabled,
@@ -1102,12 +1099,6 @@ const ConversationTimeline = memo(function ConversationTimeline({
11021099 { footer }
11031100 </ TimelineListFooter >
11041101 ) ;
1105- const timelineMaskStyle =
1106- composerOverlayHeight === 0
1107- ? undefined
1108- : ( {
1109- "--timeline-composer-overlay-height" : `${ composerOverlayHeight } px` ,
1110- } as CSSProperties ) ;
11111102
11121103 const measureContentOverflow = ( ) =>
11131104 timelineContentOverflowsViewport ( listRef . current ?. getState ?.( ) , {
@@ -1522,60 +1513,52 @@ const ConversationTimeline = memo(function ConversationTimeline({
15221513 onCite = { onCiteAssistantText }
15231514 />
15241515 ) : null }
1525- < div
1516+ < LegendList < MessagesTimelineRow >
1517+ ref = { setTimelineList }
1518+ data = { rows }
1519+ extraData = { listExtraData }
1520+ keyExtractor = { keyExtractor }
1521+ getItemType = { getItemType }
1522+ renderItem = { renderItem }
1523+ estimatedItemSize = { 90 }
1524+ initialScrollAtEnd = {
1525+ ! findActive && citationRequest === null && rememberedPosition ?. atEnd !== false
1526+ }
1527+ // Legend needs a data refresh to mount new pins without a scroll event.
1528+ dataVersion = { readyCitationRequest ?. key ?? listIdentityKey }
1529+ { ...( alwaysRender ? { alwaysRender } : { } ) }
1530+ onLoad = { handleListLoad }
1531+ { ...( anchoredEndSpace ? { anchoredEndSpace } : { } ) }
1532+ contentInsetEndAdjustment = { anchoredEndSpace ? contentInsetEndAdjustment : 0 }
1533+ maintainScrollAtEnd = {
1534+ citationPositioning ||
1535+ ( restoringThreadPosition && rememberedPosition ?. atEnd === false ) ||
1536+ anchoredEndSpace ||
1537+ ! liveFollowEnabled ||
1538+ fullscreenAppRowId !== null ||
1539+ disclosureToggleSettling
1540+ ? false
1541+ : isWorking && ! prefersReducedMotion && settlingListIdentity === null
1542+ ? TIMELINE_MAINTAIN_SCROLL_AT_END_SMOOTH
1543+ : TIMELINE_MAINTAIN_SCROLL_AT_END
1544+ }
1545+ maintainVisibleContentPosition = {
1546+ findActive ||
1547+ citationPositioning ||
1548+ ( restoringThreadPosition && rememberedPosition ?. atEnd === false )
1549+ ? false
1550+ : maintainVisibleContentPosition
1551+ }
1552+ maintainScrollAtEndThreshold = { 1 }
1553+ onScroll = { handleScroll }
1554+ onItemSizeChanged = { handleItemSizeChanged }
15261555 className = { cn (
1527- "h-full min-h-0" ,
1528- composerOverlayHeight > 0 && "virtualized -scroll-fade timeline-scroll-bottom -fade" ,
1556+ "messages-timeline-scroll scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain [overflow-anchor:none] " ,
1557+ topFadeEnabled && "topbar -scroll-fade" ,
15291558 ) }
1530- style = { timelineMaskStyle }
1531- >
1532- < LegendList < MessagesTimelineRow >
1533- ref = { setTimelineList }
1534- data = { rows }
1535- extraData = { listExtraData }
1536- keyExtractor = { keyExtractor }
1537- getItemType = { getItemType }
1538- renderItem = { renderItem }
1539- estimatedItemSize = { 90 }
1540- initialScrollAtEnd = {
1541- ! findActive && citationRequest === null && rememberedPosition ?. atEnd !== false
1542- }
1543- // Legend needs a data refresh to mount new pins without a scroll event.
1544- dataVersion = { readyCitationRequest ?. key ?? listIdentityKey }
1545- { ...( alwaysRender ? { alwaysRender } : { } ) }
1546- onLoad = { handleListLoad }
1547- { ...( anchoredEndSpace ? { anchoredEndSpace } : { } ) }
1548- contentInsetEndAdjustment = { anchoredEndSpace ? contentInsetEndAdjustment : 0 }
1549- maintainScrollAtEnd = {
1550- citationPositioning ||
1551- ( restoringThreadPosition && rememberedPosition ?. atEnd === false ) ||
1552- anchoredEndSpace ||
1553- ! liveFollowEnabled ||
1554- fullscreenAppRowId !== null ||
1555- disclosureToggleSettling
1556- ? false
1557- : isWorking && ! prefersReducedMotion && settlingListIdentity === null
1558- ? TIMELINE_MAINTAIN_SCROLL_AT_END_SMOOTH
1559- : TIMELINE_MAINTAIN_SCROLL_AT_END
1560- }
1561- maintainVisibleContentPosition = {
1562- findActive ||
1563- citationPositioning ||
1564- ( restoringThreadPosition && rememberedPosition ?. atEnd === false )
1565- ? false
1566- : maintainVisibleContentPosition
1567- }
1568- maintainScrollAtEndThreshold = { 1 }
1569- onScroll = { handleScroll }
1570- onItemSizeChanged = { handleItemSizeChanged }
1571- className = { cn (
1572- "messages-timeline-scroll scrollbar-gutter-both h-full min-h-0 overflow-x-hidden overscroll-y-contain [overflow-anchor:none]" ,
1573- topFadeEnabled && "topbar-scroll-fade" ,
1574- ) }
1575- ListHeaderComponent = { listHeader }
1576- ListFooterComponent = { timelineListFooter }
1577- />
1578- </ div >
1559+ ListHeaderComponent = { listHeader }
1560+ ListFooterComponent = { timelineListFooter }
1561+ />
15791562 < TimelineMinimap
15801563 items = { minimapItems }
15811564 hasPersistentGutter = { minimapHasPersistentGutter }
0 commit comments