Skip to content

feat: paginator refactor compatibility - #3888

Merged
isekovanic merged 1 commit into
V10from
feat/paginator-refactor-compatibility
Oct 23, 2026
Merged

isekovanic merged 1 commit into
V10from
feat/paginator-refactor-compatibility

Conversation

@isekovanic

Copy link
Copy Markdown
Contributor

🎯 Goal

Adapt to stream-chat 10.0.0-rc.24, which includes stream-chat-js#1926 (the message paginator now places every page itself, and messageSetToAddToIfDoesNotExist is gone).

That PR renamed messagePaginator.lastMessage / lastMessageAt to latestMessage / latestMessageAt. RN still read the old names, which are now undefined. As a result, every channel preview showed "No messages yet", and thread list rows lost the last reply's avatar and time.

πŸ›  Implementation details

  • Bump stream-chat to ^10.0.0-rc.24 in package and the example apps.
  • Read latestMessage / latestMessageAt in useChannelPreviewData, ThreadListItem, useMarkRead, MessageList and MessageFlashList.
  • Offline DB: selectMessagesForChannels returned 24 messages per channel (RowNum < 25) instead of 25. The client reads a page shorter than requested as the start of the channel, so older history could stop loading past the cached messages. It now returns 25.
  • Tests:
    • headItems becomes anchoredHeadItems.
    • The Channel test spies on requestChannelState, since the paginator no longer goes through channel.query.
    • The scroll-to-bottom test sets hasMoreHead: true, since a complete short first page is now correctly the newest one.
    • New real-SQLite test for the DB query.
  • Docs: ai-migration-v9-to-v10.md and v10-breaking-changes.md now use latestMessage and describe the channel.query behaviour correctly. The link to the LLC's breaking-changes list is fixed.

No breaking changes in RN's own API.

🎨 UI Changes

Channel list previews and thread list rows show the latest message / reply again instead of "No messages yet".

πŸ§ͺ Testing

  • yarn lint, yarn build, yarn typecheck and yarn test:unit (2243 passed).
  • SampleApp on an Android emulator:
    • Two cold starts with offline support on. Channel list previews show the latest message all the way down the list, including soft-deleted ones ("Message deleted").
    • The thread list shows the last reply's avatar and time.

β˜‘οΈ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

@Stream-SDK-Bot

Copy link
Copy Markdown
Contributor

SDK Size

title develop branch diff status
js_bundle_size 2036 KB 2018 KB -18022 B πŸš€
ai_components_size 130 KB 130 KB -16 B πŸš€

@isekovanic
isekovanic merged commit b94f396 into V10 Oct 23, 2026
2 checks passed
@isekovanic
isekovanic deleted the feat/paginator-refactor-compatibility branch October 23, 2026 00:56
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.

2 participants