Skip to content
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

[$250] Comments after threaded comment are gone after returning to parent #40644

Closed
1 of 6 tasks
m-natarajan opened this issue Apr 20, 2024 · 43 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@m-natarajan
Copy link

m-natarajan commented Apr 20, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v1.4.63-13
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: @aldo-expensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1713557851562149

Action Performed:

  1. Join public room, for example: https://staging.new.expensify.com/r/6776919265133947
  2. Find a threaded comment that is not the last comment in the chat and click it to open the thread
  3. Click on the header to come back to the parent chat
  4. Notice that the thread comment is highlighted and you can't scroll down anymore

Expected Result:

I would have expected to be able to scroll down again in the parent report without having to click "New Messages"

Actual Result:

Can't scroll down, the threaded comment is now the last comment in the parent chat, and I have to click in "New Messages" for it to load more comments and scroll down.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Screen.Recording.2024-04-19.at.1.15.02.PM.mov
Recording.3003.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0155f72908fd93dc77
  • Upwork Job ID: 1782728194457100288
  • Last Price Increase: 2024-04-23
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 20, 2024
Copy link

melvin-bot bot commented Apr 20, 2024

Triggered auto assignment to @sonialiap (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.

@sonialiap
Copy link
Contributor

I can replicate, moving to external

@melvin-bot melvin-bot bot removed the Overdue label Apr 23, 2024
@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Apr 23, 2024
@melvin-bot melvin-bot bot changed the title Comments after threaded comment are gone after returning to parent [$250] Comments after threaded comment are gone after returning to parent Apr 23, 2024
Copy link

melvin-bot bot commented Apr 23, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0155f72908fd93dc77

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 23, 2024
Copy link

melvin-bot bot commented Apr 23, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

Copy link

melvin-bot bot commented Apr 26, 2024

@sonialiap, @ahmedGaber93 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@ahmedGaber93
Copy link
Contributor

Not overdue, still waiting for proposals.

@melvin-bot melvin-bot bot removed the Overdue label Apr 26, 2024
@jacobkim9881
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

In public room, going back from thread makes newer chats missed.

What is the root cause of that problem?

From report actions data whisper chatting's previousReportActionID caused the problem.

while (
(startIndex > 0 && sortedReportActions[startIndex].reportActionID === sortedReportActions[startIndex - 1].previousReportActionID) ||

Above condition filters chained report actions in getContinuousReportActionChain. If a report action didn't meet the condition, then left chats are filtered out(So you can see the problem doesn't occurred after not using getContinuousReportActionChain function).

In a chat room each message has previousReportActionID that makes clear which one is previous message. But in a public room there are whispers that shows only to you. The whispers hasn't meet the condition above, so left chats are filtered out by the condition.

These have report actions that makes problems. These have keys 'whispredTo' and have problematic `reportActionID` for the condition above.
                "9115208222621878844": {
                    "person": [
                        {
                            "type": "TEXT",
                            "style": "strong",
                            "text": "Zach Greenwald (EXFY Product Manager)"
                        }
                    ],
                    "actorAccountID": 2746397,
                    "message": [
                        {
                            "type": "COMMENT",
                            "html": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.<br \/><br \/>If we find anything considered &quot;off-topic&quot;, it will be removed. <br \/><br \/>Thanks!",
                            "text": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.\n\nIf we find anything considered \"off-topic\", it will be removed. \n\nThanks!",
                            "isEdited": false,

	//* all whispers have this key *//
                            "whisperedTo": [
                                9847009
                            ],
	//* all whispers have this key *//

                            "isDeletedParentAction": false,
                            "deleted": "",
                            "reactions": []
                        }
                    ],
                    "originalMessage": {
                        "html": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.<br \/><br \/>If we find anything considered &quot;off-topic&quot;, it will be removed. <br \/><br \/>Thanks!",
                        "lastModified": "2024-04-03 16:31:27.991",
                        "type": "automated",
                        "whisperedTo": [
                            9847009
                        ]
                    },
                    "avatar": "https:\/\/d1wpcgnaa73g0y.cloudfront.net\/59e3197139caf327d7d95527215285cf1f2a325d_128.jpeg",
                    "created": "2024-04-03 16:31:27.991",
                    "timestamp": 1712161887,
                    "reportActionTimestamp": 1712161887991,
                    "automatic": false,
                    "actionName": "ADDCOMMENT",
                    "shouldShow": true,
                    "reportActionID": "9115208222621878844",
                    "previousReportActionID": "1707092031100627785",
                    "lastModified": "2024-04-03 16:31:27.991",
                    "whisperedToAccountIDs": [
                        9847009
                    ]
                },
                "2078382787109828944": {
                    "person": [
                        {
                            "type": "TEXT",
                            "style": "strong",
                            "text": "[email protected]"
                        }
                    ],
                    "actorAccountID": 8392101,
                    "message": [
                        {
                            "type": "COMMENT",
                            "html": "We have detected that you have sent an unsubscribe message into the chat. We have automatically muted this chat for you. If you would like to unmute this chat, please go into the chat settings and update your notification preferences.",
                            "text": "We have detected that you have sent an unsubscribe message into the chat. We have automatically muted this chat for you. If you would like to unmute this chat, please go into the chat settings and update your notification preferences.",
                            "isEdited": false,
                            "whisperedTo": [
                                3037571
                            ],
                            "isDeletedParentAction": false,
                            "deleted": "",
                            "reactions": []
                        }
                    ],
                    "originalMessage": {
                        "html": "We have detected that you have sent an unsubscribe message into the chat. We have automatically muted this chat for you. If you would like to unmute this chat, please go into the chat settings and update your notification preferences.",
                        "lastModified": "2024-04-03 16:07:07.726",
                        "whisperedTo": [
                            3037571
                        ]
                    },
                    "avatar": "https:\/\/d1wpcgnaa73g0y.cloudfront.net\/894b50e60056c966d12216005fbcacec8ce5a2c0.png",
                    "created": "2024-04-03 16:07:07.726",
                    "timestamp": 1712160427,
                    "reportActionTimestamp": 1712160427726,
                    "automatic": false,
                    "actionName": "ADDCOMMENT",
                    "shouldShow": true,

		//* This key cause the problem *//
                    "reportActionID": "2078382787109828944",
		//* This key cause the problem *//

		//* This key points the reportActionID of the thread you entered *//
                    "previousReportActionID": "6314439357740094412",
		//* This key points the reportActionID of the thread you entered *//


                    "lastModified": "2024-04-03 16:07:07.726",
                    "whisperedToAccountIDs": [
                        3037571
                    ]
                },
                "8603160241470088492": {
                    "person": [
                        {
                            "type": "TEXT",
                            "style": "strong",
                            "text": "Zach Greenwald (EXFY Product Manager)"
                        }
                    ],
                    "actorAccountID": 2746397,
                    "message": [
                        {
                            "type": "COMMENT",
                            "html": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.<br \/><br \/>If we find anything considered &quot;off-topic&quot;, it will be removed. <br \/><br \/>Thanks!",
                            "text": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.\n\nIf we find anything considered \"off-topic\", it will be removed. \n\nThanks!",
                            "isEdited": false,
                            "whisperedTo": [
                                11310351
                            ],
                            "isDeletedParentAction": false,
                            "deleted": "",
                            "reactions": []
                        }
                    ],
                    "originalMessage": {
                        "html": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.<br \/><br \/>If we find anything considered &quot;off-topic&quot;, it will be removed. <br \/><br \/>Thanks!",
                        "lastModified": "2024-04-03 15:28:15.042",
                        "type": "automated",
                        "whisperedTo": [
                            11310351
                        ]
                    },
                    "avatar": "https:\/\/d1wpcgnaa73g0y.cloudfront.net\/59e3197139caf327d7d95527215285cf1f2a325d_128.jpeg",
                    "created": "2024-04-03 15:28:15.042",
                    "timestamp": 1712158095,
                    "reportActionTimestamp": 1712158095042,
                    "automatic": false,
                    "actionName": "ADDCOMMENT",
                    "shouldShow": true,
                    "reportActionID": "8603160241470088492",
                    "previousReportActionID": "1707092031100627785",
                    "lastModified": "2024-04-03 15:28:15.042",
                    "whisperedToAccountIDs": [
                        11310351
                    ]
                },
                "6314439357740094412": {
                    "person": [
                        {
                            "type": "TEXT",
                            "style": "strong",
                            "text": "[email protected]"
                        }
                    ],
                    "actorAccountID": 8392101,
                    "message": [
                        {
                            "type": "COMMENT",
                            "html": "Hi there! If you just want to lurk in this room, others won't know you're here. However, if you post, others in the room will see your display name as your email address. If you'd like to add a different display name, open the Display Name page <a href=\"https:\/\/staging.new.expensify.com\/settings\/profile\/display-name\" target=\"_self\" rel=\"noreferrer noopener\">here<\/a>.",
                            "text": "Hi there! If you just want to lurk in this room, others won't know you're here. However, if you post, others in the room will see your display name as your email address. If you'd like to add a different display name, open the Display Name page here.",
                            "isEdited": false,
                            "whisperedTo": [
                                16568325
                            ],
                            "isDeletedParentAction": false,
                            "deleted": "",
                            "reactions": []
                        }
                    ],
                    "originalMessage": {
                        "html": "Hi there! If you just want to lurk in this room, others won't know you're here. However, if you post, others in the room will see your display name as your email address. If you'd like to add a different display name, open the Display Name page <a href=\"https:\/\/staging.new.expensify.com\/settings\/profile\/display-name\" target=\"_self\" rel=\"noreferrer noopener\">here<\/a>.",
                        "lastModified": "2024-04-03 08:47:14.901",
                        "whisperedTo": [
                            16568325
                        ]
                    },
                    "avatar": "https:\/\/d1wpcgnaa73g0y.cloudfront.net\/894b50e60056c966d12216005fbcacec8ce5a2c0.png",
                    "created": "2024-04-03 08:47:14.901",
                    "timestamp": 1712134034,
                    "reportActionTimestamp": 1712134034901,
                    "automatic": false,
                    "actionName": "ADDCOMMENT",
                    "shouldShow": true,
                    "reportActionID": "6314439357740094412",
                    "previousReportActionID": "1707092031100627785",
                    "lastModified": "2024-04-03 08:47:14.901",
                    "whisperedToAccountIDs": [
                        16568325
                    ]
                },
                "7450946116911601677": {
                    "person": [
                        {
                            "type": "TEXT",
                            "style": "strong",
                            "text": "Zach Greenwald (EXFY Product Manager)"
                        }
                    ],
                    "actorAccountID": 2746397,
                    "message": [
                        {
                            "type": "COMMENT",
                            "html": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.<br \/><br \/>If we find anything considered &quot;off-topic&quot;, it will be removed. <br \/><br \/>Thanks!",
                            "text": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.\n\nIf we find anything considered \"off-topic\", it will be removed. \n\nThanks!",
                            "isEdited": false,
                            "whisperedTo": [
                                16568325
                            ],
                            "isDeletedParentAction": false,
                            "deleted": "",
                            "reactions": []
                        }
                    ],
                    "originalMessage": {
                        "html": "Welcome to #new-expensify-feedback! This public channel is for you to share positive or constructive feedback on your New Expensify experience directly with our product team. We want you to help make this awesome. For all technical support questions, please ask Concierge to assist.<br \/><br \/>If we find anything considered &quot;off-topic&quot;, it will be removed. <br \/><br \/>Thanks!",
                        "lastModified": "2024-04-03 08:47:14.901",
                        "type": "automated",
                        "whisperedTo": [
                            16568325
                        ]
                    },
                    "avatar": "https:\/\/d1wpcgnaa73g0y.cloudfront.net\/59e3197139caf327d7d95527215285cf1f2a325d_128.jpeg",
                    "created": "2024-04-03 08:47:14.901",
                    "timestamp": 1712134034,
                    "reportActionTimestamp": 1712134034901,
                    "automatic": false,
                    "actionName": "ADDCOMMENT",
                    "shouldShow": true,
                    "reportActionID": "7450946116911601677",
                    "previousReportActionID": "1707092031100627785",
                    "lastModified": "2024-04-03 08:47:14.901",
                    "whisperedToAccountIDs": [
                        16568325
                    ]
                },

What changes do you think we should make in order to solve the problem?

We should add conditions to pass such whispers to show left chats.

What alternative solutions did you explore? (Optional)

  1. On BE such unnecessary whispers should be filtered out. Whispers to other accounts is not needed for a user. Since any users can check other users whispers by checking network requests on debug console of a browser, these should not be responded to users.

  2. We don't use getContinuousReportActionChain since 2 weeks ago previousReportActionID doesn't returns 0 from BE as a response. getContinuousReportActionChain doesn't function one of its functions for now.

  3. Let it be since it only happens in public rooms. You can loads newer chats by clicking New messages button on the chat.

@roryabraham
Copy link
Contributor

roryabraham commented Apr 28, 2024

Thanks for hunting down the root cause @jacobkim9881! I think we need to fix this in the back-end though

@melvin-bot melvin-bot bot added the Overdue label Apr 28, 2024
@roryabraham roryabraham added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Overdue labels Apr 28, 2024
Copy link

melvin-bot bot commented Apr 28, 2024

Current assignee @ahmedGaber93 is eligible for the Internal assigner, not assigning anyone new.

@jacobkim9881
Copy link
Contributor

@roryabraham My Pleasure ☺️ It should be fixed from BE first.

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

@sonialiap, @ahmedGaber93 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sonialiap
Copy link
Contributor

I just tested and it's still an issue. Asking in slack for volunteers

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jun 18, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

@sonialiap, @ahmedGaber93 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@ahmedGaber93
Copy link
Contributor

I am going to unassign me from this issue to focus on other issues, please reassign. Thanks!

Copy link

melvin-bot bot commented Jul 2, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

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.

@ishpaul777
Copy link
Contributor

ishpaul777 commented Jul 2, 2024

false Alert ⬆️, PR is not merged yet

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

This issue has not been updated in over 15 days. @sonialiap eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Jul 17, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@sonialiap sonialiap added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 16, 2024
Copy link

melvin-bot bot commented Aug 16, 2024

Triggered auto assignment to @jliexpensify (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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Monthly KSv2 labels Aug 16, 2024
@sonialiap
Copy link
Contributor

I'm OOO Aug 19-30, adding leave buddy.
Status: this may have been resolved by another issue. Waiting for the weekly re-tests to confirm if issue is resolved

@jliexpensify
Copy link
Contributor

Thanks for the summary Sonia, I'll wait another week for the 2nd re-test.

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@jliexpensify
Copy link
Contributor

Ok lets close this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors Hot Pick Ready for an engineer to pick up and run with Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
No open projects
Development

No branches or pull requests

9 participants