-
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
[VSB] [$500] Room - Inviting a user to the room does not remove other whisper messages #36629
Comments
Job added to Upwork: https://www.upwork.com/jobs/~013c530387770aef42 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Triggered auto assignment to @strepanier03 ( |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Room - Inviting a user to the room does not remove other whisper messages What is the root cause of that problem?We don't have any implementation to handle duplicate What changes do you think we should make in order to solve the problem?Since we have the participants list in the report and we get Example Code: function areAllValuesPresent(arr1, arr2) {
// Convert arr2 to a Set for efficient membership testing
const set2 = new Set(arr2);
// Check if all elements of arr1 are present in arr2
for (let i = 0; i < arr1.length; i++) {
if (!set2.has(arr1[i])) {
return false;
}
}
return true;
}
const membersAlreadyInvited = areAllValuesPresent(props.action.originalMessage.inviteeAccountIDs, props.report.participantAccountIDs);
if (membersAlreadyInvited) {
Report.resolveActionableMentionWhisper(props.report.reportID, props.action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE);
} We will use better approach for writing this code, this is only for example. We also need to add We will update Resultremove_whisper.mp4 |
@strepanier03, @parasharrajat Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I believe this issure would be better solved on the backend side. |
@parasharrajat - What do you think? Keep it external or move it internal for a BE fix? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Reviewing... |
ProposalPlease re-state the problem that we are trying to solve in this issue.In the chat functionality, when multiple whispers (system messages prompting an action, such as inviting a user to the room) targeting the same user are present, they clutter the chat interface. This happens even after the user has been invited, leading to a confusing user experience. The expected behavior is to manage these whispers more efficiently to enhance chat readability and user experience. What is the root cause of that problem?The root cause is the lack of a mechanism to manage duplicate or redundant whispers in the chat. The current implementation does not account for the scenario where multiple whispers inviting the same user can accumulate, nor does it provide a method for resolving these whispers once the user has been invited, resulting in unnecessary clutter. What changes do you think we should make in order to solve the problem?To address this issue, we propose implementing a new mechanism within the chat functionality that adheres to the following rules:
Implementing these changes involves updating the Here's a pseudo-code outline of the approach: function manageWhispersForDisplay(reportActions: ReportAction[]) {
const whispers = extractWhispers(reportActions);
const uniqueUserWhispers = keepAtLeastOneWhisperPerParticipant(whispers);
return filterAndResolveWhispers(reportActions, uniqueUserWhispers);
}
function extractWhispers(reportActions) {
// Logic to extract whisper actions
}
function keepAtLeastOneWhisperPerParticipant(whispers) {
// Logic to ensure at least one whisper per participant remains
}
function filterAndResolveWhispers(reportActions, criteria) {
// Logic to remove or resolve whispers based on the invitation acceptance and criteria
}
|
I like @brandonhenry's suggestion, let me discuss this over slack to confirm. https://expensify.slack.com/archives/C01GTK53T8Q/p1708776157403919 |
@brandonhenry Can we optimize the suggested logic? it seems Do you have any other ideas on hiding/removing duplicate messages? IMO, we should remove the duplicate system messages instead of filtering them. Because, there is no use of these messages when one of such message is resolved. |
@parasharrajat will have this to you today hopefully. My idea for the duplicate messages involves removing the previous duplicate system message before showing the new one (instead of simply showing the most recent one that came in only, we delete the old ones and then show the most recent one) |
All good Melvin, not overdue. |
@parasharrajat updated proposal to address complexity concerns as well as duplicate system messages sticking |
Thanks for waiting. I have been discussing this over Slack. https://expensify.slack.com/archives/C01GTK53T8Q/p1708776157403919. |
I'm assigned and will look into this once I've cleared off my plate a bit |
@strepanier03 @parasharrajat @jasperhuangg this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks! |
Thanks @jasperhuangg! |
Looking into this this week |
@strepanier03, @parasharrajat, @jasperhuangg Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Not overdue! |
Made some good progress on a PR with this today, looking to get it ready for review before EOW |
More progress on tests, I think I should be able to get it out for review today |
Ran into some hiccups with the tests, looking into them, but might have to continue investigation tomorrow since I've already worked on this a good amount today. |
Still looking into the tests for this–they're a bit complicated since there's a good amount of code to be added for this. |
PR is ready for review! |
@strepanier03, @parasharrajat, @jasperhuangg Eep! 4 days overdue now. Issues have feelings too... |
Still under review, not overdue |
@strepanier03, @parasharrajat, @jasperhuangg Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
The Auth PR was deployed, we can close this out! |
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: 1.4.42-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR #34560
Action Performed:
Expected Result:
Inviting a user to the room other same whisper messages should be removed
Actual Result:
Inviting a user to the room does not remove other whisper messages
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6381090_1708024231225.2024-02-16_00-08-28.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: