-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] [Group Chats] Selecting a user via Search creates a Group Chat incorrectly #39560
Comments
Job added to Upwork: https://www.upwork.com/jobs/~011a118694cb14efc8 |
Triggered auto assignment to Contributor Plus for review of internal employee PR - @mananjadhav ( |
Triggered auto assignment to @kevinksullivan ( |
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
We are not totally sure how to reproduce this. But it seems possibly related to the fact that Stevie has an incorrect value for report data for correct chat in Amy's account: Has correct report data for correct chat in Stevie's account: Is identical (a.k.a. it is wrong and should be an array with Amy's Still unsure why the frontend would be trying to create a Group Chat in that case. @s77rt might be able to figure it out since they have the most context and worked closely with us on this feature. |
Will check this asap |
ProposalPlease re-state the problem that we are trying to solve in this issue.Selecting a user via search after creating a group chat creates a group instead of 1-1 DM What is the root cause of that problem?The issue occurs because when creating a group we set the Draft group when navigating to the confirm group page and, dont clear the draft state after creating the group Line 199 in d4da2d7
What changes do you think we should make in order to solve the problem?Two possible solutions here:
if (!newGroupDraft || !isFromStartNewChat) {
if (newGroupDraft && isFromStartNewChat) { alternativelyanother solution would be to call the App/src/libs/actions/Report.ts Lines 225 to 228 in be315d6
3rd solutionanother solution would be to remove the |
@abzokhattab Thanks a lot for looking into this. Your RCA is correct. However for the solution I have something else in mind. I just realised that we don't need |
after thinking more about it, yes i agree, we can just add |
@s77rt are you sending in a proposal ? |
Oh sorry I thought I'm assigned here. Was going straight with a PR |
Posting a proposal, a moment please |
No worries. Just ensuring that we are on the same page. |
added a third solution incase my contribution will be counted 😂 |
ProposalPlease re-state the problem that we are trying to solve in this issue.After creating a group chat, you can't create a 1:1 chat from search page What is the root cause of that problem?In
We will be creating a group as long as there is a draft value What changes do you think we should make in order to solve the problem?Don't rely on the presence of the draft value to deterimne if we are navigating to a group chat. Instead rely on the number of participants i.e.
What alternative solutions did you explore? (Optional)None |
Thanks for the proposal. It looks straightforward and reliable to use 🎀 👀 🎀 C+ reviewed. |
Triggered auto assignment to @roryabraham, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
We can keep relying on the |
Just a quick note here, there's a an ongoing discussion that we might allow creating a group chat with only one participant here #39317 (comment) .. in this case using the correct condition i think would be: isGroupChat = participantAccountIDs.includes(currentUserAccountID) Because if the report is direct dm, the |
The draft is cleared only when starting a new group. Same way with IOU. The IOU draft is cleared only when starting a new IOU. |
@abzokhattab That will still work because when creating a group chat even with one person the participantAccountIDs.length will be 2.
|
no I mean the group will contain only one participant which is the author in this case the length is 1. |
Ah I see. Good point. However I'm feeling like this should be handled when the feature is implemented |
I was a bit confused by this proposal as the bug reported is that a Group Chat was created via the "Search" page and not the "New Chat" page. But sounds like we have definitely uncovered a way this could happen. Great investigation. Confirming with @slafortune now to see if it's possible she took these steps. @mananjadhav do you mind if we make @s77rt the C+ here and have @abzokhattab collaborate on the PR? I think that would be a fair way to handle this since both have different ideas on the solution. Let me know if it's any problem. |
Current assignee @mananjadhav is eligible for the External assigner, not assigning anyone new. |
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @abzokhattab 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Gonna assign everyone so we can make some progress, but let's collaborate in the PR since @s77rt already has it open. |
@abzokhattab Let's do that change when it becomes needed (by that time we may have other options). isGroupChat = participantAccountIDs.includes(currentUserAccountID) An extreme edge case, what if the generated optimistic account id in |
Okay sure. |
This issue has not been updated in over 15 days. @mananjadhav, @s77rt, @kevinksullivan, @marcaaron, @abzokhattab eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
@s77rt, @kevinksullivan, @marcaaron, @abzokhattab, this Monthly task hasn't been acted upon in 6 weeks; closing. If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead. |
This is closed already. Do we need to remove te |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number:
Reproducible in staging?:
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @slafortune @amyevans
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1712159111998949
Action Performed:
Expected Result:
Actual Result:
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: