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 2025-01-13] [$250] Web - Thread - Switching to Search and back after clicking "Join thread" opens the report #52472
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: v9.0.61-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers):testpayment935+613@gmail.com Issue reported by: Applause Internal Team
Action Performed:
(User A) Send any message to 1:1 conversation for the account you have access to
(User B) go to the new message from User A and open context menu
(User B) Click "Join Thread"
Navigating to Settings/Search and go to Inbox again
Expected Result:
The "Join Thread" option should not navigate to the report.
Actual Result:
"Join thread" option navigates to the report page after navigating to other bottom navigations like Search or Setting and returning back to inbox.
Edited by proposal-police: This proposal was edited at 2024-11-19 08:56:27 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Join thread" option navigating to "reply in thread" page after navigating to other bottom navigations like Search or Setting and returning back to inbox
What is the root cause of that problem?
Firstly, we need to explain why the join thread option is only shown in non-thread actions of other user
The difference is here, if reportAction?.childReportNotificationPreference is undefined, getChildReportNotificationPreference function returns always if the user is the creator of the action, otherwise it returns hidden
What changes do you think we should make in order to solve the problem?
I think the way we update lastVisitTime here is incorrect. It was added here. According to my understanding
, lastVisitTime saves the last time we opened a report (the report screen is focused).
Call openReport doesn't mean we navigate to this report and we handled in ReportScreenhere to update lastVisitTime whenever the ReportScreen is focused so we can remove the wrong logic here
changed the title [-]Web - Thread - Noting happen when clicking "Join thread" button unless returning to inbox again[/-][+][$250] Web - Thread - Noting happen when clicking "Join thread" button unless returning to inbox again[/+]on Nov 19, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@parasharrajat@stephanieelliott@parasharrajat 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]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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 needed
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Web/Desktop
[User A] Open the chat with User B
[User B] Send a message to User A
[User A] Hover this message and click on Join thread
[User A] Open the search page and open the inbox again
Verify that user B's inbox is displayed
mWeb/Native
[User A] Open the chat with User B
[User B] Send a message to User A
[User A] Hover this message and click on Join thread
[User A] Open the deep link with the relative path /r
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Nov 13, 2024
Triggered auto assignment to @stephanieelliott (
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.FitseTLT commentedon Nov 13, 2024
Edited by proposal-police: This proposal was edited at 2024-11-13 13:06:19 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Thread - Noting happen when clicking "Join thread" button unless returning to inbox again
What is the root cause of that problem?
When we press the join button openReport is called with new child report id here
App/src/libs/actions/Report.ts
Line 1871 in 4d9be4e
and that will set the visitedTime of the child report to the current time
App/src/libs/actions/Report.ts
Line 832 in 084a711
so when we navigate back to the inbox the empty child report will be opened as it is the last accessed report according to its
visitedTimeWhat changes do you think we should make in order to solve the problem?
We should not set the lastVisitedTime for the child report on join as we are not visiting it only subscribing to it. So:
add optional shouldSetVisitedTime param for openReport
App/src/libs/actions/Report.ts
Line 832 in 084a711
and pass as false for open reports in join thread for both when the childReport exists or not
App/src/libs/actions/Report.ts
Line 1900 in 084a711
App/src/libs/actions/Report.ts
Line 1926 in 084a711
What alternative solutions did you explore? (Optional)
mkzie2 commentedon Nov 13, 2024
Edited by proposal-police: This proposal was edited at 2024-11-19 08:56:27 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Join thread" option navigating to "reply in thread" page after navigating to other bottom navigations like Search or Setting and returning back to inbox
What is the root cause of that problem?
The difference is here, if
reportAction?.childReportNotificationPreferenceisundefined,getChildReportNotificationPreferencefunction returnsalwaysif the user is the creator of the action, otherwise it returnshiddenApp/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Line 305 in b1c1a4b
App/src/libs/ReportUtils.ts
Lines 1762 to 1768 in b1c1a4b
Join thread, a new report is created and when we go back from search it is displayed as the last accessed reportApp/src/libs/actions/Report.ts
Line 1843 in b1c1a4b
What changes do you think we should make in order to solve the problem?
I think the way we update
lastVisitTimehere is incorrect. It was added here. According to my understanding,
lastVisitTimesaves the last time we opened a report (the report screen is focused).App/src/libs/actions/Report.ts
Line 832 in f810ac6
Call
openReportdoesn't mean we navigate to this report and we handled inReportScreenhere to updatelastVisitTimewhenever theReportScreenis focused so we can remove the wrong logic hereApp/src/libs/actions/Report.ts
Line 832 in f810ac6
What alternative solutions did you explore? (Optional)
stephanieelliott commentedon Nov 19, 2024
Agree this seems buggy, adding labels.
melvin-bot commentedon Nov 19, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021858763130278701100
[-]Web - Thread - Noting happen when clicking "Join thread" button unless returning to inbox again[/-][+][$250] Web - Thread - Noting happen when clicking "Join thread" button unless returning to inbox again[/+]54 remaining items
melvin-bot commentedon Jan 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 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 2025-01-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 6, 2025
@parasharrajat @stephanieelliott @parasharrajat 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]
stephanieelliott commentedon Jan 15, 2025
Hey @parasharrajat can you complete the BZ checklist?
parasharrajat commentedon Jan 15, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: https://github.com/Expensify/App/pull/31424/files#r1917458353
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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 needed
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Web/Desktop
mWeb/Native
Do we agree 👍 or 👎
stephanieelliott commentedon Jan 17, 2025
Regression test issue created here: https://github.com/Expensify/Expensify/issues/462026
stephanieelliott commentedon Jan 17, 2025
Summarizing payment on this issue:
Upwork job is here: https://www.upwork.com/jobs/~021858763130278701100
parasharrajat commentedon Jan 19, 2025
Payment requested as per #52472 (comment)
JmillsExpensify commentedon Jan 22, 2025
$250 approved for @parasharrajat