-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-11-07] [$250] mWeb - Group chat - Not here page appears briefly when last member leave the group chat #49468
Comments
Triggered auto assignment to @strepanier03 ( |
@strepanier03 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 |
Edited by proposal-police: This proposal was edited at 2024-09-19 14:29:35 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.mWeb - Group chat - Not here page appears briefly when last member leave the group chat What is the root cause of that problem?We dismissModal and then call the leaveGroupChat here App/src/pages/ReportDetailsPage.tsx Lines 222 to 225 in 3657a67
We are deleting the report optimistically before navigating to recent chat in leaveGroupChat App/src/libs/actions/Report.ts Line 2795 in 3657a67
hence if the navigation is not quick enough we will see a not found page as the group chat is deleted in onyx What changes do you think we should make in order to solve the problem?We should execute the deleting code after the navigateToMostRecentReport has finished.
A similar method can used for What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-09-19 17:43:49 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Not here page appears briefly when last member leave the group chat What is the root cause of that problem?We're waiting for dismissModal navigation to trigger so we can see the not found page for a shot time What changes do you think we should make in order to solve the problem?
Change App/src/libs/actions/Report.ts Line 2739 in 10ea08e
to
What alternative solutions did you explore? (Optional)We can consider to remove ResultScreen.Recording.2024-09-26.at.15.33.14.mov |
Job added to Upwork: https://www.upwork.com/jobs/~021836833773766101729 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Reviewing.. |
@strepanier03, @parasharrajat Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@parasharrajat any updates? |
This is exactly the same issue as #48316, so I'm copying my proposal here. ProposalPlease re-state the problem that we are trying to solve in this issue.When leaving a group chat, not found briefly shows while navigating to the most recent report. What is the root cause of that problem?When we leave a group chat, we first dismiss the modal and then navigate to the most recent report and calls the request which will merge the optimistic data. App/src/libs/actions/Report.ts Lines 2791 to 2792 in 9e5887d
So, while the navigation is happening, the group chat is already cleared from Onyx, so, the not found page is shown while the navigation is happening. What changes do you think we should make in order to solve the problem?We can wait for the navigation animation before deleting the group chat. One way to do it is by using InteractionManager.
We can do the same approach to |
I will chech this in sometime. |
@dominictb I would like to understand your approach more closely. Can you please explain the main solution? How will it behave on UI? Then your alternative solution. What bugs are you talking about? |
@parasharrajat I updated the proposal to add the evidence video
I mentioned the bug in alternative solution The main idea is to remove the deleted group/chat from navigation stack, then navigate to most recent report |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@strepanier03, @parasharrajat Eep! 4 days overdue now. Issues have feelings too... |
@strepanier03, @parasharrajat Still overdue 6 days?! Let's take care of this! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@strepanier03 @parasharrajat this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
I will have the update in next few hours. |
@strepanier03, @parasharrajat Eep! 4 days overdue now. Issues have feelings too... |
ProposalPlease re-state the problem that we are trying to solve in this issue.The "Not here" page briefly appears when the last member leaves the group chat in mWeb. What is the root cause of that problem?When we set the report to null App/src/libs/actions/Report.ts Lines 2760 to 2766 in b4b5965
App/src/pages/home/ReportScreen.tsx Line 376 in b4b5965
What changes do you think we should make in order to solve the problem?I think delete the report using set is too fast, even when we've already navigate first. App/src/libs/actions/Report.ts Lines 2776 to 2777 in b4b5965
If we follow the same pattern as We can use const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
reportID: null,
stateNum: CONST.REPORT.STATE_NUM.APPROVED,
statusNum: CONST.REPORT.STATUS_NUM.CLOSED,
participants: {
[currentUserAccountID]: {
notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
},
},
},
},
]; And then when the API success, we can remove the rest of object const successData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: Object.keys(report).reduce<Record<string, null>>((acc, key) => {
acc[key] = null;
return acc;
}, {}),
},
];
Adding const failureData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: report,
},
];
Result Kapture.2024-10-15.at.16.59.19.mp4What alternative solutions did you explore? (Optional)N/A |
@wildan-m Can you show a clip of how it works? |
@parasharrajat sure,
|
@wildan-m Will it work while offline? Let's say backend failed to send the success, then how will it behave. |
@parasharrajat This is offline behavior. I haven't noticed any offline behavior side effects yet. Kapture.2024-10-15.at.20.27.37.mp4 |
Triggered auto assignment to @tgolen, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @wildan-m 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@parasharrajat The PR is ready #50846. Thanks! |
I can take this as C+ if this is critical while @parasharrajat is OOO until Oct 25 |
Thanks for the offer @allgandalf. I didn't see it in time, but this wasn't a highly urgent issue so it was OK to wait for @parasharrajat to get back. |
I am back. Thanks for waiting. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.55-10 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-11-07. 🎊 For reference, here are some details about the assignees on this issue:
|
@parasharrajat @strepanier03 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.38-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4985233&group_by=cases:section_id&group_order=asc&group_id=229067
Email or phone of affected tester (no customers): gocemate+a2197@gmail.com
Issue reported by: Applause Internal Team
Slack conversation:
Action Performed:
Expected Result:
There should be no error page
Actual Result:
Not here page appears briefly when last member leave the group chat
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6608577_1726732763600.Recording__3970.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @strepanier03The text was updated successfully, but these errors were encountered: