Prevent threads from being counted as DMs#37030
Conversation
|
@thesahindia 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] |
|
Hi, I'm looking for reviews so I will jump in here and review early. |
neil-marcellini
left a comment
There was a problem hiding this comment.
I think we need to be careful about modifying a general function like this. We need to make sure that all uses of it make sense with the updated logic.
For example, this code could be broken if we exclude threads from being DMs.
I think we should replace some uses of this function to check if the top level parent report is a DM, and we should test related functionality.
|
@neil-marcellini I made sure that this was working with the other invocations of the function as well
In this code, it is expected that we should not include threads because we assume the user present only in 1:1 DM and not threads. So, in fact it would maybe fix a possible bug where the current user would be counted as a member of a thread without joining it. |
Reviewer Checklist
Screenshots/Videos |
|
I have tested it and approving in case we move forward without changing something. I am going OOO. |
neil-marcellini
left a comment
There was a problem hiding this comment.
What about this code?
Lines 983 to 996 in 0d3f47b
It says that we should prevent creating a task in a DM / group if all other participants are Expensify accounts. Now that a thread within a DM is not considered a DM, users can create a task in a thread where all other participants are Expensify accounts.
That seems wrong.
Please check all uses of the function recursively and make sure they make sense. It would be helpful to write an explanation of that in the comment. Sorry to be so strict, but I don't want to break a bunch of stuff.
|
Really sorry for the delay! Had to take a break due to health reasons... Here is a comprehensive explanation for the change at all places:
So now here are the options we have:
|
|
Please let me know which option to move forward with as listed above. |
|
@esh-g thanks for checking all uses and adding explanation. It all looks good to me except Let's move forward with this and remove redundant checks for |
|
@neil-marcellini I delved deeper into the
Sorry once again for the communication lag, but I hope you get my point and please correct me if I'm wrong in my understanding somewhere |
That's an interesting case and I appreciate you considering it. I'll tag in @thienlnam since he worked on tasks a lot. Also let us know what you think @madmax330. I think that there is currently a bug on prod at step 4. It doesn't really make sense to me that you can't create a task in the parent DM chat, but you can in a thread. Maybe others see it differently though. With the current changes in this PR you wouldn't be allowed to create a task in a DM with concierge, but you could in a thread on that DM if concierge joined it. That's inconsistent. Let's aim for consistency. |
This check is only so that you can't create a task when it's just between you and one of our processing expensify email accounts. Likely your DMs with Concierge, Chronos, etc.
This generally won't happen - most of those accounts will not join any threads maybe with the exception of Concierge.
We've kind of moved forward with the notion that this isn't a bug because a child report can constitute of different members. Even if you can't invite someone to the DM between you and Concierge, you can create a thread, and invite members there and so we allow task creation there as well |
|
Alrighty, thanks for your perspective @thienlnam! After your explanation I think I'm happy with the current solution. I didn't know that you can invite members outside of a DM into a thread within that DM. It feels a little strange to me, but if that's how it works we should match that. |
neil-marcellini
left a comment
There was a problem hiding this comment.
Looking good and I'm happy with what we have discussed so far. I feel like the following is a mistake. Please lmk if I'm wrong somewhere, but I feel pretty confident that this presents an issue.
|
@neil-marcellini Be sure to let me know if something else is left. I once checked all instances of |
neil-marcellini
left a comment
There was a problem hiding this comment.
I'm happy with it now thanks! All you @madmax330
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 1.4.51-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.51-3 🚀
|






Details
Fixed Issues
$ #34651
PROPOSAL: #34651 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-02-21.at.9.43.57.PM.mov
Android: mWeb Chrome
Screen.Recording.2024-02-21.at.9.34.52.PM.mov
iOS: Native
Screen.Recording.2024-02-21.at.9.52.33.PM.mov
iOS: mWeb Safari
Screen.Recording.2024-02-21.at.9.54.50.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-02-21.at.9.25.59.PM.mov
MacOS: Desktop
Screen.Recording.2024-02-21.at.10.36.04.PM.mov