fix(llc, core): port e2e-suite thread fix and disposed-channel sort crash to v9 - #2893
Conversation
Ports the two applicable fixes from #2874 to v9. `ChannelClientState.updateThreadInfo` no longer merges the parent message into a thread's reply list. A backend returning the root alongside the replies made the thread render it twice, since the parent is drawn from its own copy. `ChannelLastMessageText` drops its preserved last-known message when the row is rebound to a different channel, or when `lastMessagePredicate` stops accepting the cached message. List rows are unkeyed, so a reorder rebinds the same State to another channel and the cache could surface the previous channel's message as the fallback for an empty, not-yet-up-to-date one. FLU-669 from that PR does not apply: v9 already reads the thread-reply label from `threadReplyCountText`; the hardcoded string it fixes was introduced by master's design refresh. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
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: Pro Plus 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 |
…-686-692_e2e-fixes-and-channel-sort # Conflicts: # packages/stream_chat/CHANGELOG.md # packages/stream_chat_flutter/CHANGELOG.md
Private members take // block comments in this repo, not ///. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
devtools_options.yaml and swiftpm Package.resolved are generated by a local pub get; they were swept into the previous commit by a broad git add. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…-686-692_e2e-fixes-and-channel-sort # Conflicts: # packages/stream_chat/CHANGELOG.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v9 #2893 +/- ##
=====================================
Coverage ? 67.30%
=====================================
Files ? 431
Lines ? 27393
Branches ? 0
=====================================
Hits ? 18438
Misses ? 8955
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Submit a pull request
Linear: FLU-668, FLU-692
Github Issue: #
CLA
Description of the pull request
Ports two master PRs to
v9on one branch:66ae984f8) — "fix(llc, ui): Issues found by the e2e suites"cb43fc417) — "fix(core): sort channels with disposed state last instead of crashing"Each fix was checked against v9 rather than ported blindly:
getRepliesadds the parent to the thread's replies"1 replies", unlocalizedFLU-668 — parent message kept out of thread replies
v9's
updateThreadInfois structured differently from master's (no_mergeMessagesIntoExisting; two paths converging onmessagesToMerge), so this is hand-applied rather than cherry-picked. The parent is filtered out before theupsert: falsebranch narrows to already-loaded replies, so that branch'sisEmptyearly-return still guards against creating a thread entry from nothing.FLU-692 — disposed channels sort last
Clean cherry-pick of
cb43fc417; v9 has the identical(it) => it.state!.channelStatenull-assert. Conflicts were indentation-only (v9's 80-col short style) plus the changelog.Not ported
FLU-686 (
_ChannelLastMessageTextStatepreview-cache guards) — v9 does have this bug, and the guards were prepared and verified here, but we're deliberately keeping the fix on master only.stream_chat_flutterin this PR is byte-identical tov9.FLU-669 genuinely does not apply: v9 already reads the label from
context.translations.threadReplyCountTextinmessage_widget/bottom_row.dart. The hardcoded'$replyCount replies'that #2874 fixes lives inmessage_widget/stream_message_item.dart, a file that only exists on master — it came in with the design refresh.Testing
Verified with v9's pinned toolchain (Flutter 3.27.4 / Dart 3.6.2 per
.fvmrc), not a newer local SDK — a newer one restyles whole files.Both fixes were mutation-checked by reverting the production change and confirming the matching test fails:
`.getReplies` keeps the parent message out of the threadExpected: <3> Actual: <4>local sort places channels with disposed state last…_TypeError: Null check operator used on a null valuestream_chatis at 1307 rather than the 1303 this branch produced before the latestv9merge — the merge brought in the four mark-read tests from #2891, which landed onv9in the meantime.Screenshots / Videos
No UI changes —
stream_chat_flutteris untouched relative tov9.🤖 Generated with Claude Code