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

[$1000] Web - Workspaces - Page goes to wrong page when clicking go to #admin rooms #25393

Closed
1 of 6 tasks
izarutskaya opened this issue Aug 17, 2023 · 38 comments
Closed
1 of 6 tasks
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 Aug 17, 2023

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


Action Performed:

  1. Open the website
  2. Click any admin room from LHN
  3. Settings > Workspaces
  4. select the workspace which is corresponding to the opened room in Step 2
  5. click three dots
  6. click open #admin room
  7. observe the result

Expected Result:

The room should be opened

Actual Result:

the wrong page is opened

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.55-0

Reproducible in staging?: Y

Reproducible in production?: N

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

Notes/Photos/Videos: Any additional supporting documentation

Screenshare.-.2023-08-17.3_56_10.PM.mp4
Recording.1245.mp4

Expensify/Expensify Issue URL:

Issue reported by: @misgana96

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692276872694949

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d806101ebfe064a7
  • Upwork Job ID: 1692634240552304640
  • Last Price Increase: 2023-09-01
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@izarutskaya izarutskaya added the DeployBlockerCash This issue or pull request should block deployment label Aug 17, 2023
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Aug 17, 2023
@OSBotify
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.

@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

Triggered auto assignment to @madmax330 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Pluto0104
Copy link
Contributor

I was able to reproduce the issue, but it appears intermittently and not consistently. Additionally, it occasionally navigates to the settings route.

@tjferriss
Copy link
Contributor

I'm able to reproduce. It's taking me back to the chat I was last in, instead of the #admins room.

Screen.Recording.2023-08-17.at.15.29.52.mov

@yuwenmemon yuwenmemon assigned yuwenmemon and unassigned madmax330 Aug 17, 2023
@yuwenmemon
Copy link
Contributor

Weird, I can't seem to reproduce 🤔

@yuwenmemon
Copy link
Contributor

Ah. I believe the inconsistency of reproducing led us to believe this was staging only but I just verified it on Prod too so removing the blocker label.

@yuwenmemon yuwenmemon added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Aug 17, 2023
@yuwenmemon yuwenmemon assigned madmax330 and unassigned yuwenmemon Aug 17, 2023
@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 18, 2023

I can't able to re-produce this one prod but dev and staging only. Also it's not just opening settings sometimes it opens wrong report too.

@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 18, 2023

Proposal

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

Web - Workspaces - Page goes to wrong page when clicking go to #admin rooms

What is the root cause of that problem?

We're using multiple navigation states like the following navigate, push and pop.

As per the documentation of React Navigation if we use navigate action it will go the screen by screen's name and remove all the screens that are on top of it.

Current Flow:

  1. Open any report using deeplink
  2. Select any #admin room (this is PUSH) event, so we update the stack.
  3. Now open settings page (RHN will be pushed into stack)
  4. Now in settings page when we click on #admin room which uses navigate action. (now because of Navigation and the screen name is CentralPaneNavigator, but in the state we have two reports screen one with deeplink and one is #admin room).

Before clicking on Goto #admin room the navigation state is
[Home, CentralPaneNavigator,CentralPaneNavigator,RightModalNavigator]

When we click on Goto #admin room due the navigate action React Navigation is going the first CentralPaneNavigator navigator it's seeing which is the screen we opened using deeplink even though we're trying to navigate to the 3rd screen.

This issue happens only when the admin room is in the top of stack, if not we push then there is no problem.

Video.

Kapture.2023-08-18.at.21.39.41.mp4

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

Here in this line

action.type = CONST.NAVIGATION.ACTION_TYPE.PUSH;
we're checking for the latest report and based on that we navigate.

To solve this.. if the latest report is the same as the report we're going to navigate instead of navigate either we push or just dimiss the modal.

But to push can cause re-renders for the report screen which is not intended noting that the last screen is same admin room, so I'd prefer dismissing the modal should do the work.

Following should do the work, we need to update here in this function

const goToRoom = useCallback(

const currentTopMostReport = Navigation.getTopmostReportId();
if (room.reportID === currentTopMostReport) {
    Navigation.dismissModal();
    return;
}

What alternative solutions did you explore? (Optional)

NA

Reference

https://reactnavigation.org/docs/navigation-actions#navigate

Bug

Kapture.2023-08-18.at.22.12.14.mp4

Result

Kapture.2023-08-18.at.22.11.12.mp4

@tjferriss tjferriss added the External Added to denote the issue can be worked on by a contributor label Aug 18, 2023
@melvin-bot melvin-bot bot changed the title Web - Workspaces - Page goes to wrong page when clicking go to #admin rooms [$1000] Web - Workspaces - Page goes to wrong page when clicking go to #admin rooms Aug 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 18, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

@madmax330, @tjferriss, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@aimane-chnaif
Copy link
Contributor

Still awaiting proposals

Proposal should point out

  • offending PR as this is a recent regression
  • why it happens sometimes, not constantly reproducible
  • clear reproducible step

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2023
@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 21, 2023

@aimane-chnaif #25393 (comment) I don't think this is a regression.

It happens constantly, but to re-produce this you have to be in the #admin-room of workspace which you're trying from settings as well then you can re-produce this.

Kapture.2023-08-18.at.22.12.14.mp4

Please watch this video, you'll get the bug.

@aimane-chnaif
Copy link
Contributor

@aimane-chnaif #25393 (comment) I don't think this is a regression.

Though this exists on production, still recent regression, maybe within 2 months or so.
I don't think this happened before.

@b4s36t4
Copy link
Contributor

b4s36t4 commented Aug 21, 2023

Ok got it.

@melvin-bot melvin-bot bot added the Overdue label Aug 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

@madmax330, @tjferriss, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!

@madmax330
Copy link
Contributor

Still waiting on proposals

@melvin-bot melvin-bot bot removed the Overdue label Aug 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@madmax330
Copy link
Contributor

Same

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

@madmax330 @tjferriss @aimane-chnaif this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Aug 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

@madmax330, @tjferriss, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@ShogunFire
Copy link
Contributor

Is this still reproducible ? I tried on staging and couldn't reproduce

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

@madmax330, @tjferriss, @aimane-chnaif 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@Pluto0104
Copy link
Contributor

Pluto0104 commented Sep 5, 2023

It might be fixed by react navigation patch.

@tjferriss
Copy link
Contributor

I'm not able to reproduce this one so I believe we can close it.

@melvin-bot melvin-bot bot removed the Overdue label Sep 5, 2023
@misgana96
Copy link

@tjferriss Am I eligible for a reporter bonus since it is fixed from by react-navigation path?

@misgana96
Copy link

@tjferriss Am I eligible for the reporter bonus since the issue had fixed by correcting react navigation patch #24165

@tjferriss
Copy link
Contributor

I'm asking internally about this situation. Given the react-navigation patch was deployed before this bug was reported, I don't believe we would pay the reporting bonus.

@tjferriss
Copy link
Contributor

@misgana96 I confirmed with the team internally. Because the patch was deployed before this issue was reported we will not pay the reporting bonus.

@misgana96
Copy link

@misgana96 I confirmed with the team internally. Because the patch was deployed before this issue was reported we will not pay the reporting bonus.

Thank you for quick response.

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