You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug fix for message quoting that captures the current message state using rememberUpdatedState to prevent stale message data from being passed to the reply callback when messages are edited.
Changes
Cohort / File(s)
Summary
Documentation CHANGELOG.md
Added changelog entry documenting the fix for quoted messages showing outdated text
State Capture Fix stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageItem.kt
Added rememberUpdatedState import and implemented state capture for replyMessage to ensure the onReply callback in SwipeToReply references the current message value instead of a potentially stale closure
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
🐰 A message once quoted, now fresh as spring dew, No staleness lingers when edits break through, With remembered state keeping replies so true, The chat flows like carrots—forever brand new! 🥕✨
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Title check
✅ Passed
The PR title clearly and concisely summarizes the main bug fix: preventing outdated message text when quoting edited messages.
Description check
✅ Passed
The PR description includes the goal, implementation details, UI changes with before/after videos, and testing steps. However, it is missing the contributor checklist section.
Linked Issues check
✅ Passed
The code changes directly address the linked issue AND-1032 by using rememberUpdatedState to capture the latest message value in the onReply lambda, ensuring edited messages are quoted with current text.
Out of Scope Changes check
✅ Passed
All changes are directly related to fixing the quoting of edited messages: CHANGELOG.md entry added and MessageItem.kt modified to remember updated message state for the onReply callback.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
📝 Generate docstrings
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.
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
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.
🎯 Goal
Quoting an edited message (in the current session) results in the quoted content showing and outdated version of the message.
Resolves: https://linear.app/stream/issue/AND-1032
🛠 Implementation details
Remember the
Messageto ensure updated values are captured in theonReplylambda🎨 UI Changes
before.mp4
after.mp4
🧪 Testing
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.