refactor(llc): extract the message merge algebra into MessageMerging - #2944
Draft
VelikovPetar wants to merge 7 commits into
Draft
refactor(llc): extract the message merge algebra into MessageMerging#2944VelikovPetar wants to merge 7 commits into
VelikovPetar wants to merge 7 commits into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
This was referenced Sep 7, 2026
VelikovPetar
force-pushed
the
refactor/FLU-724_extract_message_merging
branch
3 times, most recently
from
September 7, 2026 12:00
e7b3951 to
f0b00f1
Compare
…mutations Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…annel directory Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
VelikovPetar
force-pushed
the
refactor/FLU-724_extract_message_merging
branch
from
September 7, 2026 18:17
f0b00f1 to
655430a
Compare
3 tasks
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
VelikovPetar
force-pushed
the
refactor/FLU-724_extract_message_merging
branch
from
September 7, 2026 19:31
655430a to
d9cb260
Compare
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.
Submit a pull request
Linear: FLU-724
Github Issue: #
CLA
Important
#2930 and #2942 are merged. Still depends on #2943 — merge that first, after which this PR's diff reduces to the five files below.
Replaces #2913, which could not be rebased: 99% of its
channel.dartdiff (281 of 282 lines) was inside the block #2930 moved intochannel_client_state.dart.channel_client_state.dartnow lives atsrc/client/channel/.message_merging.dartandmessage_predicates.dartstay undersrc/core/util/, since they are channel-agnostic.Description of the pull request
Moves the pure message/pin/live-location merge and removal operations (formerly private on
ChannelClientState) verbatim into a new unexported static holderMessageMergingunderlib/src/core/util/, following theMessageRulesprecedent. The two message predicates (isShownInChannelandhasValidPin, formerly the top-level_pinIsValidand inline filters) live in a separate unexportedMessagePredicatesextension onMessage.channel_client_state.dartare requalified (16MessageMerging.*calls, 4MessagePredicatesusages); the stateful orchestrators and persistence writes stay put.identical()guard.message_merging_test.dartandmessage_predicates_test.dart) covering the merge semantics directly, including previously untested pin-expiry filtering and the thread phantom-guard / empty-thread-pruning rules.lib/stream_chat.dartuntouched); no CHANGELOG entry since there is no observable behavior change.ChannelClientStatedrops from 1,272 to 1,032 lines, and all nine of the private merge/removal helpers are gone.Test instructions:
cd packages/stream_chat && dart test— full package suite passes (1,855 tests), including the existing through-state merge characterization and #2942's event coverage.Groundwork for the v11 shared merge-semantics rail.
Follow-up worth considering
MessagePredicatesis now the natural home for other message predicates that remain inline in the channel state. Not done here to keep the diff a faithful re-derivation.Screenshots / Videos
No UI changes.
🤖 Generated with Claude Code