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
[$500] Expense - App auto-redirects to expense report from main chat after returning online #35433
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Version Number: 1.4.33-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Go offline
Request money in workspace chat
Click on the expense preview twice to go to expense details page
Click on the header subtitle twice to return to the main chat
Go online
Wait for a while
Expected Result:
App will stay in the main chat
Actual Result:
App redirects to expense report after returning online
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-] Expense - App auto-redirects to expense report from main chat after returning online[/-][+][$500] Expense - App auto-redirects to expense report from main chat after returning online[/+]on Jan 30, 2024
Please re-state the problem that we are trying to solve in this issue.
Expense - App auto-redirects to expense report from main chat after returning online
What is the root cause of that problem?
The main problem with the issue is that when we navigate back we save the previous screen in the route and since we have some useEffects related with navigation
What changes do you think we should make in order to solve the problem?
Because this behavior is not normal, that we are calling useEffect from another screen
I suggest limiting this useEffect and making it only valid when this screen is in focus
And add
if (!isFocused) {
return;
}
What alternative solutions did you explore? (Optional)
Sorry for the radio silence, last week I realized I had a bad email filter and this (among a few other issues) got filtered out by mistake.
Maybe I misunderstand your question. Pls help give me more details
So we will exit here if it is an optimistic report, right? Doesn't that mean it would not open the correct report when clicked, given it would return early and not redirect anywhere?
@iwiznia@rushatgabhane@laurenreidexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
[-] Expense - App auto-redirects to expense report from main chat after returning online[/-][+][$500] Expense - App auto-redirects to expense report from main chat after returning online[/+]melvin-bot commentedon Jan 30, 2024
Job added to Upwork: https://www.upwork.com/jobs/~017a5665dbb6dad48c
melvin-bot commentedon Jan 30, 2024
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 30, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)lanitochka17 commentedon Jan 30, 2024
We think that this bug might be related to #wave5.
CC @dylanexpensify
ZhenjaHorbach commentedon Jan 30, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - App auto-redirects to expense report from main chat after returning online
What is the root cause of that problem?
The main problem with the issue is that when we navigate back we save the previous screen in the route and since we have some useEffects related with navigation
App/src/pages/home/ReportScreen.js
Lines 367 to 430 in 00a21a9
We call one of them from the previous screen and navigate to
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(prevReport.parentReportID));App/src/pages/home/ReportScreen.js
Line 401 in 00a21a9
What changes do you think we should make in order to solve the problem?
Because this behavior is not normal, that we are calling useEffect from another screen
I suggest limiting this useEffect and making it only valid when this screen is in focus
And add
What alternative solutions did you explore? (Optional)
NA
dukenv0307 commentedon Jan 31, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
nullApp/src/pages/home/ReportScreen.js
Lines 388 to 403 in 00a21a9
What changes do you think we should make in order to solve the problem?
prevReport.isOptimisticReportto this conditionWhat alternative solutions did you explore? (Optional)
laurenreidexpensify commentedon Feb 2, 2024
@rushatgabhane bump for review
17 remaining items
laurenreidexpensify commentedon Feb 14, 2024
@iwiznia bump ^^
melvin-bot commentedon Feb 14, 2024
@iwiznia, @rushatgabhane, @laurenreidexpensify Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Feb 16, 2024
@iwiznia, @rushatgabhane, @laurenreidexpensify Still overdue 6 days?! Let's take care of this!
laurenreidexpensify commentedon Feb 19, 2024
@iwiznia bump ^^
iwiznia commentedon Feb 19, 2024
Sorry for the radio silence, last week I realized I had a bad email filter and this (among a few other issues) got filtered out by mistake.
So we will exit here if it is an optimistic report, right? Doesn't that mean it would not open the correct report when clicked, given it would return early and not redirect anywhere?
dukenv0307 commentedon Feb 20, 2024
Yes
When we clicked to open the report directly, it did not redirect anywhere because the condition here return
falsemelvin-bot commentedon Feb 20, 2024
@iwiznia @rushatgabhane @laurenreidexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
melvin-bot commentedon Feb 20, 2024
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
iwiznia commentedon Feb 20, 2024
Isn't this incorrect? We should be opening the report, no?
dukenv0307 commentedon Feb 20, 2024
Oh, I mean that it is not redirected to another report if we open the report directly
mvtglobally commentedon Feb 21, 2024
Issue not reproducible during KI retests. (First week)
laurenreidexpensify commentedon Feb 21, 2024
Am closing based on this not being reproducible in this week's testing