feat!: move to timestamps in response models - #3278
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Five render paths called the unguarded nsToDate and then .toISOString() on
the result, which throws RangeError for a non-finite value. The only
ErrorBoundary in src is used solely by renderText, so the throw unmounted the
whole channel list, thread list, or pinned/files pane. They now use the
guarded convertTimestampToDate.
- Geolocation: arm the stop-sharing timer in steps, since setTimeout clamps any
delay past 2^31-1 ms (~24.9 days) to 1 ms and showed "sharing ended" on mount
for a longer share. Also adds the unmount cleanup the effect was missing.
- insertIntro: put the intro at the top when no message is older than the
position. Falling through the loop dropped it entirely, which is what
headerPosition={0} did. Updates the two tests that encoded that behaviour,
including one whose assertion could not tell a dropped intro from a moved one.
- MessageEditedIndicator and ChannelListItem: convert the two epoch guards left
as truthiness, which disagreed with the early return and the Pin/Unpin
button's own guard in the same components.
|
Size Change: +1.68 kB (+0.21%) Total Size: 823 kB 📦 View Changed
ℹ️ View Unchanged
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-v15 #3278 +/- ##
==============================================
Coverage ? 84.90%
==============================================
Files ? 520
Lines ? 15450
Branches ? 4938
==============================================
Hits ? 13118
Misses ? 2332
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Relevant stream-chat-js PR: GetStream/stream-chat-js#1849
Breaking changes
MessageListProps.headerPositionis now nanosecondsChatContextValue. latestMessageDatesByChannelsrecord now stores nanoseconds instead of DatesVirtualizedMessageListProps. lastReadDateis now nanoseconds instead of DateProcessMessagesContext.lastReadis now nanoseconds instead of DateProcessMessagesParams.lastReadis now nanoseconds instead of DateThe change can produce runtime errors not caught by TS compiler; integrators should check their code for these potential issues: