[HOLD] Send HTML for bespokeWelcomeMessage to fix formatting on followup arrival#85127
[HOLD] Send HTML for bespokeWelcomeMessage to fix formatting on followup arrival#85127marcochavezf wants to merge 2 commits intomainfrom
Conversation
The frontend was sending raw markdown as the bespokeWelcomeMessage param to the backend, but the backend passes it to the LLM as HTML for AddComment. This caused formatting to break when the server response replaced the optimistic render. Now we call getParsedComment() on the bespoke message before sending it, matching the HTML format that the optimistic action already uses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@hoangzinh 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] |
…edComment call Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-13.at.06.19.30.moviOS: HybridAppScreen.Recording.2026-03-13.at.06.28.56.moviOS: mWeb SafariScreen.Recording.2026-03-13.at.06.24.53.mov |
|
@marcochavezf The code looks good to me. However, for the testing step, we should note for QA that using email without "+" to generate the Lines 12290 to 12299 in 8f773d3 |
Thanks for catching that, I updated the test steps |
|
@madmax330 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] |
|
🎯 @hoangzinh, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #85148. |
|
After testing again I realized we need to update the backend for this case |
|
BE PR in review https://github.com/Expensify/Web-Expensify/pull/51367 |


Explanation of Change
The frontend creates the bespoke welcome message as markdown via
getBespokeWelcomeMessage(), converts it to HTML viagetParsedComment()for the optimistic render, but was sending the raw markdown to the backend as thebespokeWelcomeMessageAPI param. The backend passes this to the LLM as "html" verbatim. When the server response came back, the message had plain\ninstead of<br>tags, causing formatting to break momentarily until re-render.This PR sends the already-parsed HTML (from
getParsedComment()) as thebespokeWelcomeMessageparam, so the backend receives actual HTML and passes it through correctly. The optimistic action continues to work the same since it already uses the HTML version internally.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/610148
Tests
suggestedFollowupsbeta enabled (let's use the@dmb.fundomain without+)Offline tests
N/A - This change affects the API parameter format, which only matters when online.
QA Steps
Same as tests
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari