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
[C+ Checklist Needs Completion] [$250] Expense created offline for new chat shows two avatar #66619
Version Number: v9.1.82-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#65921 Email or phone of affected tester (no customers):testpayment935@gmail.com Issue reported by: Applause Internal Team Device used: Windows 10 /Chrome, Samsung Galaxy s10/ Chrome. Samsung Galaxy s10/ Android 12 App Component: Chat Report View
Action Performed:
Navigate to staging.new.expensify.com
Log in with any account
Go offline
Click green + button > Create expense
Choose any user without IOU in chat and create expense
Expected Result:
Next to the Report Preview only one avatar should display and it's the sender. and also only the sender name above Report Preview should appear.
Actual Result:
When creating an expense offline for a new chat it shows both the users avatar until returning online
Please re-state the problem that we are trying to solve in this issue.
Expense created offline for new chat shows two avatar
What is the root cause of that problem?
While creating the optimistic data for report action preview, we are not setting the childOwnerAccountID in the optimisitic data and due to this we get singleAvatarAccountID as undefined, which inturn makes reportPreviewSenderID as undefined here:
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)
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.
Please re-state the problem that we are trying to solve in this issue.
When creating an expense offline for a new chat it shows both the users avatar until returning online
What is the root cause of that problem?
Let's see the logic here, singleAvatarAccountID is getting from childManagerAccountID/childOwnerAccountID data of the report preview action. But the optimistic report preview action doesn't set this data here
What changes do you think we should make in order to solve the problem?
We should set childManagerAccountID and childOwnerAccountID data for the report preview action based on iouReport param. We shouldn't always set childOwnerAccountID as the current user because for the send money flow the current user is the manager, not the owner. Follow iouReport data is always correct
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update buildOptimisticReportPreview unit test to verify childOwnerAccountID, childManagerAccountID is correct
What alternative solutions did you explore? (Optional)
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.
changed the title [-]Expense created offline for new chat shows two avatar[/-][+][$250] Expense created offline for new chat shows two avatar[/+]on Jul 22, 2025
@shubham1206agra@greg-schroeder 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]
changed the title [-][Due for payment 2025-08-22] [$250] Expense created offline for new chat shows two avatar[/-][+][C+ Checklist Needs Completion] [$250] Expense created offline for new chat shows two avatar[/+]on Aug 22, 2025
[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: Not Required
[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:
Regression Test Proposal
Test:
Open any DM chat without IOU
Go offline
Create an expense
Verify that the report preview only shows the owner's avatar
Activity
melvin-bot commentedon Jul 17, 2025
Triggered auto assignment to @greg-schroeder (
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.TMisiukiewicz commentedon Jul 17, 2025
I'll verify this
TMisiukiewicz commentedon Jul 17, 2025
Checked it against my latest changes, answered here: #65921 (comment)
Burhan-Rashid commentedon Jul 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense created offline for new chat shows two avatar
What is the root cause of that problem?
While creating the optimistic data for report action preview, we are not setting the
childOwnerAccountIDin the optimisitic data and due to this we getsingleAvatarAccountIDas undefined, which inturn makesreportPreviewSenderIDas undefined here:App/src/hooks/useReportAvatarDetails.ts
Lines 270 to 273 in 48a96b0
which makes
displayAllActorsas true here as reportPreviewSenderID is undefined :App/src/hooks/useReportAvatarDetails.ts
Line 92 in 48a96b0
which leads to showing multiple avatars:
App/src/pages/home/report/ReportActionItemSingle.tsx
Lines 122 to 124 in 48a96b0
What changes do you think we should make in order to solve the problem?
While creating the optimistic data for report preview action, we need to add the
childOwnerAccountIDhere:App/src/libs/ReportUtils.ts
Line 6607 in 48a96b0
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)
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.
Preview:
childaccountid.mp4
mkzie2 commentedon Jul 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When creating an expense offline for a new chat it shows both the users avatar until returning online
What is the root cause of that problem?
Let's see the logic here,
singleAvatarAccountIDis getting fromchildManagerAccountID/childOwnerAccountIDdata of the report preview action. But the optimistic report preview action doesn't set this data hereApp/src/hooks/useReportAvatarDetails.ts
Lines 270 to 273 in 48a96b0
Then
showMultipleUserAvatarPatternis true sincesingleAvatarAccountIDisundefinedApp/src/hooks/useReportAvatarDetails.ts
Line 92 in 48a96b0
App/src/pages/home/report/ReportActionItemSingle.tsx
Lines 122 to 124 in 48a96b0
What changes do you think we should make in order to solve the problem?
We should set
childManagerAccountIDandchildOwnerAccountIDdata for the report preview action based oniouReportparam. We shouldn't always setchildOwnerAccountIDas the current user because for the send money flow the current user is the manager, not the owner. FollowiouReportdata is always correctApp/src/libs/ReportUtils.ts
Line 6606 in 48a96b0
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
buildOptimisticReportPreviewunit test to verifychildOwnerAccountID,childManagerAccountIDis correctWhat alternative solutions did you explore? (Optional)
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.
[-]Expense created offline for new chat shows two avatar[/-][+][$250] Expense created offline for new chat shows two avatar[/+]melvin-bot commentedon Jul 22, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021947529431034338581
melvin-bot commentedon Jul 22, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (
External)24 remaining items
melvin-bot commentedon Aug 15, 2025
@shubham1206agra @greg-schroeder 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]
greg-schroeder commentedon Aug 22, 2025
Payment summary:
Contributor: @mkzie2 - $250 - Upwork
C+: @shubham1206agra - $250 - Manual request via ND
greg-schroeder commentedon Aug 22, 2025
@shubham1206agra can you take care of the C+ checklist so we can close this out?
[-][Due for payment 2025-08-22] [$250] Expense created offline for new chat shows two avatar[/-][+][C+ Checklist Needs Completion] [$250] Expense created offline for new chat shows two avatar[/+]shubham1206agra commentedon Aug 24, 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: Fix: missing avatars and names above IOU preview in main chat after login #42453 (comment)
[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: Not Required
[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:
Regression Test Proposal
Test:
Do we agree 👍 or 👎
trjExpensify commentedon Sep 1, 2025
$250 approved for @shubham1206agra