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
[$500] Task - The "Chat Report" briefly displays when the receiver clicks on a sent task before loading the task details and returns to the chat #29036
Open another browser and log in to User B's account
Click on the sent task for details and then click on User A’s chat before the task details have fully loaded
Expected Result:
Chat report should not be displayed when the receiver clicks on a sent task before loading the task details and returns back to the chat
Actual Result:
The chat report briefly appears when the receiver clicks on the sent task before the task details have fully loaded and then returns back to the chat
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native - emulator not working for the contributor
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 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 Notes/Photos/Videos: Any additional supporting documentation
changed the title [-]Task - The "Chat Report" briefly displays when the receiver clicks on a sent task before loading the task details and returns to the chat[/-][+][$500] Task - The "Chat Report" briefly displays when the receiver clicks on a sent task before loading the task details and returns to the chat[/+]on Oct 6, 2023
📣 @abhikam395! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
It should take props.action.childReportName if the props.taskReport.reportName is absent.
However, when the recipient opens the task report, we send an OpenReport API command, and in it we set the default report name "Chat Report" optimistically:
I can't reproduce this on my end. The skeleton UI isn't used when I try to click into a task, so there is no chance to click the task, and then click the parent chat in LHN before the task loads.
@joekaufmanexpensify I've just reproduced it in prod. It's not inconsistent – all you should do is just test on slow internet (you can mimic it on the Network tab, similar to going offline).
Also, make sure that you share the task with user B, but don't assign it to them. Just for the experiment's clarity.
Even if this was consistently reproducible though, I'm not sure this would warrant doing anything. Since it seems like right after the report data is cached locally, this doesn't happen.
Which would mean someone would need to have either just signed in/have bad network connection, and then click into a task and quickly try and click the parent chat before the task loads. Which doesn't really seem like a super user action, unless someone is trying to test this.
Activity
[-]Task - The "Chat Report" briefly displays when the receiver clicks on a sent task before loading the task details and returns to the chat[/-][+][$500] Task - The "Chat Report" briefly displays when the receiver clicks on a sent task before loading the task details and returns to the chat[/+]melvin-bot commentedon Oct 6, 2023
Job added to Upwork: https://www.upwork.com/jobs/~012bf63c7fac0f0222
melvin-bot commentedon Oct 6, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)zukilover commentedon Oct 6, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The "Chat Report" briefly displays when the receiver clicks on a sent task before loading the task details and returns to the chat
What is the root cause of that problem?
TaskPreviewis trying to use the defaultreportNamefrom its optimistic data when the detail is still being loaded.App/src/components/ReportActionItem/TaskPreview.js
Lines 73 to 74 in 1b93fc9
When detail is loading, the taskTitle is rendering from this data:
App/src/libs/actions/Report.js
Lines 459 to 461 in 1b93fc9
What changes do you think we should make in order to solve the problem?
Prefer to use
childReportNamefrom action first, since that information is already available to the user.Change this line:
App/src/components/ReportActionItem/TaskPreview.js
Line 74 in 1b93fc9
to:
What alternative solutions did you explore? (Optional)
N/A
abhikam395 commentedon Oct 6, 2023
It reads value from reportName variable inside value object as reportName sometimes is actual task name and sometimes its just "Chat Report"
{
"onyxData": [
{
"onyxMethod": "merge",
"key": "report_7496678832565117",
"value": {
"reportID": "7496678832565117",
"reportName": "Chat Report",
"type": "chat",
"chatType": "",
"ownerEmail": "fake",
"ownerAccountID": 0,
"managerEmail": "fake",
"managerID": 0,
"policyID": "FAKE",
"participantAccountIDs": [
15842262
],
"isPinned": false,
"lastReadTime": "2023-10-06 23:27:12.388",
"lastMentionedTime": null,
"lastReadSequenceNumber": 0,
"lastVisibleActionCreated": "2023-10-06 23:27:11.726",
"lastVisibleActionLastModified": "2023-10-06 23:27:11.726",
"lastMessageText": "task for sadf asdf asdf asdf asdf asdf asdf asdf",
"lastActorAccountID": 15842262,
"notificationPreference": "always",
"welcomeMessage": "",
"stateNum": 0,
"statusNum": 0,
"oldPolicyName": "",
"visibility": null,
"isOwnPolicyExpenseChat": false,
"lastMessageHtml": "task for sadf asdf asdf asdf asdf asdf asdf asdf",
"iouReportID": null,
"hasOutstandingIOU": false,
"policyName": null,
"hasParentAccess": null,
"parentReportID": null,
"parentReportActionID": null,
"writeCapability": "all",
"description": null,
"isDeletedParentAction": null,
"total": 0,
"currency": "USD",
"submitterPayPalMeAddress": "",
"chatReportID": null,
"isWaitingOnBankAccount": false
}
},
{
"onyxData": [
{
"onyxMethod": "merge",
"key": "report_1265709252388942",
"value": {
"reportID": "1265709252388942",
"reportName": "sadf asdf asdf asdf asdf asdf asdf asdf",
"type": "task",
"chatType": "",
"ownerEmail": "abhikam395@gmail.com",
"ownerAccountID": 15842262,
"managerEmail": "fake",
"managerID": 0,
"policyID": "FAKE",
"participantAccountIDs": [
15842276
],
"isPinned": false,
"lastReadTime": null,
"lastMentionedTime": null,
"lastReadSequenceNumber": 0,
"lastVisibleActionCreated": "2023-10-06 23:27:11.725",
"lastVisibleActionLastModified": "2023-10-06 23:27:11.725",
"lastMessageText": "",
"lastActorAccountID": 15842262,
"notificationPreference": "hidden",
"welcomeMessage": "",
"stateNum": 0,
"statusNum": 0,
"oldPolicyName": "",
"visibility": null,
"isOwnPolicyExpenseChat": false,
"lastMessageHtml": "",
"iouReportID": null,
"hasOutstandingIOU": false,
"policyName": null,
"hasParentAccess": true,
"parentReportID": "7496678832565117",
"parentReportActionID": "5483285656688644440",
"writeCapability": "all",
"description": "f asdfasdf asdf asdf asdf asdf asdf asdf dfchildReportNamesad fasdf asdf asdf asdf adsf",
"isDeletedParentAction": null,
"total": 0,
"currency": "USD",
"submitterPayPalMeAddress": "",
"chatReportID": "7496678832565117",
"isWaitingOnBankAccount": false
}
},
{
"onyxMethod": "merge",
"key": "report_1265709252388942",
"value": {
"lastReadTime": null
}
},
{
"onyxMethod": "merge",
"key": "reportActions_1265709252388942",
"value": {
"5038936398546252359": {
"reportActionID": "5038936398546252359",
"previousReportActionID": "0",
"actionName": "CREATED",
"created": "2023-10-06 23:27:11.725",
"reportActionTimestamp": 1696634831725,
"avatar": "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_6.png",
"message": [
{
"type": "TEXT",
"style": "strong",
"text": "abhikam395@gmail.com"
},
{
"type": "TEXT",
"style": "normal",
"text": " created this report"
}
],
"person": [
{
"type": "TEXT",
"style": "strong",
"text": "abhikam395@gmail.com"
}
],
"automatic": false,
"sequenceNumber": 0,
"shouldShow": true,
"lastModified": "2023-10-06 23:27:11.725"
}
}
},
{
"onyxMethod": "merge",
"key": "personalDetailsList",
"value": {
"15842276": {
"accountID": 15842276,
"avatar": "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_20.png",
"displayName": "abhikam593@gmail.com",
"firstName": "",
"lastName": "",
"status": null,
"login": "abhikam593@gmail.com",
"pronouns": "",
"timezone": {
"automatic": true,
"selected": "Asia/Calcutta"
},
"payPalMeAddress": "",
"phoneNumber": "",
"validated": true
}
}
},
{
"onyxMethod": "merge",
"key": "reportActions_7496678832565117",
"value": {
"5483285656688644440": {
"person": [
{
"type": "TEXT",
"style": "strong",
"text": "abhikam395@gmail.com"
}
],
"actorAccountID": 15842262,
"message": [
{
"type": "COMMENT",
"html": "task for sadf asdf asdf asdf asdf asdf asdf asdf",
"text": "task for sadf asdf asdf asdf asdf asdf asdf asdf",
"isEdited": false,
"whisperedTo": [],
"isDeletedParentAction": false,
"reactions": []
}
],
"originalMessage": {
"html": "task for sadf asdf asdf asdf asdf asdf asdf asdf",
"lastModified": "2023-10-06 23:27:11.726",
"taskReportID": 1265709252388942
},
"avatar": "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_6.png",
"created": "2023-10-06 23:27:11.726",
"timestamp": 1696634831,
"reportActionTimestamp": 1696634831726,
"automatic": false,
"actionName": "ADDCOMMENT",
"shouldShow": true,
"reportActionID": "5483285656688644440",
"previousReportActionID": "8530328364200430390",
"lastModified": "2023-10-06 23:27:11.726",
"childReportID": 1265709252388942,
"childType": "task",
"childReportName": "sadf asdf asdf asdf asdf asdf asdf asdf",
"whisperedToAccountIDs": []
}
}
},
{
"onyxMethod": "merge",
"key": "report_1265709252388942",
"value": {
"lastReadTime": null
}
}
],
"jsonCode": 200,
"requestID": "8121acc0f8ac072f-DEL"
}
`
melvin-bot commentedon Oct 6, 2023
📣 @abhikam395! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
paultsimura commentedon Oct 6, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a tack recipient opens the task report, its name is set to "Chat Report" for a moment.
What is the root cause of that problem?
In the
TaskPreviewcomponent, we are building thetaskTitlethis way:App/src/components/ReportActionItem/TaskPreview.js
Line 74 in 7130361
It should take
props.action.childReportNameif theprops.taskReport.reportNameis absent.However, when the recipient opens the task report, we send an
OpenReportAPI command, and in it we set the default report name "Chat Report" optimistically:App/src/libs/actions/Report.js
Lines 454 to 462 in 5dc3c25
So when the user opens the report, the
props.taskReport.reportNameis already present, but it has value "Chat Report".What changes do you think we should make in order to solve the problem?
We should rely not only on the
taskReport.reportNamebeing present, but it also having a reportID, which will mean that the report is loaded.We can even make this check a separate variable and use it above as well:
What alternative solutions did you explore? (Optional)
Victor-Nyagudi commentedon Oct 7, 2023
Possible similar root cause as #24460
ayazhussain79 commentedon Oct 7, 2023
This #24460 bug is not reproducible
Victor-Nyagudi commentedon Oct 7, 2023
Edited.
melvin-bot commentedon Oct 10, 2023
@situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
4 remaining items
melvin-bot commentedon Oct 10, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)joekaufmanexpensify commentedon Oct 10, 2023
Not overdue. I will triage today
joekaufmanexpensify commentedon Oct 10, 2023
I can't reproduce this on my end. The skeleton UI isn't used when I try to click into a task, so there is no chance to click the task, and then click the parent chat in LHN before the task loads.
2023-10-10_16-32-53.mp4
joekaufmanexpensify commentedon Oct 10, 2023
I'm not sure it really makes sense to do anything here if this isn't consistently reproducible. Going to close this for now.
situchan commentedon Oct 10, 2023
@joekaufmanexpensify that's because report data is already cached locally. Can you try again after logout and re-login?
paultsimura commentedon Oct 10, 2023
@joekaufmanexpensify I've just reproduced it in prod. It's not inconsistent – all you should do is just test on slow internet (you can mimic it on the Network tab, similar to going offline).
Also, make sure that you share the task with user B, but don't assign it to them. Just for the experiment's clarity.
slow.task.-.chat.report.mov
joekaufmanexpensify commentedon Oct 16, 2023
Got it. I will try both of those and see if I can reproduce.
melvin-bot commentedon Oct 17, 2023
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
joekaufmanexpensify commentedon Oct 18, 2023
I still can't consistently reproduce this, even after trying right after signing in, and throttling my network requests to slow 3G.
2023-10-18_17-07-21.mp4
joekaufmanexpensify commentedon Oct 18, 2023
Even if this was consistently reproducible though, I'm not sure this would warrant doing anything. Since it seems like right after the report data is cached locally, this doesn't happen.
Which would mean someone would need to have either just signed in/have bad network connection, and then click into a task and quickly try and click the parent chat before the task loads. Which doesn't really seem like a super user action, unless someone is trying to test this.
joekaufmanexpensify commentedon Oct 18, 2023
Closing for now!