Fix suggested followup: preserve HTML formatting and fix response ordering#85592
Open
marcochavezf wants to merge 2 commits intomainfrom
Open
Fix suggested followup: preserve HTML formatting and fix response ordering#85592marcochavezf wants to merge 2 commits intomainfrom
marcochavezf wants to merge 2 commits intomainfrom
Conversation
…nse ordering Bug A: Use dom-serializer render() instead of DomUtils.textContent() to preserve HTML formatting in followup responses. Add isHTML parameter to buildOptimisticAddCommentReportAction to skip getParsedComment() when input is already HTML. Bug B: Add createdOffset: 1 to the Concierge response so its timestamp is 1ms after the question, ensuring correct ordering. The visual typing delay is handled separately by displayAfter in addOptimisticConciergeActionWithDelay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Use stripFollowupListFromHtml in setClipboardMessage so that <followup-list> Q&A content is removed before copying to clipboard. This re-applies the clipboard stripping from PR 84452 which was reverted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
trjExpensify
left a comment
There was a problem hiding this comment.
Bug fixes for the conversional onboarding project! 👍
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-19.at.09.57.35.movAndroid: mWeb ChromeScreen.Recording.2026-03-19.at.09.47.34.moviOS: HybridAppScreen.Recording.2026-03-19.at.09.54.58.moviOS: mWeb SafariScreen.Recording.2026-03-19.at.09.37.53.movMacOS: Chrome / SafariScreen.Recording.2026-03-19.at.09.30.24.mov |
dukenv0307
approved these changes
Mar 19, 2026
|
🎯 @dukenv0307, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #85728. |
Contributor
|
@marcochavezf We got the failed test, can you please take a look? |
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.
Explanation of Change
Fixes three bugs with suggested followup button clicks:
Bug A — Collapsed formatting in optimistic Concierge response:
parseFollowupsFromHtml()usedDomUtils.textContent()to extract<followup-response>content, which strips all HTML tags. This caused the optimistic Concierge response to appear as plain text without formatting. Fixed by usingdom-serializer'srender()to preserve the inner HTML. Also added anisHTMLparameter tobuildOptimisticAddCommentReportActionso it skipsgetParsedComment()(markdown-to-HTML conversion) when the input is already HTML.Bug B — Response appears before question: The Concierge response had no
createdOffset, defaulting to 0 (same timestamp as the question). This caused a race where the response could render before the question. Fixed by addingcreatedOffset: 1(1ms after the question) to ensure correct chronological ordering. The 4-second visual delay is handled separately bydisplayAfterinaddOptimisticConciergeActionWithDelay.Bug C — Followup Q&A leaks into clipboard copy: When copying a Concierge message that contains
<followup-list>elements, the followup questions and answers were included in the clipboard text. Fixed by callingstripFollowupListFromHtml()insetClipboardMessage()(inContextMenuActions.tsx) to remove followup content before it reaches the clipboard. This re-applies the clipboard stripping from the reverted PR 84452.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/612990
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A - no UI changes, only logic fix for HTML preservation and timestamp ordering
Android: mWeb Chrome
N/A - no UI changes, only logic fix for HTML preservation and timestamp ordering
iOS: Native
N/A - no UI changes, only logic fix for HTML preservation and timestamp ordering
iOS: mWeb Safari
N/A - no UI changes, only logic fix for HTML preservation and timestamp ordering
MacOS: Chrome / Safari
N/A - no UI changes, only logic fix for HTML preservation and timestamp ordering