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-06-16] [Due for payment 2025-06-13] [$250] WS Chat - After deleting an expense, it navigates to different chat instead of the main chat #62568
Version Number: v9.1.49-4 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+bm588@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Web App Component: Chat Report View
If the persistence mechanism (which saves the navigation state) is in the middle of rehydration, the previously saved state will be applied once rehydration completes. This process overrides the new navigation command triggered by the server, causing the navigator to revert to its initial route.
What changes do you think we should make in order to solve the problem?
Ensure the navigate command is executed only if Navigation.isNavigationReady() ready:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
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 [-]WS Chat - After deleting an expense, it navigates to different chat instead of the main chat[/-][+][$250] WS Chat - After deleting an expense, it navigates to different chat instead of the main chat[/+]on May 26, 2025
The second navigation is delayed until Navigation.isNavigationReady() resolves. This causes the navigation actions to execute in the following order: first > third > second, instead of the intended sequence.
This out-of-order execution leads to incorrect navigation. For example, consider the following screen stack on user A’s side (after step 4 in OP):
The second navigation action (delayed by Navigation.isNavigationReady()) then calls popToTop, collapsing the stack to:
STACK
└── ReportsSplitNavigator
└── STACK
├── Home
└── Report Screen (A) - Another report
This unintended popToTop causes the user to be redirected away from the expected screen.
What changes do you think we should make in order to solve the problem?
The call to Navigation.isNavigationReady() was added in this PR to ensure safe navigation when the RHP is open.
However, in the scenario where no RHP is open, wrapping popToSidebar() in Navigation.isNavigationReady() causes unnecessary delay and incorrect order of operations.
We should update the logic at lines 622–624 to the following:
[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. The existing checklist is good enough to capture such issues.
[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.
Regression Test Proposal
Precondition:
Test:
Go to staging.new.expensify.com
As user A, create a workspace and add user B as a member.
As user B, go to the WS chat and create an expense.
As user A, go to the WS chat of user B and open the expense.
As user B, delete the expense.
Note that after user B deletes the expense, user A is navigated back to the main chat.
Activity
melvin-bot commentedon May 22, 2025
Triggered auto assignment to @flaviadefaria (
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 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After user B deletes the expense, user A navigates to another chat.
What is the root cause of that problem?
App/src/pages/home/ReportScreen.tsx
Line 630 in 526a0e4
What changes do you think we should make in order to solve the problem?
Navigation.isNavigationReady()ready:App/src/pages/home/ReportScreen.tsx
Line 630 in 526a0e4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
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.
Result:
bandicam.2025-05-25.09-12-26-930.mp4
[-]WS Chat - After deleting an expense, it navigates to different chat instead of the main chat[/-][+][$250] WS Chat - After deleting an expense, it navigates to different chat instead of the main chat[/+]melvin-bot commentedon May 26, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021926946552701025730
melvin-bot commentedon May 26, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (
External)flaviadefaria commentedon May 26, 2025
Added the external label.
truph01 commentedon May 26, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
When an expense is deleted, three navigation actions are triggered sequentially:
App/src/pages/home/ReportScreen.tsx
Line 620 in f431f8c
App/src/pages/home/ReportScreen.tsx
Line 623 in f431f8c
App/src/pages/home/ReportScreen.tsx
Line 631 in f431f8c
The second navigation is delayed until
Navigation.isNavigationReady()resolves. This causes the navigation actions to execute in the following order: first > third > second, instead of the intended sequence.This out-of-order execution leads to incorrect navigation. For example, consider the following screen stack on user A’s side (after step 4 in OP):
Navigation.isNavigationReady()) then callspopToTop, collapsing the stack to:popToTopcauses the user to be redirected away from the expected screen.What changes do you think we should make in order to solve the problem?
The call to
Navigation.isNavigationReady()was added in this PR to ensure safe navigation when the RHP is open.However, in the scenario where no RHP is open, wrapping
popToSidebar()inNavigation.isNavigationReady()causes unnecessary delay and incorrect order of operations.We should update the logic at lines 622–624 to the following:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
39 remaining items
melvin-bot commentedon Jun 16, 2025
Payment Summary
Upwork Job
BugZero Checklist (@flaviadefaria)
melvin-bot commentedon Jun 16, 2025
@flaviadefaria Whoops! This issue is 2 days overdue. Let's get this updated quick!
rojiphil commentedon Jun 17, 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:
[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. The existing checklist is good enough to capture such issues.
[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.
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
rojiphil commentedon Jun 17, 2025
@flaviadefaria BZ Checklist done. Thanks.
melvin-bot commentedon Jun 18, 2025
@flaviadefaria Eep! 4 days overdue now. Issues have feelings too...
flaviadefaria commentedon Jun 18, 2025
@dmkt9 I sent you an offer on Upwork. As soon as you accept it, I'll be able to pay you.
dmkt9 commentedon Jun 18, 2025
@flaviadefaria Thank you. I have accepted and submitted the offer.
flaviadefaria commentedon Jun 18, 2025
Link to regression test - https://github.com/Expensify/Expensify/issues/514747
flaviadefaria commentedon Jun 18, 2025
Payment Summary
Reviewer: @rojiphil owed $250 via NewDot (Needs to be requested)
ROLE: @dmkt9 paid $250 via Upwork (Paid)
garrettmknight commentedon Jun 19, 2025
$250 approved for @rojiphil