Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.03k stars 2.54k forks source link

Don't hide empty group chats #42234

Closed srikarparsi closed 1 week ago

srikarparsi commented 2 weeks ago

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/40314 PROPOSAL:

Tests

  1. Open FAB
  2. Select add to group on 2 or more users
  3. Click Next and Start Group
  4. Navigate to another report using LHN
  5. Ensure that the group chat remains in LHN and doesn't disappear

Offline tests

QA Steps

PR Author Checklist

Screenshots/Videos

Android: Native Didn't add because mWeb Chrome covers the smaller screen case
Android: mWeb Chrome image
iOS: Native Didn't add because mWeb Safari covers the smaller screen case
iOS: mWeb Safari image
MacOS: Chrome / Safari image
MacOS: Desktop image
melvin-bot[bot] commented 2 weeks ago

@situchan @ One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

srikarparsi commented 2 weeks ago

Yeahh I think we need both the frontend and the backend change right? Because even if the report isn't hidden, this check will return false without this PR since the chat will be empty.

But the backend change is here. I'm about to step out so wasn't able to fill out everything but I'll do that tonight once I'm back. There's also an issue with Onyx updates I believe because even though we're setting the notificationPreference to hidden, the response of OpenReport is always. I don't think that it affects this issue directly but we should still solve it so I'll try to expand more on that and figure out a fix once I'm back.

marcaaron commented 2 weeks ago

Yeahh I think we need both the frontend and the backend change right? Because even if the report isn't hidden, this check will return false without this PR since the chat will be empty.

Oh I see - so they are hiding when empty by default. If that's the case then you are right! We need this + the backend change since they will still hide because they are notificationPreferences = 'hidden' πŸ‘

situchan commented 2 weeks ago

LGTM2. Testing shortly

situchan commented 1 week ago

Reviewer Checklist

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari https://drive.google.com/file/d/1PgqtrgwAGicqOHMl7Nk19yAIYuteUGIP/view?usp=sharing
MacOS: Desktop https://github.com/Expensify/App/assets/108292595/0d245ec7-7d7b-4049-8cc3-413edbb5dfd5
situchan commented 1 week ago

Not sure if I am doing wrong but group chat still disappears from LHN when switch report

https://drive.google.com/file/d/11fqzc0pXFCNI8sV4yRNGNb5UbokMFfgi/view?usp=sharinga

srikarparsi commented 1 week ago

Just fixed that. But even before fixing that, I'm not able to reproduce what you were facing @situchan. @marcaaron, do you think you can try creating a new GC with this branch and checking if it stays in the LHN when you navigate away? You don't need to checkout the Auth branch, just this one should be good.

situchan commented 1 week ago

I debugged myself and confirmed @marcaaron is correct.

Newly created group chat is not visible in LHN because "notificationPreference" is set to "hidden".

https://github.com/Expensify/App/blob/e8ae3c5acedf0e6788dc574c7b6f3043ca37092a/src/libs/SidebarUtils.ts#L98-L105

situchan commented 1 week ago

After latest change, works fine locally but not on another device.

Repro step:

  1. Login same account on device A & B
  2. On A, create new group chat
  3. Switch to another chat
  4. Verify that group chat is still visible in LHN
  5. On B, deep link to group chat
  6. Switch to another chat
  7. BUG? Group chat is not visible in LHN
melvin-bot[bot] commented 1 week ago

@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

srikarparsi commented 1 week ago

After latest change, works fine locally but not on another device.

I'm not able to reproduce this. Am I doing the right steps @situchan?

https://github.com/Expensify/App/assets/48188732/e64f5eae-ae72-412c-a99c-8a89bb0b9165

situchan commented 1 week ago

After latest change, works fine locally but not on another device.

I'm not able to reproduce this. Am I doing the right steps @situchan?

Screen.Recording.2024-05-22.at.2.35.29.AM.mov

yes, right step

OSBotify commented 1 week ago

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

OSBotify commented 5 days ago

πŸš€ Deployed to staging by https://github.com/chiragsalian in version: 1.4.76-0 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…
kavimuru commented 5 days ago

Failing with #40314 in mweb and android. https://platform.applause.com/services/links/v1/external/7390a1b0aa73cbef607095fe9186e35440b2b2b17a0bd13846dbd46fef095b5f https://platform.applause.com/services/links/v1/external/d09c5f4f1ee54f065bdbc6e0346ed8843366211e8950f2d9198c2c9bbd1f77cd

situchan commented 4 days ago

Just retested with fresh account on staging. Not able to reproduce on mWeb.

OSBotify commented 3 days ago

πŸš€ Deployed to production by https://github.com/Beamanator in version: 1.4.76-7 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ