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
{{ message }}
Repository navigation
[Due for payment 2025-11-03] [Due for payment 2025-10-27] [Due for payment 2025-10-22] [Due for payment 2025-10-06] [$250] Chat - Message sent is not shown correctly in LHN #60746
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorInternalRequires API changes or must be handled by Expensify staffWeeklyKSv2
Version Number: 9 1.32-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):Slottwo1555d@gmail.com Issue reported by: Applause - Internal Team
It was all added because of a BE bug where the lastMessageText contains HTML, even though it should only contain plain text. So to fix it, we patch it on the FE by converting the lastMessageText to text. But because of this, if the user sends HTML as a plain text, the LHN won't be able to show it.
What changes do you think we should make in order to solve the problem?
This is actually the same issue as #43563, and I suggest to removes the FE patch and properly fix it on the BE.
If we can't fix the BE, still remove the patch, but instead of returning the lastMessageText, we can parse the lastMessageHtml to text.
changed the title [-]Chat - Message sent is not shown correctly in LHN[/-][+][$250] Chat - Message sent is not shown correctly in LHN[/+]on Apr 25, 2025
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: No offending PR in this repo.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
changed the title [-][Due for payment 2025-10-27] [Due for payment 2025-10-22] [Due for payment 2025-10-06] [$250] Chat - Message sent is not shown correctly in LHN[/-][+][Due for payment 2025-11-03] [Due for payment 2025-10-27] [Due for payment 2025-10-22] [Due for payment 2025-10-06] [$250] Chat - Message sent is not shown correctly in LHN[/+]on Oct 27, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.38-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@bernhardoj / @QichenZhu@abekkala The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorInternalRequires API changes or must be handled by Expensify staffWeeklyKSv2
Activity
melvin-bot commentedon Apr 23, 2025
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.bernhardoj commentedon Apr 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Message is not shown correctly on the LHN.
What is the root cause of that problem?
When we send an HTML to a chat, it will be converted to text.
App/src/components/LHNOptionsList/OptionRowLHN.tsx
Line 310 in e1e89c9
App/src/libs/SidebarUtils.ts
Line 643 in e1e89c9
App/src/libs/OptionsListUtils.ts
Line 599 in e1e89c9
It was all added because of a BE bug where the
lastMessageTextcontains HTML, even though it should only contain plain text. So to fix it, we patch it on the FE by converting thelastMessageTextto text. But because of this, if the user sends HTML as a plain text, the LHN won't be able to show it.What changes do you think we should make in order to solve the problem?
This is actually the same issue as #43563, and I suggest to removes the FE patch and properly fix it on the BE.
If we can't fix the BE, still remove the patch, but instead of returning the
lastMessageText, we can parse thelastMessageHtmlto text.App/src/libs/OptionsListUtils.ts
Line 807 in e1e89c9
Parser.htmlToText(lastMessageHtml)This is at least semantically(?) correct, convert HTML to text. Previously, we converted a text that could contain HTML to text.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
I think we can test
getLastMessageTextForReport, give it a dummy DM report withlastMessageHtmland assert the results is the converted HTML to text.[-]Chat - Message sent is not shown correctly in LHN[/-][+][$250] Chat - Message sent is not shown correctly in LHN[/+]melvin-bot commentedon Apr 25, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021915821361423926706
melvin-bot commentedon Apr 25, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @QichenZhu (
External)melvin-bot commentedon Apr 29, 2025
@QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
QichenZhu commentedon Apr 29, 2025
@bernhardoj thanks for the proposal.
About the first solution (fixing this in both FE and BE):
<, shouldlastMessageTextbe<or<? It currently returns<:125 remaining items
abekkala commentedon Oct 22, 2025
PAYMENT SUMMARY FOR OCT 27
please complete checklist
QichenZhu commentedon Oct 27, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: No offending PR in this repo.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/561655
Regression Test Proposal
Test:
<div>test</div>)Additional tests:
A. Moved expense to self DM
B. Failed to integrate accounting
C. Move IOU report to workspace
D. Move expense to another report
E. Submit expense with markdown description
F. Submit expense with multiline description
Do we agree 👍 or 👎
abekkala commentedon Oct 27, 2025
PAYMENT SUMMARY FOR OCT 27
Thanks! 🎉
bernhardoj commentedon Oct 27, 2025
Requested in ND.
[-][Due for payment 2025-10-27] [Due for payment 2025-10-22] [Due for payment 2025-10-06] [$250] Chat - Message sent is not shown correctly in LHN[/-][+][Due for payment 2025-11-03] [Due for payment 2025-10-27] [Due for payment 2025-10-22] [Due for payment 2025-10-06] [$250] Chat - Message sent is not shown correctly in LHN[/+]melvin-bot commentedon Oct 27, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 27, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.38-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-11-03. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Oct 27, 2025
@bernhardoj / @QichenZhu @abekkala The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
quinthar commentedon Nov 2, 2025
$250 approved to @bernhardoj