Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Room - App opens random chat after leaving public room when logging in via public room link #42522

Closed
6 tasks done
izarutskaya opened this issue May 23, 2024 · 12 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented May 23, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.75-0
Reproducible in staging?: Y
Reproducible in production?: N
Found when validating PR : #42020
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log out if logged in.
  3. Navigate to public room link.
  4. Click Sign in on the bottom banner.
  5. Log in with an existing account.
  6. After login, without opening other reports, leave the public room.

Expected Result:

App will redirect to Concierge chat after leaving public room when user signs in via public room link.

Actual Result:

App redirects to a random chat after leaving public room when user signs in via public room link.

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

Bug6489382_1716467277141.20240523_201414.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a7c33cc36264b58f
  • Upwork Job ID: 1793716819096788992
  • Last Price Increase: 2024-05-23
Issue OwnerCurrent Issue Owner: @ahmedGaber93
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels May 23, 2024
Copy link

melvin-bot bot commented May 23, 2024

Triggered auto assignment to @danieldoglas (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented May 23, 2024

Triggered auto assignment to @puneetlath (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.

Copy link

melvin-bot bot commented May 23, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open Staging deploy checklist to see the list of PRs included in this release, then work quickly on the following:

  1. If you find which PR caused the issue/bug, you can reassign it to the person responsible for it.
    • If the author is OOO or won’t get online before the daily deploy is due, you are responsible for finding the best fix/path forward. Don’t hesitate to ask for help!
  2. Try to reproduce the issue, if the bug is on production, remove the DeployBlocker label but stay assigned to fix it (or find out which PR broke it to get help from the author).
    • You can adjust the urgency of the issue to better represent the gravity of the bug.
    • If the issue is super low priority, feel free to un-assign yourself.
    • Be careful with PHP warnings, sometimes it is more complex than just adding a null coalescing operator as they might be uncovering some bigger bug.
    • If it was a one-off issue that requires no action (for example, Bedrock was down or it is a duplicated issue), you can close it.

Remember rule #2: Never un-assign yourself from a real DeployBlocker unless you are 100% sure someone else is assigned and will take care of it.

@melvin-bot melvin-bot bot removed the Hourly KSv2 label May 23, 2024
@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels May 23, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

@puneetlath 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
Copy link
Author

We think this issue might be related to the #vip-vsb.

@suneox
Copy link
Contributor

suneox commented May 23, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

We don't handle navigate to concierge room when user leave report.

What is the root cause of that problem?

After leave room we only navigate to the most recent report

App/src/libs/actions/Report.ts

Lines 2659 to 2660 in dadc3b8

API.write(WRITE_COMMANDS.LEAVE_ROOM, parameters, {optimisticData, successData, failureData});
navigateToMostRecentReport(report);

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

We will check the report is public room and previous route is sign-in and after leave public room we will navigate to concierge page instead of only navigate to the most recent report at this line

    API.write(WRITE_COMMANDS.LEAVE_ROOM, parameters, {optimisticData, successData, failureData});
    const isPublicRoom = ReportUtils.isPublicRoom(report);
    const previousRoute = Navigation.getPreviousRoute();
    if (isPublicRoom && previousRoute === ROUTES.SIGN_IN_MODAL) {
        navigateToConciergeChat();
    } else {
        navigateToMostRecentReport(report);
    }

POC

Screen.Recording.2024-05-24.at.00.13.43.mov

What alternative solutions did you explore? (Optional)

@puneetlath
Copy link
Contributor

I don't think we need to block the deploy over this. It's a very specific scenario.

@puneetlath puneetlath added Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API Hourly KSv2 labels May 23, 2024
Copy link

melvin-bot bot commented May 23, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01a7c33cc36264b58f

@melvin-bot melvin-bot bot changed the title Room - App opens random chat after leaving public room when logging in via public room link [$250] Room - App opens random chat after leaving public room when logging in via public room link May 23, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 23, 2024
Copy link

melvin-bot bot commented May 23, 2024

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

@ahmedGaber93
Copy link
Contributor

@puneetlath I think this expected, the user is redirect to last opened report not to random report and this was the expected result when we were working on #41128

#41128 expected result:

  1. if users leave a room or group, we will redirect them to the last opened report (sort onyx reports by last read and find the last one)
  2. if a new user open the room from deep link, so he didn't open any report yet, we will redirect them to concierge

CC @Julesssss @Nodebrute

@puneetlath
Copy link
Contributor

Ah cool, thanks for letting me know. Closing this out then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

5 participants