Skip to content

WIP: Port native chat thread list to Legend List#29331

Open
chrisnojima wants to merge 2 commits into
masterfrom
nojima/HOTPOT-native-legend-chat
Open

WIP: Port native chat thread list to Legend List#29331
chrisnojima wants to merge 2 commits into
masterfrom
nojima/HOTPOT-native-legend-chat

Conversation

@chrisnojima

Copy link
Copy Markdown
Contributor

Replace the inverted FlatList in NativeConversationList with KeyboardAwareLegendList (@legendapp/list/keyboard), matching the desktop LegendList: non-inverted data, initialScrollAtEnd + maintainScrollAtEnd + alignItemsAtEnd + maintainVisibleContentPosition, onStartReached/onEndReached pagination, and the keyboard-controller integration hooks.

  • Gate the list mount on loaded so its first render always has data; initialScrollAtEnd is one-time and otherwise runs on an empty list when a thread loads async from the inbox, leaving it scrolled mid-list.
  • Reserve bottom clearance via contentContainerStyle paddingBottom so the newest message clears the sticky input bar; keep the composer inset seed at 0 so the two don't stack into a gap.
  • Stub @legendapp/list/keyboard for the web build in native-only-modules.js.

Replace the inverted FlatList in NativeConversationList with
KeyboardAwareLegendList (@legendapp/list/keyboard), matching the desktop
LegendList: non-inverted data, initialScrollAtEnd + maintainScrollAtEnd +
alignItemsAtEnd + maintainVisibleContentPosition, onStartReached/onEndReached
pagination, and the keyboard-controller integration hooks.

- Gate the list mount on loaded so its first render always has data;
  initialScrollAtEnd is one-time and otherwise runs on an empty list when a
  thread loads async from the inbox, leaving it scrolled mid-list.
- Reserve bottom clearance via contentContainerStyle paddingBottom so the
  newest message clears the sticky input bar; keep the composer inset seed at
  0 so the two don't stack into a gap.
- Stub @legendapp/list/keyboard for the web build in native-only-modules.js.
…o Legend List

Master's #29332 search fixes were built for the inverted FlatList and did
not survive the Legend List port. Re-derive them for the non-inverted
KeyboardAwareLegendList:

- Hit centering: master's closed-loop scrollToOffset corrector oscillates
  here (avg-height offset guessing fights Legend List virtualization plus
  the centered-load pagination that prepends older messages and blows up
  the target index mid-correction). Drop it. Real cause was disabling
  maintainVisibleContentPosition while centered, which let prepends shift
  the target; keep MVCP {data:true} on always and re-assert the native
  scrollToItem(viewPosition:0.5) across a few frames so MVCP holds the row
  steady between asserts.
- Search-bar padding: consume searchOverlayHeight (previously measured but
  unread) by mirroring the shared value to state and reserving it as extra
  content paddingBottom so the centered hit clears the bar.
- Jump-to-recent lift: jump-to-recent.tsx moved its mobile positioning into
  a list-area wrapper, which the port had removed; re-add the keyboard-aware
  jumpWrapper so the button is centered and rides above the bar/keyboard.
@chrisnojima chrisnojima force-pushed the nojima/HOTPOT-native-legend-chat branch from d6b4b7a to a2f961f Compare June 19, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant