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-05-28] [Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info. #59566
Version Number: 9.1.22-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both 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):ibellicotest+484@gmail.com Issue reported by: Applause Internal Team Device used: Motorola MotoG60 - Android 12 - Chrome / Windows 10 - Chrome App Component: Left Hand Navigation (LHN)
Action Performed:
Open the staging.new.expensify.com website.
Tap on FAB and select "Start Chat"
Select an user to start a chat with.
Once redirected to the new chat, tap on the "+" button.
Select the "Pay" option.
Add an amount and complete the payment creation flow.
Return to LHN.
Check the message displayed on chat preview.
Expected Result:
After sending a payment to another user, chat preview on LHN, should only display the name of the user who sent the payment, before the amount information.
Actual Result:
After sending a payment to another user, chat preview on LHN shows "You" and also the name of the user before the payment information.
That cause to have the "You" as well as payer name in alternate text
Because we don't have action type lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW in getOptionData function
What changes do you think we should make in order to solve the problem?
We should add add lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW check here
This will keep the LastActorDisplayName You but remove payerName from alternate text Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Explanation: This change ensures that if the message is in a DM and the translation key is iou.payerPaidAmount (used for payment previews), we omit the payer’s name. This avoids redundant information when the sender is the current user. The "You: " prefix is already correctly handled in SidebarUtils.ts.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Render SidebarLinks for a DM conversation where the most recent message is of type REPORTPREVIEW, and verify that:
If the current user sent the payment, the preview shows You: paid 12$
If another user sent the payment, the preview shows paid 12$
What alternative solutions did you explore? (Optional)
changed the title [-][Due for payment 2025-05-05] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/-][+][Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/+]on May 16, 2025
changed the title [-][Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/-][+][Due for payment 2025-05-28] [Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/+]on May 21, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.47-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@suneox@lydiabarclay@suneox 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]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[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: N/A Currently, the PR is not available as it has been reverted
[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.
[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.
Activity
melvin-bot commentedon Apr 2, 2025
Triggered auto assignment to @lydiabarclay (
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.samranahm commentedon Apr 2, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-02 20:19:52 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
LHN - When paying someone, chat preview shows "You" and also user name before payment info.
What is the root cause of that problem?
This is causing due to
App/src/libs/SidebarUtils.ts
Lines 651 to 653 in 9a58e7d
That cause to have the "You" as well as payer name in alternate text
Because we don't have action type
lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEWingetOptionDatafunctionWhat changes do you think we should make in order to solve the problem?
We should add add
lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEWcheck hereand update this logic
App/src/libs/SidebarUtils.ts
Line 649 in 9a58e7d
like this
This will ensure we only have payer name in alternateText instead of
You:What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
If we want to keep the
Youand remove the payer name hereApp/src/libs/ReportUtils.ts
Line 4135 in 9a58e7d
we pass the
payerfor all keys here, instead we can check if the key isiou.payerPaidAmountthen pass the empty stringupdate the logic like this
This will keep the
LastActorDisplayNameYou but remove payerName from alternate textReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
samranahm commentedon Apr 2, 2025
Proposal updated
thelullabyy commentedon Apr 3, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
You. For example:App/src/libs/SidebarUtils.ts
Lines 651 to 655 in 851cb43
REPORTPREVIEW, there is separate logic that adds the payer's name to the message:App/src/libs/ReportUtils.ts
Line 4135 in 9a58e7d
Bob—paid an expense, the chat preview ends up redundantly showing:This creates confusion by repeating the sender’s identity when it's already implied by the "You" prefix.
What changes do you think we should make in order to solve the problem?
instead of:
App/src/libs/ReportUtils.ts
Line 4135 in 9a58e7d
Here’s the proposed update:
iou.payerPaidAmount(used for payment previews), we omit the payer’s name. This avoids redundant information when the sender is the current user. The "You: " prefix is already correctly handled inSidebarUtils.ts.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
SidebarLinksfor a DM conversation where the most recent message is of typeREPORTPREVIEW, and verify that:You: paid 12$paid 12$What alternative solutions did you explore? (Optional)
lydiabarclay commentedon Apr 3, 2025
Same here:
lydiabarclay commentedon Apr 3, 2025
@dannymcclain is this expected behavior or a bug? unsure
samranahm commentedon Apr 4, 2025
@lydiabarclay It will be fixed in My proposal, now we just need to make sure what we want to keep.
dannymcclain commentedon Apr 4, 2025
Yeah what we currently have is definitely not what we want. @Expensify/design what do you think about these options?
I think I lean towards the second option
because that feels the most consistent with everything else? But let's get some confirmation before proceeding.
thelullabyy commentedon Apr 4, 2025
@dannymcclain FYI, we have a long discussion about the expected behavior #58271 (comment):
samranahm commentedon Apr 6, 2025
That sounds weird
So, this is best option here as suggested by @dannymcclain
dubielzyk-expensify commentedon Apr 7, 2025
Agree with @dannymcclain that the option feels most consistent with the rest 👍
98 remaining items
lydiabarclay commentedon May 16, 2025
Beginning new 7-day count before payment due to regression
[-][Due for payment 2025-05-05] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/-][+][Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/+]thelullabyy commentedon May 19, 2025
@suneox Thanks for helping me create PR
mountiny commentedon May 19, 2025
Thanks
[-][Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/-][+][Due for payment 2025-05-28] [Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info.[/+]melvin-bot commentedon May 21, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 21, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.47-6 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-05-28. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 21, 2025
@suneox @lydiabarclay @suneox 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]
suneox commentedon May 27, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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: N/A Currently, the PR is not available as it has been reverted
[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: [Due for payment 2025-05-28] [Due for payment 2025-05-23] [$250] LHN - When paying someone, chat preview shows "You" and also user name before payment info. #59566 (comment)
[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.
N/A
lydiabarclay commentedon May 28, 2025
Payment Summary
*reduced by 50% due to regression
Contributor: @suneox paid $125 via Upwork
Contributor: @thelullabyy paid $125 via Upwork
✅ Regression test filed