feat!: remove response date transform - #1849
Merged
Merged
Conversation
This was referenced Aug 31, 2026
szuperaz
marked this pull request as ready for review
September 1, 2026 07:46
szuperaz
requested review from
MartinCupela,
isekovanic,
oliverlaz,
santhoshvai and
vishalnarkhede
as code owners
September 1, 2026 07:46
Server-sent dates are unix-nanosecond numbers now, and several call sites guarded only for nullish, which admits NaN and a leftover ISO string. - LiveLocationManager: arm the stop-sharing timer in steps. setTimeout clamps any delay past 2^31-1 ms (~24.9 days) to 1 ms, so a longer share unregistered itself on the next tick, and only a minimum share duration is enforced. Also replaces the unsound cast to the end_at-required overlay with a narrowing predicate, since end_at is optional on the wire. - MessageReceiptsTracker: check Number.isFinite in isValidReadState, matching the sibling that already did. A non-finite last_read resolved to the newest loaded message via locateMessage, reporting the whole channel as read. - MessagePaginator: skip the created_at_around query for a non-finite lastReadAt, which otherwise went out as created_at_around: null. The epoch stays a valid boundary. - client._normalizeExpiration: throw when a numeric offset does not resolve to a representable date, rather than an opaque RangeError from toISOString(). - thread: route the read-state timestamp fallbacks through a finiteness check. Adds 13 regression tests, each verified to fail when its fix is reverted, and migrates the LiveLocationManager fixtures off ISO strings so the suite exercises the wire unit.
oliverlaz
approved these changes
Sep 3, 2026
|
🎉 This PR is included in version 10.0.0-rc.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
szuperaz
added a commit
to GetStream/stream-chat-react
that referenced
this pull request
Sep 3, 2026
Relevant stream-chat-js PR: GetStream/stream-chat-js#1849 ## Breaking changes - `MessageListProps.headerPosition` is now nanoseconds - `ChatContextValue. latestMessageDatesByChannels` record now stores nanoseconds instead of Dates - `VirtualizedMessageListProps. lastReadDate` is now nanoseconds instead of Date - `ProcessMessagesContext.lastRead` is now nanoseconds instead of Date - `ProcessMessagesParams.lastRead` is now nanoseconds instead of Date The change can produce runtime errors not caught by TS compiler; integrators should check their code for these potential issues: ``` # the idioms that now fail silently grep -rn "isDate(\|instanceof Date\|\.getTime?\?\.\?(\|as string | Date" src # raw timestamps interpolated into translations grep -rn "t(.*timestamp\|t(.*date" src # every surviving `new Date(x)` with an argument grep -rn "new Date([^)]" src ``` --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com>
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.
Breaking changes
Datetonumber(nanosecond timestamp).addModeratorsanddemoteModeratorsmethods. Setting a user's role is not possible on the client side; a recent open API fix removed the unnecessary fields from code.The change can produce runtime errors not caught by TS compiler; integrators should check their code for these potential issues: