feat: message pruning - #3815
Merged
Merged
Conversation
szuperaz
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Goal
Wires up the message list window cap from GetStream/stream-chat-js#1875, so a livestream channel stops growing its loaded window forever.
🛠 Implementation details
The cap now lives in LLC config, so
<Channel maximumMessageLimit>is removed.Everything that read the prop now reads the config through
useStateStore(paginator.configState, …), so the threemaximumMessageLimitscroll branches inMessageList/MessageFlashListkeep working unchanged.usePrunableMessageListkeeps its viewability tracking and theisNearEndheuristic, but instead of pruning itself it pushes one boolean into the paginator —setPruningSuspended(isNearEnd(...))- and the LLC prunes on ingest. It lifts the suspension on unmount, otherwise a list that goes away would pin the window open forever.Also fixes a real bug while it's in here:
MessageFlashListnever reset its pagination trackers after a prune. #3254 fixed that inMessageListonly.Needs the LLC PR merged and an rc published before CI can pass - the
stream-chatpin has to move with it.🎨 UI Changes
🧪 Testing
☑️ Checklist
developbranch