Skip to content

5.1.1 Release#4087

Closed
Stream-SDK-Bot wants to merge 8 commits intomainfrom
release/5.1.1
Closed

5.1.1 Release#4087
Stream-SDK-Bot wants to merge 8 commits intomainfrom
release/5.1.1

Conversation

@Stream-SDK-Bot
Copy link
Copy Markdown
Collaborator

StreamChat

🐞 Fixed

  • Fix image cache misses caused by non-deterministic caching keys in StreamCDNRequester #4075
  • Fix ChatChannel.latestMessages being wiped on mid-page pagination #4077
  • Fix CurrentUserController.setPushPreference and snoozePushNotifications not updating the local push preference state #4085

StreamChatUI

🐞 Fixed

  • Fix channel list preview showing "No messages" after a mid-page jump #4077
  • Fix layout shift on delivery-status transitions in message footer #4078

Stream Bot and others added 8 commits April 23, 2026 18:14
…4077)

* Fix jumping to mid page impacting channel.latestMessages which is now used for channel previews

* Fix on loading first page while channel is in mid-page, showing the mid-page messages

* Update CHANGELOG

* Update CHANGELOG.md

* Apply mid-page state cleanup to Chat state layer

Move cleanStaleMidPageStateIfNeeded from ChatChannelController to ChannelUpdater
(callback + async overloads) and call it from Chat.get(watch:) so the async-await
state layer gets the same flicker-prevention as the controller layer.

* Refresh message observers when channel page bounds change

After a mid-page jump no longer wipes `channel.messages`, the message
observers' predicate (which filters by `channel.oldestMessageAt` /
`channel.newestMessageAt`) needs to be re-evaluated against rows that
were already in the FRC results. Core Data does not propagate parent
property changes to child rows, so we nudge each linked message with a
no-op KVO change, which makes the FRC re-test the predicate and drop
out-of-bounds messages from the observed page.

* Add regression test for FRC bounds-change in mid-page jump

Reproduces the bug at the same `BackgroundListDatabaseObserver` layer
that powers `ChatChannelController.messages`: after a mid-page jump
shrinks the channel's page bounds, previously-cached newest messages
must drop out of the active page even though they remain linked to
the channel for `channel.latestMessages`/preview purposes.

Verified the test fails (10 instead of 5 observed) when the touch nudge
in `ChannelUpdater.update` is removed, and passes once it's restored.

* Move FRC nudge for page-bounds changes into ChannelDTO.willSave

Mirrors the existing `truncatedAt` precedent: any change to the channel's
message-page bounds (`oldestMessageAt` / `newestMessageAt`) marks the
linked messages dirty so NSFetchedResultsController re-evaluates its
predicate. This keeps the workaround centralized in the DTO layer and
covers every path that mutates the bounds (including future ones),
removing the ad-hoc bookkeeping previously added to ChannelUpdater.update.

* Tighten latestMessages assertion to ordered ID sequence

Replaces the loose first-only + prefix checks with a single equality
against the full expected `latest-0, latest-1, ...` sequence, so the
test verifies ordering and per-index correspondence in one shot.

* Hide stale mid-page cleanup inside ChannelUpdater.update

Folds the cleanup helper into a synchronous prelude that `update` runs
before dispatching the request. Uses `writableContext.performAndWait`
so any database observers the caller starts in parallel with the
network call see a clean cache. The fast path (no first-page fetch /
no stale state) stays free of any DB write.

`ChatChannelController.synchronize` and `Chat.get(watch:)` collapse
back to a single `update` call. The helper is kept as a discrete
internal method so its four behaviors (clear / skip-no-state /
skip-recovery / skip-pagination) can be unit-tested directly without
driving a full update round-trip.

The ChannelController-level cleanup tests are dropped because the
controller suite uses a mocked updater and can no longer observe the
embedded behavior; coverage moves to ChannelUpdater_Tests where the
real updater runs end-to-end.

* Remove unnecessary comments

* Move private functions

* Remove unnecessary double check

* Drive cleanup tests through update() to keep helper private

The four stale mid-page cleanup tests called the helper directly, which
prevented marking it private. Drive them through the public update()
entry point instead — the cleanup runs synchronously at the top of
update() before the network request reaches the API spy, so the same
seed → call → read → assert pattern works end-to-end.
)

* Fix layout shift on delivery-status transitions in message footer

The receipt indicator's `imageView` had no size constraint, so it sized
itself to each icon's intrinsic dimensions. The new icons shipped in v5
are inconsistent (`message_receipt_sent` is 20×20 while
`message_receipt_read` and `message_receipt_failed` stayed at 16×16),
which caused the footer stack view to reflow whenever the delivery
status changed - producing a visible spacing change on
`sent → delivered → read` transitions.

Pin the imageView to a fixed `checkmarkSize` (16×16 by default,
overridable) so the indicator's footprint stays stable regardless of
the underlying asset's intrinsic size.

* Update CHANGELOG

* Update CHANGELOG.md

* [CI] Snapshots (#4079)

---------

Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com>
@Stream-SDK-Bot Stream-SDK-Bot requested a review from a team as a code owner May 6, 2026 07:48
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9222898b-7865-4880-b485-dd6867966331

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/5.1.1

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Public Interface

- public struct EmptyResponse: Decodable, Sendable

 open class ChatMessageDeliveryStatusCheckmarkView: _View, ThemeProvider  
-   
+   open var checkmarkSize: CGSize
- 
+   
-   override open func setUpAppearance()
+ 
-   override open func setUpLayout()
+   override open func setUpAppearance()
-   override open func updateContent()
+   override open func setUpLayout()
-   
+   override open func updateContent()
- 
+   
-   public struct Content  
+ 
-   
+   public struct Content  
-     public var deliveryStatus: MessageDeliveryStatus
+   
+     public var deliveryStatus: MessageDeliveryStatus

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Build for regression testing №123457133 has been uploaded to TestFlight 🎁

@Stream-SDK-Bot
Copy link
Copy Markdown
Collaborator Author

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 6.68 ms 33.2% 🔼 🟢
Duration 2.6 s 2.52 s 3.08% 🔼 🟢
Hitch time ratio 4 ms per s 2.66 ms per s 33.5% 🔼 🟢
Frame rate 75 fps 78.72 fps 4.96% 🔼 🟢
Number of hitches 1 0.6 40.0% 🔼 🟢

@Stream-SDK-Bot
Copy link
Copy Markdown
Collaborator Author

SDK Size

title previous release current release diff status
StreamChat 6.74 MB 6.75 MB +17 KB 🟢
StreamChatUI 4.25 MB 4.25 MB 0 KB 🟢
StreamChatCommonUI 0.8 MB 0.8 MB 0 KB 🟢

@Stream-SDK-Bot
Copy link
Copy Markdown
Collaborator Author

StreamChat XCSize

Object Diff (bytes)
StreamCDNRequester.o +5660
ChannelUpdater.o +1453
StreamCore.o +1254
CurrentUserUpdater.o +446
ChannelController.o -376
Endpoint.o -314
ChannelDTO.o +184
CurrentUserController.o -92

@Stream-SDK-Bot
Copy link
Copy Markdown
Collaborator Author

StreamChatUI XCSize

Object Diff (bytes)
ChatMessageDeliveryStatusCheckmarkView.o +480
ChatChannelAvatarView.o +112

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@laevandus laevandus closed this May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants