You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-06-28] [HOLD for payment 2024-06-24] [$250] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page #43126
Version Number: 1.4-79-3 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to group chat.
Send a message and send a reply in thread.
Go to the thread.
Leave the thread via 3-dot menu > Leave.
Go to the same thread again.
Note that when leaving thread via 3-dot menu, there is no "Heads up" warning and thread does not load when reopening the thread after leaving.
Send a message and send a reply in thread.
Go to the thread.
Leave the thread via chat header > Leave.
Go to the same thread again.
Note that when leaving thread via group menu, there is "Heads up" warning and thread loads when reopening the thread after leaving.
Expected Result:
There should be consistency when leaving thread and reopening thread after leaving via 3-dot menu (Step 7) and group details page (Step 12)
Actual Result:
In Step 7. when leaving thread via 3-dot menu and reopening thread, there is no "Heads up" warning and thread does not load when reopening the thread after leaving
In Step 12, when leaving thread via group menu, there is "Heads up" warning and thread loads when reopening the thread after leaving
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
The real problem here is that, the leave button on the detail page shouldn't show for a thread. The condition to show the leave button is if it's either a group chat or a chat room and canLeaveChat is true.
changed the title [-] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/-][+][$250] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/+]on Jun 5, 2024
changed the title [-][HOLD for payment 2024-06-24] [$250] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/-][+][HOLD for payment 2024-06-28] [HOLD for payment 2024-06-24] [$250] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/+]on Jun 21, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.85-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@akinwale] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:'
Not a regression.
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Steps
Launch the Expensify app.
Create a group chat or open an existing group chat.
Send a message.
Reply in the thread of the new message.
Click or tap on the thread header.
Verify that there is no leave button on the details page.
Activity
melvin-bot commentedon Jun 5, 2024
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon Jun 5, 2024
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
lanitochka17 commentedon Jun 5, 2024
We think that this bug might be related to #vip-vsp
dragnoir commentedon Jun 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Leave from 3 dots on the header is not the same as leave from the report details page
What is the root cause of that problem?
On HeaderView, for the 3 dots leave action we call for
Report.leaveRoomApp/src/pages/home/HeaderView.tsx
Line 174 in 0efe60a
But on
ReportDetailsPagewe call forReport.leaveGroupChatApp/src/pages/ReportDetailsPage.tsx
Line 131 in 0efe60a
What changes do you think we should make in order to solve the problem?
We should do the same on HeaderView, for the 3 dots.
We shoudl check if
isChatRoomif so we call Report.leaveRoom, else we call forReport.leaveGroupChathttps://github.com/Expensify/App/blob/0efe60a7e681b02606b4e3d58bd000e3c88014cd/src/pages/ReportDetailsPage.tsx#L126-L131C9
What alternative solutions did you explore?
ShridharGoel commentedon Jun 5, 2024
This is not a bug, confirmation modal is only needed when last member leaves the group chat and not a thread.
bernhardoj commentedon Jun 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Pressing leave from the report detail page shows a modal confirmation but not from the 3-dot menu.
What is the root cause of that problem?
It's expected that if we press Leave from a 3-dot, it won't show a confirmation modal. It's only for a group chat in detail page as you can see here.
App/src/pages/ReportDetailsPage.tsx
Lines 216 to 217 in 8dbec8d
The real problem here is that, the leave button on the detail page shouldn't show for a thread. The condition to show the leave button is if it's either a group chat or a chat room and
canLeaveChatis true.App/src/pages/ReportDetailsPage.tsx
Line 209 in 8dbec8d
When we create a thread inside a group chat, it's still detected as a group chat because thread chatType is inherited from its parent.
What changes do you think we should make in order to solve the problem?
Don't show the leave button option if it's a thread.
We did this before in the original PR, but treated as out of scope.
ShridharGoel commentedon Jun 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page.
What is the root cause of that problem?
This is not a bug, confirmation modal is only needed when last member leaves the group chat and not a thread.
I think join and leave options are needed in threads to set notification preferences. But if we want to avoid showing them, then that can be done.
What changes do you think we should make in order to solve the problem?
In
canJoinChat, instead ofisRootGroupChatwe can useisGroupChatat this place:In
canLeaveChat, again instead ofisRootGroupChatwe can useisGroupChatat this place:melvin-bot commentedon Jun 5, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0166b95168c5d28cbd
[-] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/-][+][$250] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/+]22 remaining items
[-][HOLD for payment 2024-06-24] [$250] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/-][+][HOLD for payment 2024-06-28] [HOLD for payment 2024-06-24] [$250] Group chat thread - Inconsistency when leaving thread via 3-dot menu and group details page[/+]melvin-bot commentedon Jun 21, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.85-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-06-28. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 21, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
puneetlath commentedon Jun 24, 2024
@akinwale bump on the checklist so we can pay.
akinwale commentedon Jun 24, 2024
Not a regression.
Regression Test Steps
Do we agree 👍 or 👎?
akinwale commentedon Jun 24, 2024
@puneetlath Done.
puneetlath commentedon Jun 28, 2024
Regression issue here:
All paid. Thanks y'all!