Repository navigation
refactor: call the paginator intervals intervals, not windows - #1939
Merged
MartinCupela merged 3 commits intoOct 22, 2026
Merged
Conversation
Renames the private and protected paginator members and the comments that called a loaded interval a window, e.g. scheduleWindowPublish -> scheduleActiveIntervalPublish, replaceWindowsWithNewestPage -> replaceIntervalsWithNewestPage, headWindow -> headInterval, belowWindow -> idsTailwardOfPage. BasePaginator gets a doc comment defining the interval terms. "window" stays for the browser global and time spans. No public API changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md asks for "interval" over "window" and points to BasePaginator's doc comment; CLAUDE.md's paginator notes use the terms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pruneTailwardOfPageIfReachedStart -> removeIdsTailwardOfPageIfNothingOlder: it asks the server whether anything is older than the page's oldest message and removes the loaded messages tailward of the page only when nothing is. Its variables name what they hold (pageTailId, headIdBeforeRequest, hasMessagesOlderThanPage, headAfterRequest), and the pending request is _pendingTailwardOfPageRemoval. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MartinCupela
requested review from
isekovanic,
oliverlaz and
szuperaz
as code owners
October 22, 2026 12:26
isekovanic
approved these changes
Oct 22, 2026
MartinCupela
deleted the
martincupela/react-1075-rename-window-to-interval
branch
October 22, 2026 13:50
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 26, 2026
## [10.0.0-rc.25](v10.0.0-rc.24...v10.0.0-rc.25) (2026-10-26) ### ⚠ BREAKING CHANGES * Channel.watch() resolves with the channel instance to use (the channel, or the instance that superseded it) instead of the server response. - watch() sends no query for a channel that is already watched and loaded (watchStatus Watching, initialized, and messagePaginator.hasResults) when it passes no options or the same options as the last successful watch() during the current watch; other options send a query. It no longer refreshes a watched channel: use channel.reload(), and load other messages through channel.messagePaginator (jumpToMessage(), toTail(), toHead()). - A watch() while another with the same options is in flight joins it instead of sending a request. - Aborting requestOptions.signal ends only that caller's wait; the request is cancelled once every caller waiting for it has aborted. - Channel.ensureWatched() is removed (v10 release candidates only); call watch(). ``` ## Changelog - `Channel.watch()` resolves with the channel and sends no query for a channel already watched and loaded, unless it asks for options the current watch was not sent with. `Channel.ensureWatched()` is removed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ### Bug Fixes * channel list reconciliation ([#1942](#1942)) ([f7f9ec8](f7f9ec8)) * count hidden messages on each side of a jump page ([#1940](#1940)) ([487ac3d](487ac3d)) * **poll:** keep translations from poll.updated in the poll state ([#1937](#1937)) ([e47b75a](e47b75a)), closes [#1878](#1878) ### Refactors * call the paginator intervals intervals, not windows ([#1939](#1939)) ([69aa18a](69aa18a)) * **channel:** remove no-op overrides, dead branch and redundant id guards ([#1936](#1936)) ([050953e](050953e)), closes [#1870](#1870) * make Channel.watch() watch a channel only when it is not watched and loaded ([#1943](#1943)) ([3c363cb](3c363cb))
|
🎉 This PR is included in version 10.0.0-rc.25 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Description of the changes, What, Why and How?
Follow-up to GetStream/stream-chat-js#1926 (REACT-1075). The paginators store what they loaded as intervals (
Interval,itemIntervals,isHead/isTail), but many member names and comments called the same thing a "window". This PR uses one term. It has no behaviour changes and no public API changes: every renamed member is private or protected.Terms, defined once
BasePaginatorhas a doc comment defining interval, head / tail, active interval, anchored head interval and logical head / tail interval. It doesn't mention messages, since it is the base class.AGENTS.mdasks for "interval" over "window" and points to that doc comment.CLAUDE.md's paginator notes use the terms.Renames
All private or protected.
BasePaginatorscheduleWindowPublish()scheduleActiveIntervalPublish()BasePaginatorflushWindowPublish()flushActiveIntervalPublish()BasePaginatorwithSingleWindowPublish()withSingleActiveIntervalPublish()BasePaginatorisWindowPublishSuspendedisActiveIntervalPublishSuspendedBasePaginatorprojectActiveWindow()projectActiveInterval()BasePaginator_windowPublishThrottle_activeIntervalPublishThrottleBasePaginator_windowPublishSuspendDepth_activeIntervalPublishSuspendDepthBasePaginator_staleWindowState_staleActiveIntervalStateBasePaginatorslidOutOfHeadAnchoredWindowslidOutOfHeadAnchoredIntervalBasePaginatorrecordLoadedWindowQueryShape()recordLoadedIntervalQueryShape()MessagePaginatorisOwnSendWhileOlderWindowIsActive()isOwnSendWhileOlderIntervalIsActive()MessagePaginatorshowWindowOfOwnSend()showIntervalOfOwnSend()MessagePaginatorshowsNewestWindowshowsNewestIntervalMessageIntervalPaginatorreplaceWindowsWithNewestPage()replaceIntervalsWithNewestPage()MessageIntervalPaginatordropWindows()dropIntervals()MessageIntervalPaginatordroppedWindowsdroppedIntervalsMessageIntervalPaginatoringestPageAsHeadWindow()ingestPageAsHeadInterval()MessageIntervalPaginatorheadWindow,pageWindow,heldByAnotherWindow,window(s)(locals)headInterval,pageInterval,heldByAnotherInterval,interval(s)MessageIntervalPaginatorbelowWindowidsTailwardOfPageMessageIntervalPaginatorwindowLowTspageTailTsMessageIntervalPaginatorpruneBelowWindowIfReachedStart()removeIdsTailwardOfPageIfNothingOlder()MessageIntervalPaginatoranchorId,headId,head(in that method)pageTailId,headIdBeforeRequest,headAfterRequestMessageIntervalPaginator_belowWindowReconcile_pendingTailwardOfPageRemovalremoveIdsTailwardOfPageIfNothingOlderis named for what it does. When a reload of a head interval that was at the channel start returns a page missing its oldest messages, the page alone can't tell deleted messages from older ones it was too short to include. The method asks the server for one message older than the page's oldest. When there is none, it removes them and marks the head interval as the tail.Comments: about 320 "window"s in
src/comments now say "interval", "active interval" or "shown interval".Not included
seedLatestWindow,windowOf,MessagePaginatorWindowCap.test.ts).ai-docs/v10-breaking-changes.md, which describes behaviour to integrators.Checks
yarn typesandyarn lintpass. Prettier flags only untracked local files.yarn test: 4740 pass. The 1 failure isnotificationTypes.test.ts, which depends on untracked local files and fails onrelease-v10too.Changelog
🤖 Generated with Claude Code