Skip to content

[HOLD for payment 2024-02-07] [$500] Web - Public room - Not here page or different report opens each time Sign-in modal opens #34764

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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:

Action Performed:

  1. Log out if logged in
  2. Navigate to public room (https://staging.new.expensify.com/r/2376199970894587
    )
  3. Click Sign in button from LHN
  4. Close the modal
  5. Click Sign in button from LHN
  6. Note that not here page opens in background
  7. Repeat Step 4 and 5

Expected Result:

When sign-in modal opens, the chat opened in the background will not be affected

Actual Result:

When sign-in modal opens, Not here page opens (Step 5). Each time sign-in modal opens, it opens different chat (Step 7)

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6346940_1705606572990.20240118_223653.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017ab441e20c642fc9
  • Upwork Job ID: 1748070237674250240
  • Last Price Increase: 2024-01-18
  • Automatic offers:
    • s-alves10 | Contributor | 28117506

Activity

  1. added
    External
    Daily
    Bug
    on Jan 18, 2024
  2. melvin-bot commented on Jan 18, 2024

    @melvin-bot
  3. 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
  4. melvin-bot commented on Jan 18, 2024

    @melvin-bot

    Triggered auto assignment to @garrettmknight (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help Wanted
    on Jan 18, 2024
  6. melvin-bot commented on Jan 18, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External)

  7. lanitochka17 commented on Jan 18, 2024

    @lanitochka17
    Author
  8. dummy-1111 commented on Jan 18, 2024

    @dummy-1111
    Contributor

    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?

    onPress={Session.signOutAndRedirectToSignIn}

    onPress={Session.signOutAndRedirectToSignIn}

    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

    function signOutAndRedirectToSignIn(shouldReplaceCurrentScreen?: boolean) {

    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

    if (shouldReplaceCurrentScreen) {
    Navigation.navigate(ROUTES.SIGN_IN_MODAL, CONST.NAVIGATION.TYPE.UP);
    } else {
    Navigation.navigate(ROUTES.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.

    Navigation.navigate(ROUTES.SIGN_IN_MODAL, CONST.NAVIGATION.TYPE.UP);

    This is the root cause

    What changes do you think we should make in order to solve the problem?

    We need to call the signOutAndRedirectToSignIn with no parameter

    onPress={Session.signOutAndRedirectToSignIn}

    onPress={Session.signOutAndRedirectToSignIn}

    In the above code, replace Session.signOutAndRedirectToSignIn with () => Session.signOutAndRedirectToSignIn()

    This works as expected

    Result

    What alternative solutions did you explore? (Optional)

  9. garrettmknight commented on Jan 22, 2024

    @garrettmknight
    Contributor

    @allroundexperts does this proposal look viable?

  10. 20 remaining items

  11. garrettmknight commented on Feb 8, 2024

    @garrettmknight
    Contributor

    Summary of payment:

  12. garrettmknight commented on Feb 8, 2024

    @garrettmknight
    Contributor

    @allroundexperts please request payment once you've finished the checklist.

  13. added
    Weekly
    and removed
    Daily
    on Feb 8, 2024
  14. allroundexperts commented on Feb 17, 2024

    @allroundexperts
    Contributor

    Reviewer Checklist

    1. Display status emojis in the LHN (including the user's own status) #24414
    2. https://github.com/Expensify/App/pull/24414/files#r1493097611
    3. N/A
    4. A regression test would be helpful here. The test steps mentioned in the OP look clear enough to me.
  15. garrettmknight commented on Feb 22, 2024

    @garrettmknight
    Contributor

    QA updated - @allroundexperts on you to request payment.

  16. aimane-chnaif commented on Feb 22, 2024

    @aimane-chnaif
    Contributor

    You meant to tag @allroundexperts ?

  17. garrettmknight commented on Feb 22, 2024

    @garrettmknight
    Contributor

    Yep - sorry about that.

  18. JmillsExpensify commented on Mar 1, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @allroundexperts based on this summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugExternalWeekly

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions