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-10-22] [$250] Book travel - Report screen changes to profile view when clicking Country field #50155
Version Number: 9.0.44-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers):applausetester+kh0110001@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to FAB > Book travel.
Click Book travel.
Click Country.
Expected Result:
The report screen in the background will not change to profile page.
Actual Result:
The report screen in the background changes to profile page while LHN remains the same after opening Country RHP.
@trjExpensify FYI 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
In our case, the last backTo param is the travel page which doesn't have a central pane screen mapping, which will later be defaulted to the report screen.
It's because stateForBackTo.routes contains [BottomTabNavigator, RHPNavigator], so always accessing the first index won't work. We can just remove isRHPinState because we already have rhpNavigator which already finds RHP inside stateForBackTo.routes.
What changes do you think we should make in order to solve the problem?
Remove the isRHPInState. We previously fixed this before, but the isRHPinState is reintroduced in #49534, specifically this changes. I believe it's a bad merge.
changed the title [-]Book travel - Report screen changes to profile view when clicking Country field[/-][+][$250] Book travel - Report screen changes to profile view when clicking Country field[/+]on Oct 7, 2024
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. Yes
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.
Regression test:
Press FAB > Book Travel
Press Book travel
Press Country
(Web/Desktop) Verify the report screen behind RHP doesn't change
Standalone as a test, I agree. But in some wider regression test about Book travel, having a one liner added doesn't sound so bad.
The PR that introduced the bug has been identified. Link to the PR: N/A
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: N/A
@dukenv0307 can you provide context behind these "N/A"'s please?
Activity
melvin-bot commentedon Oct 3, 2024
Triggered auto assignment to @trjExpensify (
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.IuliiaHerets commentedon Oct 3, 2024
We think that this bug might be related to #vip-travel
IuliiaHerets commentedon Oct 3, 2024
@trjExpensify FYI 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
bernhardoj commentedon Oct 3, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report screen changes to profile screen when open the Country page from the book travel page.
What is the root cause of that problem?
By default, the address country RHP maps to the profile screen.
App/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts
Lines 5 to 21 in 91f610c
But we have a logic to find the matching central pane screen based on the
backToparams.App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
Lines 114 to 139 in 91f610c
In our case, the last backTo param is the travel page which doesn't have a central pane screen mapping, which will later be defaulted to the report screen.
App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
Line 203 in 91f610c
However, the result is ignored because of
isRHPinStateis false here.App/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
Lines 119 to 125 in 91f610c
It's because stateForBackTo.routes contains [BottomTabNavigator, RHPNavigator], so always accessing the first index won't work. We can just remove
isRHPinStatebecause we already have rhpNavigator which already finds RHP inside stateForBackTo.routes.What changes do you think we should make in order to solve the problem?
Remove the
isRHPInState. We previously fixed this before, but theisRHPinStateis reintroduced in #49534, specifically this changes. I believe it's a bad merge.trjExpensify commentedon Oct 7, 2024
Filing this one under vip-travel. CC: @stitesExpensify
[-]Book travel - Report screen changes to profile view when clicking Country field[/-][+][$250] Book travel - Report screen changes to profile view when clicking Country field[/+]melvin-bot commentedon Oct 7, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021843246313566765560
26 remaining items
dukenv0307 commentedon Oct 22, 2024
BugZero Checklist:
Regression test:
Do we 👍 or 👎
rlinoz commentedon Oct 23, 2024
Personally I think that is a very odd test to have, I think we don't need one for this bug.
trjExpensify commentedon Oct 23, 2024
Standalone as a test, I agree. But in some wider regression test about Book travel, having a one liner added doesn't sound so bad.
@dukenv0307 can you provide context behind these "N/A"'s please?
dukenv0307 commentedon Oct 24, 2024
@trjExpensify Sorry I missed adding the links. I updated the checklists
trjExpensify commentedon Oct 24, 2024
Thanks! Confirming the payment summary as follows:
Closing!
melvin-bot commentedon Oct 24, 2024
@rlinoz @trjExpensify Be sure to fill out the Contact List!
trjExpensify commentedon Oct 24, 2024
^^ @mallenexpensify what is this?
bernhardoj commentedon Oct 25, 2024
Requested in ND.
JmillsExpensify commentedon Oct 25, 2024
$250 approved for @bernhardoj
mallenexpensify commentedon Oct 25, 2024
@trjExpensify posted about in #bug-zero here