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 2023-09-29] [$1000] Task - Chat report for task assignee disappears from LHN when logged in on a different session #25727
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
As User A, assign a task to to User A but share it in User B's chat.
As User A, complete the task.
As User B on web browser, verify that the new chat from User A exists, log out while leaving the chat unread (don't open it).
As User B, log in on a different platform like mweb, Android or desktop app. If using web, please clear the browser session entirely (close and reopen incognito window)
Expected Result:
Chat report from User A will remain in LHN
Actual Result:
Chat report from User A disappears from LHN when logged in on a different session
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
Windows / Chrome
MacOS / Desktop
Version Number: 1.3.56-7
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
changed the title [-]Task - Chat report for task assignee disappears from LHN when logged in on a different session[/-][+][$1000] Task - Chat report for task assignee disappears from LHN when logged in on a different session[/+]on Aug 23, 2023
Please re-state the problem that we are trying to solve in this issue.
Chat report for task assignee disappears from LHN when log in on another device
What is the root cause of that problem?
Suppose that user A opens a new chat with user B.
When user A sends message or does some actions like create task, user B receives pusher events for those actions and so user B would have report actions for that report(chat between user A and user B). But when a user log out and log in again, we call openApp or reconnectApp API but these APIs doesn't return actions of the report that the user haven't ever visited. So in this case, the report actions of the new chat would be empty
This makes the new report filtered out by the below line when getting LHN list
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:
[@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
[@sobitneupane] 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:
The PR was not solely responsible for the issue. Task Reports were newly introduced back then and was not considered in the PR.
[@sobitneupane] 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:
It's an edge case which can easily miss during PR review.
[@sobitneupane] Determine if we should create a regression test for this bug.
Yes.
[@sobitneupane] 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.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Aug 22, 2023
Triggered auto assignment to @lschurr (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 22, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Aug 23, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0179eb890f49bf0a87
[-]Task - Chat report for task assignee disappears from LHN when logged in on a different session[/-][+][$1000] Task - Chat report for task assignee disappears from LHN when logged in on a different session[/+]melvin-bot commentedon Aug 23, 2023
Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Aug 23, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)dummy-1111 commentedon Aug 24, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat report for task assignee disappears from LHN when log in on another device
What is the root cause of that problem?
Suppose that user A opens a new chat with user B.
When user A sends message or does some actions like create task, user B receives pusher events for those actions and so user B would have report actions for that report(chat between user A and user B). But when a user log out and log in again, we call openApp or reconnectApp API but these APIs doesn't return actions of the report that the user haven't ever visited. So in this case, the report actions of the new chat would be empty
This makes the new report filtered out by the below line when getting LHN list
App/src/libs/ReportUtils.js
Line 2617 in 329cac3
App/src/libs/ReportUtils.js
Lines 2646 to 2648 in 329cac3
This is the root cause
What changes do you think we should make in order to solve the problem?
We determines if the report is empty by checking the last visible action of the report below
App/src/libs/ReportUtils.js
Lines 2616 to 2617 in 329cac3
We have the same data in the report(
lastMessageTextandlastMessageTranslationKey)We can do the check by using the report
This works fine as expected
What alternative solutions did you explore? (Optional)
We can check if the report is empty by using both report and last visible action. But I think checking by report is enough
lschurr commentedon Aug 25, 2023
@sobitneupane could you review the proposal here?
63 remaining items
lschurr commentedon Oct 2, 2023
@sobitneupane could you work on the checklist for this one?
dummy-1111 commentedon Oct 2, 2023
@lschurr
Offer accepted, thanks
lschurr commentedon Oct 2, 2023
Great - payment sent in Upwork to @s-alves10.
We can close this out once the checklist is complete @sobitneupane
sobitneupane commentedon Oct 4, 2023
Sorry for the delay. I will work on the checklist before the weekend.
sobitneupane commentedon Oct 9, 2023
#19321
The PR was not solely responsible for the issue. Task Reports were newly introduced back then and was not considered in the PR.
It's an edge case which can easily miss during PR review.
Yes.
#25727 (comment)
sobitneupane commentedon Oct 9, 2023
Regression Test Proposal
Do we agree 👍 or 👎
sobitneupane commentedon Oct 9, 2023
#25727 (comment)
Requested payment on newDot.
lschurr commentedon Oct 9, 2023
Great! I've added the QA test request. Closing.
JmillsExpensify commentedon Oct 9, 2023
$1,500 payment approved for @sobitneupane based on BZ summary.