Skip to content

fix(llc, core): port e2e-suite thread fix and disposed-channel sort crash to v9 - #2893

Merged
xsahil03x merged 7 commits into
v9from
port/master-to-v9/FLU-668-686-692_e2e-fixes-and-channel-sort
Aug 14, 2026
Merged

fix(llc, core): port e2e-suite thread fix and disposed-channel sort crash to v9#2893
xsahil03x merged 7 commits into
v9from
port/master-to-v9/FLU-668-686-692_e2e-fixes-and-channel-sort

Conversation

@xsahil03x

@xsahil03x xsahil03x commented Aug 14, 2026

Copy link
Copy Markdown
Member

Submit a pull request

Linear: FLU-668, FLU-692

Github Issue: #

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested

Description of the pull request

Ports two master PRs to v9 on one branch:

  • #2874 (66ae984f8) — "fix(llc, ui): Issues found by the e2e suites"
  • #2887 (cb43fc417) — "fix(core): sort channels with disposed state last instead of crashing"

Each fix was checked against v9 rather than ported blindly:

Fix v9 Ported
FLU-668getReplies adds the parent to the thread's replies has the bug
FLU-692 — local sort null-asserts on a disposed channel has the bug
FLU-686 — channel-list row previews another channel's message has the bug master only, by choice
FLU-669 — thread-reply label reads "1 replies", unlocalized not affected ❌ n/a

FLU-668 — parent message kept out of thread replies

v9's updateThreadInfo is structured differently from master's (no _mergeMessagesIntoExisting; two paths converging on messagesToMerge), so this is hand-applied rather than cherry-picked. The parent is filtered out before the upsert: false branch narrows to already-loaded replies, so that branch's isEmpty early-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!.channelState null-assert. Conflicts were indentation-only (v9's 80-col short style) plus the changelog.

Not ported

FLU-686 (_ChannelLastMessageTextState preview-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_flutter in this PR is byte-identical to v9.

FLU-669 genuinely does not apply: v9 already reads the label from context.translations.threadReplyCountText in message_widget/bottom_row.dart. The hardcoded '$replyCount replies' that #2874 fixes lives in message_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:

Fix Test Without the fix
FLU-668 `.getReplies` keeps the parent message out of the thread fails: Expected: <3> Actual: <4>
FLU-692 local sort places channels with disposed state last… fails: _TypeError: Null check operator used on a null value
stream_chat              1307 passed / 2 skipped   analyze clean   format clean
stream_chat_flutter_core   20 passed (controller)   analyze clean   format clean

stream_chat is at 1307 rather than the 1303 this branch produced before the latest v9 merge — the merge brought in the four mark-read tests from #2891, which landed on v9 in the meantime.

Screenshots / Videos

No UI changes — stream_chat_flutter is untouched relative to v9.

🤖 Generated with Claude Code

testableapple and others added 2 commits August 14, 2026 13:28
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>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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 Plus

Run ID: 67bee1c5-e24e-4f9c-8baa-b22962198aad

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

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.

xsahil03x and others added 4 commits August 14, 2026 15:37
…-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>
Keeping that fix on master only. Reverts `stream_chat_flutter` to v9 as-is;
the FLU-668 (llc) and FLU-692 (core) fixes are unaffected.

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>
@xsahil03x xsahil03x changed the title fix(llc, core, ui): port e2e-suite fixes and disposed-channel sort crash to v9 fix(llc, core): port e2e-suite thread fix and disposed-channel sort crash to v9 Aug 14, 2026
…-686-692_e2e-fixes-and-channel-sort

# Conflicts:
#	packages/stream_chat/CHANGELOG.md
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v9@e7e4ebe). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xsahil03x
xsahil03x merged commit fe5c6c9 into v9 Aug 14, 2026
26 checks passed
@xsahil03x
xsahil03x deleted the port/master-to-v9/FLU-668-686-692_e2e-fixes-and-channel-sort branch August 14, 2026 14:02
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.

3 participants