App icon indicating copy to clipboard operation
App copied to clipboard

[$4000] LHN - The group disappears when you open the chat and appears when the page is refreshed (#focus mode)

Open kbecciv opened this issue 3 years ago • 129 comments

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 https://staging.new.expensify.com
  2. Log in to the account
  3. Go to Avatar > Preferences > enable #focus mode
  4. Then, navigate back to the main chats page.
  5. Open any chat
  6. Tap on Fab menu
  7. Create a Group Chat with 2 user (or more)
  8. Go back to LHN
  9. Refresh
  10. Tap on any other DM chat (not the Group chat you created in step 5)
  11. Go back to LHN
  12. Refresh the page
  13. See the Group Chat that you made in step 5 disappears from LHN list.

Expected Result:

Group chat conversation should remain in the LHN

Actual Result:

The group disappears when you open the chat and appears when the page is refreshed.

Platform:

Where is this issue occurring?

  • Mobile Web

Version Number: 1.1.75.1

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): any mobile device

Issue reported by: Applause - Internal Team

https://user-images.githubusercontent.com/93399543/172963430-9320e257-6ade-426c-b2bb-02e5f838f3b9.mp4

Slack conversation:

View all open jobs on GitHub

Upwork job URL: https://www.upwork.com/jobs/~01e478e78066932f92

kbecciv avatar Jun 09 '22 23:06 kbecciv

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

melvin-bot[bot] avatar Jun 09 '22 23:06 melvin-bot[bot]

I was able to reproduce, unless I was using search, I couldn't select the newly created groups.

pecanoro avatar Jun 10 '22 14:06 pecanoro

Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] avatar Jun 10 '22 14:06 melvin-bot[bot]

upwork post is here: https://www.upwork.com/jobs/~01b28296ea218398c8

jboniface avatar Jun 10 '22 15:06 jboniface

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

melvin-bot[bot] avatar Jun 10 '22 15:06 melvin-bot[bot]

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

melvin-bot[bot] avatar Jun 10 '22 15:06 melvin-bot[bot]

Proposal

So there's a condition on getOptions from OptionsListUtils whether we want to show the empty report or not with passing showReportsWithNoComments to true. https://github.com/Expensify/App/blob/6bac9af7294877114f8bf9532ff7b8c46146c90d/src/libs/OptionsListUtils.js#L421-L436

In our current implementation, we use getSidebarOptions to get the report list but we not pass showReportsWithNoComments (which by default is false).

In this example, I have the group chat with report ID 95514795 and regular chat with report ID 95514772 (this report has a chat so report.lastMessageTimestamp doesn't have 0 value, and makes the report listed in LHN).

On the Web, when we select another chat from LHN, the group report 95514795 disappear because is an empty chat. But we can open the group chats by passing the report ID to the URL, and it will be listed again in LHN.

https://user-images.githubusercontent.com/25520267/173174648-126835fe-9299-44f1-85a2-63be5af3d861.mov

This is on mobile.

https://user-images.githubusercontent.com/25520267/173174907-b7f8e7d2-a8c7-4753-9d9e-d74c5cc640d0.mp4

The solution might be passing showReportsWithNoComments to true on getSidebarOptions but I think is not ideal because it will impact the empty regular chat (I don't know if we want to show empty chat on LHN or not) or we can make an exception for group chat when determining the shouldFilterReportIfEmpty value.

+                && !(report.participants.length > 1)

https://github.com/Expensify/App/blob/6bac9af7294877114f8bf9532ff7b8c46146c90d/src/libs/OptionsListUtils.js#L421-L426

mollfpr avatar Jun 11 '22 05:06 mollfpr

@mananjadhav or @MonilBhavsar can we get a review here?

jboniface avatar Jun 14 '22 17:06 jboniface

I agree with @mollfpr's analysis. @MonilBhavsar Do we know the expected behaviour here? Should we be showing Group chats but not the individual chats?

mananjadhav avatar Jun 15 '22 06:06 mananjadhav

@mananjadhav We also seen this issue with individual chat. Please let us know if we need a separate issue.

https://user-images.githubusercontent.com/93399543/174122777-8899dd8f-8ede-4d96-b000-c44a89cc076c.mp4

kbecciv avatar Jun 16 '22 16:06 kbecciv

but I think is not ideal because it will impact the empty regular chat (I don't know if we want to show empty chat on LHN or not)

@kbecciv I am aware. @mollfpr also mentioned the same thing. We might not need a separate issue. Based on the expected behaviour, we might be able to address it here. Thanks for the ping.

mananjadhav avatar Jun 16 '22 16:06 mananjadhav

I agree with @mollfpr's analysis. @MonilBhavsar Do we know the expected behaviour here? Should we be showing Group chats but not the individual chats?

@MonilBhavsar Bump ^

mananjadhav avatar Jun 17 '22 06:06 mananjadhav

I can't seem to reproduce the issue. Can anyone please tell If I'm holding something wrong?

https://user-images.githubusercontent.com/32012005/174242789-09e32507-f531-411e-95f0-9ef928161bc6.mov

MonilBhavsar avatar Jun 17 '22 06:06 MonilBhavsar

As you can see after you create the chat group, we redirected to the reportID that just created. After we select another chat, the recent chat group we created is not on the list.

For case when refresh the page the chat group that missing is showing now, that’s because the page redirect to the chat that we just created.

mollfpr avatar Jun 17 '22 07:06 mollfpr

The video on the description issue is shown on mWeb.

We use the back button to open the LHN and it takes the URL to the previous report ID which is the chat group that was just created.

mollfpr avatar Jun 17 '22 07:06 mollfpr

After we select another chat, the recent chat group we created is not on the list.

I would say that is an expected behaviour. But chat appearing in LHN after refresh is definitely a bug.

For case when refresh the page the chat group that missing is showing now, that’s because the page redirect to the chat that we just created.

Can you please tell which case. Is it only reproducible on mobile web?

MonilBhavsar avatar Jun 17 '22 08:06 MonilBhavsar

@kbecciv, issue details states that issue is reproducible on Web, iOS, Android, Desktop App, Mobile Web. Looks like issue is occurring on mobile web only. Could you please recheck. Thanks!

MonilBhavsar avatar Jun 17 '22 08:06 MonilBhavsar

Can you please tell which case. Is it only reproducible on mobile web?

I believe it’s only mWeb (maybe on desktop too when it’s resized the screen to mobile layout), I’m not checking on native yet.

mollfpr avatar Jun 17 '22 08:06 mollfpr

Yes, thanks for looking and clarifying! Let's wait for response from QA team and we can move forward then.

MonilBhavsar avatar Jun 17 '22 09:06 MonilBhavsar

I'm putting Reviewing on so this stops going overdue if we're waiting for something

jboniface avatar Jun 20 '22 14:06 jboniface

@kbecciv 👀 plz https://github.com/Expensify/App/issues/9391#issuecomment-1158654898

mallenexpensify avatar Jun 28 '22 18:06 mallenexpensify

@mallenexpensify Going to retest tomorrow, will update you shortly.

kbecciv avatar Jun 29 '22 01:06 kbecciv

@mallenexpensify @MonilBhavsar Issue reproduced:

  1. iPhone/Safari
  2. Android/Chrome Please attached the videos

https://user-images.githubusercontent.com/93399543/176447956-3cdd1c44-9807-4776-aa01-165e1e04fc06.mp4

https://user-images.githubusercontent.com/93399543/176448005-a4bbe30a-7eb4-4680-b0bc-75dfc981349a.MP4

kbecciv avatar Jun 29 '22 13:06 kbecciv

Thanks @kbecciv , @mananjadhav , can you provide an update on the next best step forward based on @kbecciv 's confirmation the issue is still happening?

mallenexpensify avatar Jun 29 '22 19:06 mallenexpensify

Triggered auto assignment to @Christinadobrzyn (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] avatar Jul 05 '22 18:07 melvin-bot[bot]

Ohh somehow I missed this one. Let me get to it by tomorrow.

mananjadhav avatar Jul 05 '22 18:07 mananjadhav

Job already posted here:

Internal - https://www.upwork.com/ab/applicants/1535280862269952000/job-details External - https://www.upwork.com/jobs/~01b28296ea218398c8

Let me know if we need to change anything about this posting.

Christinadobrzyn avatar Jul 06 '22 17:07 Christinadobrzyn

I'm going ooo so assigning this to another teammate - working on a PR.

Christinadobrzyn avatar Jul 07 '22 18:07 Christinadobrzyn

Triggered auto assignment to @laurenreidexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] avatar Jul 07 '22 18:07 melvin-bot[bot]

@mananjadhav bump :)

laurenreidexpensify avatar Jul 11 '22 13:07 laurenreidexpensify