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-02-07] [$500] Web - Public room - Not here page or different report opens each time Sign-in modal opens #34764
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Version Number: .4.27-1 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:
changed the title [-]Web - Public room - Not here page or different report opens each time Sign-in modal opens[/-][+][$500] Web - Public room - Not here page or different report opens each time Sign-in modal opens[/+]on Jan 18, 2024
As you can see above, we call Session.signOutAndRedirectToSignIn function when sign-in button is pressed
Now let's take a look at signOutAndRedirectToSignIn function
This function takes one parameter shouldReplaceCurrentScreen and as you can see below, if shouldReplaceCurrentScreen is truthy, it replaces the current route with sign-in modal
shouldReplaceCurrentScreen has default value false. But onPress handler has event parameter. We are intended to call signOutAndRedirectToSignIn function with no parameter but event value is passed to the function. That's why shouldReplaceCurrentScreen has truthy value and so the below code is executed.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Jan 18, 2024
Job added to Upwork: https://www.upwork.com/jobs/~017ab441e20c642fc9
[-]Web - Public room - Not here page or different report opens each time Sign-in modal opens[/-][+][$500] Web - Public room - Not here page or different report opens each time Sign-in modal opens[/+]melvin-bot commentedon Jan 18, 2024
Triggered auto assignment to @garrettmknight (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 18, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (
External)lanitochka17 commentedon Jan 18, 2024
#vip-vsb
dummy-1111 commentedon Jan 18, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Different report opens each time sign-in modal opens in public room
What is the root cause of that problem?
App/src/pages/home/sidebar/SignInButton.js
Line 19 in 31b19ea
App/src/pages/home/sidebar/SignInButton.js
Line 26 in 31b19ea
As you can see above, we call
Session.signOutAndRedirectToSignInfunction when sign-in button is pressedNow let's take a look at
signOutAndRedirectToSignInfunctionApp/src/libs/actions/Session/index.ts
Line 104 in 31b19ea
This function takes one parameter
shouldReplaceCurrentScreenand as you can see below, ifshouldReplaceCurrentScreenis truthy, it replaces the current route with sign-in modalApp/src/libs/actions/Session/index.ts
Lines 114 to 118 in 31b19ea
shouldReplaceCurrentScreenhas default valuefalse. ButonPresshandler has event parameter. We are intended to callsignOutAndRedirectToSignInfunction with no parameter but event value is passed to the function. That's whyshouldReplaceCurrentScreenhas truthy value and so the below code is executed.App/src/libs/actions/Session/index.ts
Line 115 in 31b19ea
This is the root cause
What changes do you think we should make in order to solve the problem?
We need to call the
signOutAndRedirectToSignInwith no parameterApp/src/pages/home/sidebar/SignInButton.js
Line 19 in 31b19ea
App/src/pages/home/sidebar/SignInButton.js
Line 26 in 31b19ea
In the above code, replace
Session.signOutAndRedirectToSignInwith() => Session.signOutAndRedirectToSignIn()This works as expected
Result
What alternative solutions did you explore? (Optional)
garrettmknight commentedon Jan 22, 2024
@allroundexperts does this proposal look viable?
20 remaining items
garrettmknight commentedon Feb 8, 2024
Summary of payment:
garrettmknight commentedon Feb 8, 2024
@allroundexperts please request payment once you've finished the checklist.
allroundexperts commentedon Feb 17, 2024
Reviewer Checklist
garrettmknight commentedon Feb 22, 2024
QA updated - @allroundexperts on you to request payment.
aimane-chnaif commentedon Feb 22, 2024
You meant to tag @allroundexperts ?
garrettmknight commentedon Feb 22, 2024
Yep - sorry about that.
JmillsExpensify commentedon Mar 1, 2024
$500 approved for @allroundexperts based on this summary.