Skip to content

feat: message pruning - #3815

Merged
szuperaz merged 3 commits into
V10from
feat/message-pruning
Sep 17, 2026
Merged

szuperaz merged 3 commits into
V10from
feat/message-pruning

Conversation

@isekovanic

Copy link
Copy Markdown
Contributor

🎯 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.

// before
<Channel maximumMessageLimit={100} />

// after
channel.messagePaginator.updateConfig({ maxLoadedItems: 100 });
// or declaratively, per surface
client.config.set({ channel: { messagePaginator: { maxLoadedItems: 100 } } });

Everything that read the prop now reads the config through useStateStore(paginator.configState, …), so the three maximumMessageLimit scroll branches in MessageList / MessageFlashList keep working unchanged.

usePrunableMessageList keeps its viewability tracking and the isNearEnd heuristic, 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: MessageFlashList never reset its pagination trackers after a prune. #3254 fixed that in MessageList only.

Needs the LLC PR merged and an rc published before CI can pass - the stream-chat pin has to move with it.

🎨 UI Changes

🧪 Testing

☑️ 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

@szuperaz
szuperaz merged commit f85cb3e into V10 Sep 17, 2026
2 of 4 checks passed
@szuperaz
szuperaz deleted the feat/message-pruning branch September 17, 2026 16:40
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