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

[HOLD for payment 2022-03-08] [$500] Account details stuck in RHN when switching chats #6720

Closed
mvtglobally opened this issue Dec 12, 2021 · 64 comments · Fixed by #7725
Closed
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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 Weekly KSv2

Comments

@mvtglobally
Copy link

mvtglobally commented Dec 12, 2021

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. Click header in conversation with User B - their details open in Right Hand Nav (RHN)
  2. Type command+k to open Search to open chat with User C
  3. Observe account details for User B still shows in RHN while new chat is open in the background for User C

Expected Result:

Once new chat with User C is open, RHN is completely removed/disappears

Actual Result:

Account details stuck in RHN

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Desktop App

Version Number: 1.1.18-3
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screen Shot 2021-12-12 at 11 43 50 PM

Expensify/Expensify Issue URL:
Issue reported by: @mallenexpensify
**Slack conversation:https://expensify.slack.com/archives/C01GTK53T8Q/p1639175807048600

Job Post: https://www.upwork.com/jobs/~01a4bf9b60eba80639

View all open jobs on GitHub

@mvtglobally mvtglobally added AutoAssignerTriage Auto assign issues for triage to an available triage team member Engineering Daily KSv2 labels Dec 12, 2021
@MelvinBot
Copy link

Triggered auto assignment to @kevinksullivan (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot
Copy link

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

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Dec 12, 2021
@sketchydroide
Copy link
Contributor

this does sound like a bug, and I think we could have it as an external

@sketchydroide sketchydroide added the External Added to denote the issue can be worked on by a contributor label Dec 13, 2021
@MelvinBot
Copy link

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

@kevinksullivan kevinksullivan changed the title Account details stuck in RHN Account details stuck in RHN when switching chats Dec 14, 2021
@botify botify removed the Daily KSv2 label Dec 14, 2021
@MelvinBot MelvinBot added the Weekly KSv2 label Dec 14, 2021
@MelvinBot
Copy link

Triggered auto assignment to @parasharrajat (Exported)

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 14, 2021
@MelvinBot
Copy link

Triggered auto assignment to @chiragsalian (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@Santhosh-Sellavel
Copy link
Collaborator

Proposal

We need to invoke dismissModal from here. So whenever we navigate to a new report, RHN modals would disappear.

if (isDrawerRoute(route)) {
navigationRef.current.dispatch(CustomActions.pushDrawerRoute(route));
return;
}

Like this,

if (isDrawerRoute(route)) {
     dismissModal();
     navigationRef.current.dispatch(CustomActions.pushDrawerRoute(route));
     return;
}

Also, we will need to refactor dismissModal, i.e need to move the function above the navigate method because we cannot use the method before defining it.

@aswin-s
Copy link
Contributor

aswin-s commented Dec 14, 2021

Reason

Open modals are not dismissed before opening overlapping drawers. Similar behaviour is observed while trying to create new groups by pressing Ctrl+Shift+K.

Proposal

Dismiss any open modals before navigating to a modal screen through keyboard shortcut listener.

Keyboard listeners for search & new groups are getting registered over here :-

https://github.com/Expensify/App/blob/main/src/libs/Navigation/AppNavigator/AuthScreens.js#L164-L169

My proposal is to invoke Navigation.dismissModal() before navigating to new modal, so that it will close any open modals before opening the search drawer when invoked via keyboard shortcut.

        // Listen for the key K being pressed so that focus can be given to
        // the chat switcher, or new group chat
        // based on the key modifiers pressed and the operating system
        this.unsubscribeSearchShortcut = KeyboardShortcut.subscribe(searchShortcutConfig.shortcutKey, () => {
            Navigation.dismissModal();
            Navigation.navigate(ROUTES.SEARCH);
        }, searchShortcutConfig.descriptionKey, searchShortcutModifiers, true);
        this.unsubscribeGroupShortcut = KeyboardShortcut.subscribe(groupShortcutConfig.shortcutKey, () => {
            Navigation.dismissModal();
            Navigation.navigate(ROUTES.NEW_GROUP);
        }, groupShortcutConfig.descriptionKey, groupShortcutModifiers, true);

Result

fix.mp4

@parasharrajat
Copy link
Member

Reviewing proposals...

@parasharrajat
Copy link
Member

Both of the proposals work but they are not full-proof solutions. I would be glad if someone can really pick the right cause and propose a fix for that.

Open modals are not dismissed before opening overlapping drawers. Similar behaviour is observed while trying to create new groups by pressing Ctrl+Shift+K.

This is not a reason. It more sounds like the issue statement.

To add more to the context.

  1. A solution must be fixing the CustomActions.pushDrawerState.
  2. This happens when two or more of the modal Screens are active on the RootStack.Navigator.
  3. When point 2 happens, it creates three routes on the navigation state. Home (Report Screen) => Details => Search. Currently CustomActions.pushDrawerState is able to close the Search and take you back to Home but Details Route is not cleared.
  4. Navigation.dismissModal() should only be triggered when point 2 type of navigation (e.g Home => Details => Search.) happens but not when Home => Details.

@parasharrajat
Copy link
Member

Waiting for proposals...

@chiragsalian
Copy link
Contributor

Still waiting on proposals

@MelvinBot MelvinBot removed the Overdue label Jan 5, 2022
@hiteshagja
Copy link
Contributor

Thanks @chiragsalian. I will raise PR in the morning IST.

@hiteshagja
Copy link
Contributor

@parasharrajat Need new upwork Job posting b/c the old one expired.

@parasharrajat
Copy link
Member

cc: @kevinksullivan

@botify botify added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 1, 2022
@botify botify changed the title [$500] Account details stuck in RHN when switching chats [HOLD for payment 2022-03-08] [$500] Account details stuck in RHN when switching chats Mar 1, 2022
@botify
Copy link

botify commented Mar 1, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.40-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2022-03-08. 🎊

@hiteshagja
Copy link
Contributor

@kevinksullivan @parasharrajat

Could you please send upwork job external link or an offer?

@parasharrajat
Copy link
Member

@hiteshagja That can be arranged on the payment date. Be assured for the payment.

But before that, we faced a regression which I think is caused by your PR. https://expensify.slack.com/archives/C01GTK53T8Q/p1646351449854569

@hiteshagja
Copy link
Contributor

I will look into.

@kevinksullivan
Copy link
Contributor

Apologies @hiteshagja , I was OOO. Invited you to apply for the new job

https://www.upwork.com/jobs/~01a4bf9b60eba80639

@parasharrajat
Copy link
Member

Please reopen this issue @kevinksullivan

@hiteshagja
Copy link
Contributor

@parasharrajat

I have tried a lot to re-generate this issue but I could not. It's working fine for me. If it's still happening in yours then could you please suggest steps to re-generate the same.

expensifyDesktopApp_1.mp4

@parasharrajat
Copy link
Member

It happens sometimes only.

  1. Open the app directly via URL localhost.8080.
  2. Open the newChat page from heavy_plus_sign: and then click on any chat to open.
  3. Sometimes, opening the new Chat does not land on the requested chat instead the last recent open chat is refreshed.
  4. Try mixing the navigation via LHN or the New Chat page.

@hiteshagja
Copy link
Contributor

@parasharrajat

I have tried steps provided and tried many random steps (LHN + New Chat) + RHN but never come across scenario which you described. It's all working fine. Even tried different logins to check the same but that also worked well.

@kevinksullivan kevinksullivan reopened this Mar 7, 2022
@kevinksullivan
Copy link
Contributor

Noting there are potential regressions being investigated, so holding off on payment for now.

@parasharrajat
Copy link
Member

I think we are good for payment. Nobody is facing that issue again.

@kevinksullivan
Copy link
Contributor

Offer sent @hiteshagja and @parasharrajat . Once you accept I'll get this payment taken care of!

@hiteshagja
Copy link
Contributor

Accepted @kevinksullivan

@kevinksullivan
Copy link
Contributor

Paid @hiteshagja . @parasharrajat just sent offer so can pay once you accept. Thanks!

@parasharrajat
Copy link
Member

@kevinksullivan Done.

@kevinksullivan
Copy link
Contributor

All set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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 Weekly KSv2
Projects
None yet
Development

Successfully merging a pull request may close this issue.