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
[HOLD for payment 2024-04-25] [$500] Back to home leads to recent chat instead of LHN after opening non-existing profile #38390
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
@anmurali I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
Please re-state the problem that we are trying to solve in this issue.
The most recent chat is shown when going back from not found profile page.
What is the root cause of that problem?
When we open an RHP page, in this case, the profile page, it will try to find the matching bottom tab, matching central pane screen, and the RHP itself and "push" them all to the stack.
but in our case, a profile page doesn't have any mapping. We can't map a profile page to any central pane. Because the matching central pane is undefined, we use a default one and that is a report screen without any reportID which will find the most recent report to show.
A discussion in #expensify-bugs 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: N/A
Determine if we should create a regression test for this bug. - I dont think so.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. - Incase we do need one, steps to repro and expected result in OP looks good!
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Mar 15, 2024
Triggered auto assignment to @anmurali (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.izarutskaya commentedon Mar 15, 2024
@anmurali I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
izarutskaya commentedon Mar 15, 2024
We think that this bug might be related to #wave-collect - Release 1
CC @trjExpensify
bernhardoj commentedon Mar 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The most recent chat is shown when going back from not found profile page.
What is the root cause of that problem?
When we open an RHP page, in this case, the profile page, it will try to find the matching bottom tab, matching central pane screen, and the RHP itself and "push" them all to the stack.
App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
Lines 162 to 166 in e9c112a
To find the matching central pane, it will check the mapping here,
App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
Lines 132 to 144 in e9c112a
but in our case, a profile page doesn't have any mapping. We can't map a profile page to any central pane. Because the matching central pane is undefined, we use a default one and that is a report screen without any
reportIDwhich will find the most recent report to show.App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
Line 179 in e9c112a
So, when we press back, we will see the most recent report chat.
This is useful for desktop view since a central pane screen is always visible, but it's not for a small screen.
I can't reproduce the app navigates back to the not found page on dev (only on staging, maybe fixed).
What changes do you think we should make in order to solve the problem?
For a small screen, if there is no matching central pane, we shouldn't push the default, that is the report screen to the navigation.
dragnoir commentedon Mar 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Profile page, back to home leads to recent chat instead of LHN
What is the root cause of that problem?
We are not setting the value of
onLinkPresstoFullPageNotFoundViewinProfilePageApp/src/pages/ProfilePage.tsx
Line 131 in 8b54aff
What changes do you think we should make in order to solve the problem?
set
onLinkPressvalue to navigate to LHN when clicked.What alternative solutions did you explore? (Optional)
melvin-bot commentedon Mar 18, 2024
@anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick!
anmurali commentedon Mar 18, 2024
I cannot reproduce on Staging or Production. I see the
Go back to homepage once and it successfully takes me back to LHNbernhardoj commentedon Mar 19, 2024
@anmurali hi, it's still reproducible, can you recheck, please?
Screen.Recording.2024-03-19.at.13.31.36.mov
Notice that it goes back to report/chat screen instead of LHN.
34 remaining items
deetergp commentedon Apr 28, 2024
Bump @ishpaul777
ishpaul777 commentedon Apr 29, 2024
The PR that introduced the bug has been identified. Link to the PR: #37421
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: https://github.com/Expensify/App/pull/37421/files#r1582555183
A discussion in #expensify-bugs 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: N/A
Determine if we should create a regression test for this bug. - I dont think so.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. - Incase we do need one, steps to repro and expected result in OP looks good!
ishpaul777 commentedon Apr 29, 2024
Sorry for delay completed checklist!
deetergp commentedon May 1, 2024
Woo! Thanks @ishpaul777. All you @anmurali 🎉
ishpaul777 commentedon May 6, 2024
gentle bump @anmurali 😄
anmurali commentedon May 6, 2024
completed all payments!