[$4000] LHN - The group disappears when you open the chat and appears when the page is refreshed (#focus mode)
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:
- Open https://staging.new.expensify.com
- Log in to the account
- Go to Avatar > Preferences > enable #focus mode
- Then, navigate back to the main chats page.
- Open any chat
- Tap on Fab menu
- Create a Group Chat with 2 user (or more)
- Go back to LHN
- Refresh
- Tap on any other DM chat (not the Group chat you created in step 5)
- Go back to LHN
- Refresh the page
- 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:
Upwork job URL: https://www.upwork.com/jobs/~01e478e78066932f92
Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
I was able to reproduce, unless I was using search, I couldn't select the newly created groups.
Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
upwork post is here: https://www.upwork.com/jobs/~01b28296ea218398c8
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (Exported)
Triggered auto assignment to @MonilBhavsar (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
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
@mananjadhav or @MonilBhavsar can we get a review here?
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 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
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.
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 ^
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
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.
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.
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?
@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!
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.
Yes, thanks for looking and clarifying! Let's wait for response from QA team and we can move forward then.
I'm putting Reviewing on so this stops going overdue if we're waiting for something
@kbecciv 👀 plz https://github.com/Expensify/App/issues/9391#issuecomment-1158654898
@mallenexpensify Going to retest tomorrow, will update you shortly.
@mallenexpensify @MonilBhavsar Issue reproduced:
- iPhone/Safari
- 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
Thanks @kbecciv , @mananjadhav , can you provide an update on the next best step forward based on @kbecciv 's confirmation the issue is still happening?
Triggered auto assignment to @Christinadobrzyn (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Ohh somehow I missed this one. Let me get to it by tomorrow.
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.
I'm going ooo so assigning this to another teammate - working on a PR.
Triggered auto assignment to @laurenreidexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
@mananjadhav bump :)