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
Version Number: V9 1.39-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/6034865 Email or phone of affected tester (no customers): Slottwo1 la@gmail.com Issue reported by: Applause Internal Team Device used: Redminote note 10s android 13 App Component: Money Requests
Action Performed:
Launch app
Open workspace chat
Create two manual expenses
Open the second expense
Send a message
Tap header - delete the expense
Note header displays "expense"
Tap sublink in header and go back to expense report page
Tap reply thread of "deleted expense"
Now note header displays deleted expense
Expected Result:
On deleting expense, header must display "deleted expense".
Actual Result:
On deleting expense, header displays "expense"and on revisit only it displays "deleted expense".
A race condition occurs because the global allReportActions variable is updated after the AvatarWithDisplayName component finishes re-rendering post-deletion. This causes stale data to persist in the UI.
What changes do we need to make to resolve the problem?
Instead of relying solely on the global allReportActions, use the parentReportActionParam parameter passed to getReportName to ensure synchronization with the latest data.
Update the implementation to explicitly pass parentReportActionParam to the function:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Validate that UI components do not depend on global variables prone to race conditions.
What alternative solutions did you explore? (Optional)
N/A
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.
[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:
[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.
Activity
melvin-bot commentedon May 2, 2025
Triggered auto assignment to @zanyrenney (
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.dmkt9 commentedon May 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
On deleting expense, header displays "expense"and on revisit only it displays "deleted expense".
What is the root cause of that problem?
parentReportAction, which relies on the global variableallReportActions:App/src/libs/ReportUtils.ts
Line 4732 in 5da3afa
parentReportActionvariable is assigned here:App/src/libs/ReportUtils.ts
Lines 4644 to 4649 in 5da3afa
App/src/libs/ReportUtils.ts
Lines 964 to 974 in 5da3afa
A race condition occurs because the global
allReportActionsvariable is updated after theAvatarWithDisplayNamecomponent finishes re-rendering post-deletion. This causes stale data to persist in the UI.App/src/components/AvatarWithDisplayName.tsx
Lines 65 to 76 in 5da3afa
What changes do we need to make to resolve the problem?
allReportActions, use theparentReportActionParamparameter passed togetReportNameto ensure synchronization with the latest data.parentReportActionParamto the function:What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Validate that UI components do not depend on global variables prone to race conditions.
What alternative solutions did you explore? (Optional)
N/A
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.
melvin-bot commentedon May 5, 2025
@zanyrenney Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
[-]Expense-On deleting expense, header displays "expense"[/-][+][$250] Expense-On deleting expense, header displays "expense"[/+]melvin-bot commentedon May 6, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021919848678013167581
melvin-bot commentedon May 6, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)zanyrenney commentedon May 6, 2025
few proposals already -- @sobitneupane please can you review? thanks!
20 remaining items
zanyrenney commentedon May 29, 2025
Hey @sobitneupane please can you complete the checklist above so I can proceed with payment?
zanyrenney commentedon May 29, 2025
Also @dmkt9 please can you send me your upwork profile?
Thanks both!
dmkt9 commentedon May 29, 2025
@zanyrenney Certainly. Here is my Upwork profile link https://www.upwork.com/freelancers/~014bc7fd46d2034619
sobitneupane commentedon May 29, 2025
Sorry for the delay, @zanyrenney .
I’m not at full capacity this week, but I’ll try to get it done over the weekend.
zanyrenney commentedon May 30, 2025
Have sent you the job offer @dmkt9
zanyrenney commentedon May 30, 2025
Thanks for the update @sobitneupane , hopefully can get this closed out ASAP.
dmkt9 commentedon May 31, 2025
Yes. Thank you
rafecolton commentedon Jun 3, 2025
Looks like this will be paid out soon
sobitneupane commentedon Jun 3, 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: Track Expense flow #37282
[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:
[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 👎
zanyrenney commentedon Jun 3, 2025
payment summary
$250 paid to @dmkt9 for the contributor role (Paid via upwork)
$250 owed to @sobitneupane for the contributor plus role (please request on ND)
laurenreidexpensify commentedon Aug 7, 2025
$250 approved in New Expensify for @sobitneupane
trjExpensify commentedon Aug 14, 2025
$250 approved in NewDot for @sobitneupane.
(We changed approvers so this bounced to me!)