Add updateMessage handler on ThreadStorage#790
Open
AbhinRustagi wants to merge 15 commits into
Open
Conversation
AbhinRustagi
marked this pull request as ready for review
July 20, 2026 20:18
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014dhkQ1Qd2zcgcbvH57eD1K
This was referenced Jul 22, 2026
abhithesys
previously approved these changes
Jul 22, 2026
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.
What
Fixes TH-2025.
updateMessagemethod on theThreadStorageinterface.replaceMessageIdonprocessStreamedMessagewhich earlier generated a client-side UUID for each message for the render session. However, it does not replace it with the server-side generated ID until the data is restored from the API. Because of that, during render, aupdateMessagewould result in a 404 since the message IDs don't match. The function replaces the ID during streaming as soon as theTEXT_MESSAGE_STARTevent is received which carries the server generated message ID.GenUIAssistantMessage.tsxwhich would check if the last persisted message matches the current and avoids refiring the updateMessage flow since theonStateUpdateis called by the function itself and by store subscription as well).Checklist