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-02-07] [$500] Thread - "Join" button appear when user Leave thread #34820
Version Number: 1.4.28-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: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Navigate to a conversation
Start a thread and send some messages
Click on the three dot menu and hit "Leave thread"
Expected Result:
User should navigate back to the parent conversation with no visual issues
Actual Result:
"Join" button appear when user Leave thread
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Thread - "Join" button appear when user Leave thread[/-][+][$500] Thread - "Join" button appear when user Leave thread[/+]on Jan 19, 2024
Please re-state the problem that we are trying to solve in this issue.
"Join" button appear when user Leave thread
What is the root cause of that problem?
Below are the conditions that need to be met to show the join button, technically when user click leave thread all conditions meet and join button appears while we are navigating the user to the parent chat.
What changes do you think we should make in order to solve the problem?
We need to check if navigation is in progress, we can use useIsFocused hook to check if screen is focused, so join is not visible until user is redirected to the parent chat
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
so when leaving a thread the isThreadChat falsely returns true while transitioning resulting in showing the join button.
What changes do you think we should make in order to solve the problem?
we can pass the isReportReadyForDisplay from the ReportScreen component as a prop with default value as false then update the condition that is responsible for showing the header tooltip:
we can fix the isThreadChat function since it shouldn't return true for a report the user left, to fix it we need to fix the underlying isThread
function to check if the current reportID exits:
Please re-state the problem that we are trying to solve in this issue.
The navigation on leaving Thread is delayed
What is the root cause of that problem?
First of all, I'd like to stress out that the issue is not only with the "Join" button but with the skeleton view as well.
This is happening because we do not explicitly pass the navigation command on leaving the thread in Report.leaveRoom() as opposed to the leaving room:
We wait until it's removed from Onyx, and then the user gets navigated automatically because the thread report no longer exists. And this moment between the report being deleted and the user being navigated is causing the behavior in this issue.
What changes do you think we should make in order to solve the problem?
We need to explicitly navigate the user to the parent report upon leaving the thread:
if(isChatThread(report)){Navigation.goBack(ROUTES.HOME);Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.parentReportID));}elseif(isWorkspaceMemberLeavingWorkspaceRoom){constparticipantAccountIDs=PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]);constchat=ReportUtils.getChatByParticipants(participantAccountIDs);if(chat?.reportID){// We should call Navigation.goBack to pop the current route first before navigating to Concierge.Navigation.goBack(ROUTES.HOME);Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat.reportID));}}
Result:
Screen.Recording.2024-01-19.at.19.00.15.mov
What alternative solutions did you explore? (Optional)
changed the title [-][$500] Thread - "Join" button appear when user Leave thread[/-][+][HOLD for payment 2024-02-07] [$500] Thread - "Join" button appear when user Leave thread[/+]on Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 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:
[@s77rt / @DylanDylann] The PR that introduced the bug has been identified. Link to the PR:
[@s77rt / @DylanDylann] 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:
[@s77rt / @DylanDylann] 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:
[@s77rt / @DylanDylann] Determine if we should create a regression test for this bug.
[@s77rt / @DylanDylann] 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.
[@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
melvin-bot commentedon Jan 19, 2024
Job added to Upwork: https://www.upwork.com/jobs/~012a09bc563f2546c1
[-]Thread - "Join" button appear when user Leave thread[/-][+][$500] Thread - "Join" button appear when user Leave thread[/+]melvin-bot commentedon Jan 19, 2024
Triggered auto assignment to @lschurr (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 19, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)lanitochka17 commentedon Jan 19, 2024
We think that this bug might be related to #vip-vsb.
CC @quinthar
ishpaul777 commentedon Jan 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Join" button appear when user Leave thread
What is the root cause of that problem?
Below are the conditions that need to be met to show the
joinbutton, technically when user clickleavethread all conditions meet and join button appears while we are navigating the user to the parent chat.App/src/pages/home/HeaderView.js
Lines 155 to 156 in 56fb814
What changes do you think we should make in order to solve the problem?
We need to check if navigation is in progress, we can use
useIsFocusedhook to check if screen is focused, so join is not visible until user is redirected to the parent chatWhat alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
abzokhattab commentedon Jan 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Join" button appear when user Leave thread
What is the root cause of that problem?
when leaving a room we change the reportID optimistically to
nullApp/src/libs/actions/Report.ts
Line 2095 in 6c72ef8
and the join button is shown based on this condition:
App/src/pages/home/HeaderView.js
Lines 156 to 157 in 7b1035c
so when leaving a thread the
isThreadChatfalsely returnstruewhile transitioning resulting in showing the join button.What changes do you think we should make in order to solve the problem?
we can pass the isReportReadyForDisplay from the
ReportScreencomponent as a prop with default value as false then update the condition that is responsible for showing the header tooltip:App/src/pages/home/HeaderView.js
Line 309 in 7b1035c
to:
alternativly
we can fix the isThreadChat function since it shouldn't return
truefor a report the user left, to fix it we need to fix the underlying isThreadfunction to check if the current reportID exits:
paultsimura commentedon Jan 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The navigation on leaving Thread is delayed
What is the root cause of that problem?
First of all, I'd like to stress out that the issue is not only with the "Join" button but with the skeleton view as well.
This is happening because we do not explicitly pass the navigation command on leaving the thread in
Report.leaveRoom()as opposed to the leaving room:App/src/libs/actions/Report.ts
Lines 2169 to 2177 in 56fb814
We wait until it's removed from Onyx, and then the user gets navigated automatically because the thread report no longer exists. And this moment between the report being deleted and the user being navigated is causing the behavior in this issue.
What changes do you think we should make in order to solve the problem?
We need to explicitly navigate the user to the parent report upon leaving the thread:
Result:
Screen.Recording.2024-01-19.at.19.00.15.mov
What alternative solutions did you explore? (Optional)
DylanDylann commentedon Jan 20, 2024
Dupe of #31220
22 remaining items
melvin-bot commentedon Jan 31, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
[-][$500] Thread - "Join" button appear when user Leave thread[/-][+][HOLD for payment 2024-02-07] [$500] Thread - "Join" button appear when user Leave thread[/+]melvin-bot commentedon Jan 31, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 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-02-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 31, 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:
s77rt commentedon Feb 2, 2024
lschurr commentedon Feb 7, 2024
Payment summary:
lschurr commentedon Feb 7, 2024
This is complete.