Repository navigation
Conversation
…empty A live event can ingest a channel into a list that was never queried. That defines `items` without loading a page, so a UI that runs the first query only while `items === undefined` skipped it, and the list showed just the event-routed channels (stream-chat-react's Unread view missed unread channels). `isInitialized` cannot replace that check: an empty `setItems` page (a catch-all list seeded so it never queries) leaves it false too. Add `BasePaginator.hasLoadedPage`: true after a query or any `setItems` page, including an empty one, and false for items that only events ingested. `isInitialized` is unchanged, so connection recovery still skips a seeded empty list. `setItems` sets the flag and `resetState` clears it (and the query shape) before publishing, so subscribers read current values.
oliverlaz
requested review from
MartinCupela,
NikolaGoranNaumovski,
isekovanic and
szuperaz
as code owners
November 4, 2026 14:11
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.
Ticket: https://linear.app/stream/issue/REACT-1475
CLA
Description of the changes, What, Why and How?
Found in the second side-by-side QA round (React
examples/vite, v15 + v10). The v15 "Unread" channel list could open with no request and show only some unread channels.Why: a live event can route a channel into a list that was never queried (a message makes a channel unread before the "Unread" list was ever shown). The channel goes into the paginator's logical head interval, so
itemsbecomes defined although no page was loaded. stream-chat-react'sChannelListran its first query only whileitems === undefined, so it skipped it.isInitializedcan't replace that check: an emptysetItemspage, which the example uses to seed a catch-all list that must never query, leaves itfalsetoo. From the outside, both states looked the same.What / How (
BasePaginator):hasLoadedPage:trueafter a query or anysetItemspage, including an empty one, andfalsefor items that only events ingested.isInitializedis unchanged, so connection recovery (ChannelManager.recover) still skips a seeded empty list.setItemssets the flag before it publishes, andresetStateclears it (and the query shape) before it publishes, so state subscribers such as a UI selector read current values.Checks:
yarn lint,yarn typesandyarn test(4950 passed). The suite reports 2 unhandled errors from thread and poll tests, also reported before this change. Verified in the vite example against a local build: after a live message made a channel unread, opening "Unread" sends the query and lists all three unread channels, where it used to list only the event-routed one. The seeded catch-all list still sends no query.The stream-chat-react half is in GetStream/stream-chat-react#3364 (
fix(ChannelList), same ticket). It needs a release with this getter.Changelog
BasePaginator.hasLoadedPage: whether a page was loaded by a query orsetItems(including an empty one), as opposed to items that only live events ingested into a never-queried list.