Odie: stop duplicating pre-escalation messages in escalated chats - #113945
Merged
Conversation
|
WordPress.com
Automattic for Agencies
|
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Async-loaded Components (~19 bytes added 📈 [gzipped]) Details
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. |
escapemanuele
marked this pull request as ready for review
September 1, 2026 12:29
An escalated chat is rebuilt by concatenating the Odie history with the Zendesk conversation. To survive a reconnect, the merge also carried over every message the user had sent, taken from the previous chat state — but that state is itself a merged list, so the carry-over picked up the Odie messages the same merge had just re-read from the Odie chat. Deduplication runs only within the Zendesk half, so the two copies never met and every message sent before escalation rendered twice. Carry over only messages the user sent through Zendesk, which is what the reconnect recovery was for: those are the ones the composer marks with a `temporary_id`, and the Odie half never has one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
escapemanuele
force-pushed
the
fix/help-center-duplicate-user-message
branch
from
September 1, 2026 12:30
ac521ae to
842e7b2
Compare
escapemanuele
commented
Sep 1, 2026
|
Looks like one of the E2E tests has failed. You can fix them following these steps:
|
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.
Fixes https://linear.app/a8c/issue/DOTSUP-541/help-center-user-messages-render-twice-in-escalated-conversations
Proposed Changes
A chat that started with the AI and moved to a Happiness Engineer no longer shows the earlier messages twice.
Why are these changes being made?
A chat that gets escalated is displayed by stitching two halves together: what the user said to the AI, then what happened with the Happiness Engineer. Every time the chat reconnects it is stitched again, and each pass re-added the questions from the first half on top of themselves — so a question the user asked once appeared twice, one bubble under the other (DOTSUP-541).
Testing Instructions
yarn start, open the Help Center and ask the AI assistant a question.