Skip to content

fix: set thread cursor when initied from setItems - #1898

Merged
isekovanic merged 2 commits into
release-v10from
paginator-bug-fix
Oct 3, 2026
Merged

isekovanic merged 2 commits into
release-v10from
paginator-bug-fix

Conversation

@szuperaz

@szuperaz szuperaz commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

https://linear.app/stream/issue/REACT-1206/rn-cant-load-older-replies-on-long-threads

Description of the changes, What, Why and How?

Flagged and fixed by Claude while working on something else for RN: in RN if a thread has more than 50 replies, we can't load older ones, only the inital 50 that's loaded when opening the thread.

The bug is not in RN, it is just more noticeable there. The bug is in stream-chat-js: when a thread is initiated via calling setItems cursor was not set. This meant that when we wanted to load older replies, we loaded the latest replies (that were already loaded). At this point, the cursor is set properly. At this point, the two SDKs diverge:

  • RN has a check that stops subsequent queries if the last query didn't load any new replies -> so in RN loading just won't work anymore
  • React doesn't have this check, so scrolling again will trigger loading older replies

Changelog

@isekovanic isekovanic left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this !

@isekovanic

Copy link
Copy Markdown
Contributor

this looks good and I'll merge it and on Monday I'll remove the extremely bad disfunction during same length queried on RN (despite surfacing this bug it's very risky for pruning as well)

@isekovanic
isekovanic merged commit 63bef43 into release-v10 Oct 3, 2026
4 checks passed
@isekovanic
isekovanic deleted the paginator-bug-fix branch October 3, 2026 01:18
github-actions Bot pushed a commit that referenced this pull request Oct 5, 2026
## [10.0.0-rc.18](v10.0.0-rc.17...v10.0.0-rc.18) (2026-10-05)

### ⚠ BREAKING CHANGES

* adopt TS generator changes (#1896)

### Bug Fixes

* set thread cursor when initied from setItems ([#1898](#1898)) ([63bef43](63bef43))

### Features

* adopt TS generator changes ([#1896](#1896)) ([82af6de](82af6de))
@stream-ci-bot

Copy link
Copy Markdown

🎉 This PR is included in version 10.0.0-rc.18 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants