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

Bug: [New Expensify] Unread message shows as bold in the LHN but green line does not appear reported by @gadhiyamanan #11726

Closed
kavimuru opened this issue Oct 11, 2022 · 45 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Oct 11, 2022

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Send a message when receiver is not logged in
  2. log into the receiver account
  3. Check the message

Expected Result:

Both in the LHN and in the chat shows New message indicator

Actual Result:

No new message indicator inside the chat, only in the LHN it shows as bold as new message indicator

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.2.12-3
Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/195195728-9396a493-a85d-48b3-90ba-b8dc7d876f2b.mp4
https://user-images.githubusercontent.com/43996225/195195752-26184b12-3057-40dc-bac5-e3e67d76a1ff.mov
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1665479496661839

View all open jobs on GitHub

@kavimuru kavimuru added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Oct 11, 2022
@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2022

Triggered auto assignment to @slafortune (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Oct 11, 2022
@slafortune
Copy link
Contributor

slafortune commented Oct 12, 2022

Reproduced on slafortune@expenisfy.com
New Expensify
Version 1.2.13-3 (1.2.13-3)
Desktop App

While the message is bolded indicating a new message was sent - the unread message does not show the “NEW” green line above the unread message.

I was not logged into New Expensify when the message was sent -
Notice the name is bolded and has no green line and New -
image

I was logged into New Expensify but not my active window when the message was sent -
Notice the Green line and New and the Name not bolded - I was not logged out of New Expensify
image

@slafortune slafortune reopened this Oct 12, 2022
@slafortune slafortune changed the title Bug: Unread message shows as bold in the LHN but in the chat New message green line does not appear reported by @gadhiyamanan Bug: [New Expensify] Unread message shows as bold in the LHN but green line does not appear reported by @gadhiyamanan Oct 12, 2022
@slafortune
Copy link
Contributor

Also - similar issue is reported here -#10736

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2022

Triggered auto assignment to @marcaaron (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@marcaaron marcaaron added the Internal Requires API changes or must be handled by Expensify staff label Oct 13, 2022
@marcaaron
Copy link
Contributor

This is a pretty frustrating one. Gonna take it internal so we can design and fix it properly, but here's why it happens:

  • We are using componentDidUpdate() to detect that a "new action has arrived" by looking at the last action and comparing it to the latest here:

const didNewReportActionAppear = previousLastSequenceNumber !== currentLastSequenceNumber;
if (didNewReportActionAppear) {

  • We then update the newMarkerSequenceNumber to 0 because we are scrolled to the bottom of the chat

That is the correct behavior when you are already looking at the chat. But doesn't really work as expected when you:

  • visit a chat
  • fetch more recent actions
  • component updates and processes a "new action" as if it has just arrived in realtime

Said another way, we are making a really bad assumption that a "new action appeared" when we only look at the componentDidUpdate() data changing. A general solution here would be to only allow the componentDidUpdate() logic to run when a "new" report action actually appears and not just some are loaded from the server when the component mounts. But I think in that case we're better off just moving it all out of the component entirely to avoid any confusion.

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2022

A Contributor Manager will be assigned to issue payment via Upwork if we deploy an associated Pull Request to production. Per Contributing.md.

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2022

Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Oct 18, 2022
@JmillsExpensify JmillsExpensify added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Oct 18, 2022
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2022

Triggered auto assignment to @isabelastisser (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Oct 18, 2022
@isabelastisser
Copy link
Contributor

hey @marcaaron is there anything for me to do here? I reviewed the issue and your comments, and it seems like we're taking this internally, and the payment in Upwork will only need to be made if we deploy an associated Pull Request to production.

Unassigning myself.

@melvin-bot melvin-bot bot removed the Overdue label Oct 19, 2022
@isabelastisser isabelastisser removed their assignment Oct 19, 2022
@puneetlath puneetlath added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 19, 2022
@JmillsExpensify JmillsExpensify self-assigned this Oct 19, 2022
@JmillsExpensify
Copy link

I'll assign myself and try to find someone to take this one.

@marcaaron
Copy link
Contributor

I think it would be fine to add a test cases for the steps in the PR. There are four test cases and I'm not sure if any of them are covered by the existing test case.

@JmillsExpensify
Copy link

Ok cool, I'll take this part then. Anything else if the checklist you think we should fill out from a CME perspective? I think the testing scripts was all that applied?

@JmillsExpensify
Copy link

Still haven't gotten to this one, though on my list.

@JmillsExpensify
Copy link

Circling back and closing the loop on this today.

@marcaaron
Copy link
Contributor

I think this one will need to stay open based on the conversation here. Unfortunately, some changes in my PR to fix this issue will need to be reverted.

After that, I'm honestly not too sure what possible solution to apply. There is a general conflict between: showing cached content as fast as possible and showing an accurate placement for the new line indicator. If we want it fast then it will be inaccurate (at least for some amount of time). If we want an accurate placement for the new line then we have to wait for the server to tell us where it should go. By that time, it's not clear whether the behavior would be to show the "new line" or mark the report as "read".

I thought about it for a bit and couldn't come up with a clear solution. Anyways, I've worked on this code a lot so I will let some others step up and take a stab at this problem once the revert PR is up.

@marcaaron marcaaron removed their assignment Nov 14, 2022
@JmillsExpensify
Copy link

Thanks for jumping in, as I was wavering on the best next steps. That said, what do you think about minimally ensuring that TestRail has coverage for the QA steps in #12722?

@marcaaron
Copy link
Contributor

Yes, that is the first suggestion in the RCA (of several)

@JmillsExpensify
Copy link

Ah sorry for crossing wires. Did you ship the RCA yet? I'll make sure to give it a thorough look.

@marcaaron
Copy link
Contributor

Working on it.

@JmillsExpensify
Copy link

Still need to circle back on TestRail. I'll make time for that this week.

@JmillsExpensify
Copy link

Sorry ya'll, I keep struggling to come back to this one. Crossing this off the list before Thanksgiving kicks in.

@JmillsExpensify
Copy link

Alright, apologies for the delay here. I think we are good on this regression test, which is covered by this script in TestRail.

  1. On an HT account that has a conversation with a very long history (>100 messages)
  2. Navigate to the conversation that has >100 messages and Verify the loading animation is briefly displayed before the messages are loaded.
  3. Verify the chat history is displayed after the loading animation
  4. Verify it happens quickly and that there is no excessive delay
  5. Navigate to another conversation and back to the one with >100 messages
  6. Verify the loading animation is not displayed after visiting the chat that has been previously opened
  7. Close the app and reopen - In Web, close and reopen the tab
  8. Navigate to a conversation that has ~25 (smaller conversation) Verify the loading animation is briefly displayed before the messages are loaded.
  9. Navigate to another conversation and back to the convo with ~25 messages
  10. Verify the loading animation is not displayed after visiting the chat that has been previously opened

Closing this issue. Please re-open if you think I missed something.

@gadhiyamanan
Copy link
Contributor

@JmillsExpensify I think the issue is not resolved yet

@JmillsExpensify
Copy link

Are you sure about that? No one else is assigned to this issue. cc @marcaaron not sure how that happened, but can you clarify?

@gadhiyamanan
Copy link
Contributor

Are you sure about that?

still able to reproduce, I think PR reverted due to regression

cc: @JmillsExpensify @marcaaron

@marcaaron
Copy link
Contributor

Yes, @gadhiyamanan is correct. See my comment here.

@marcaaron marcaaron reopened this Dec 1, 2022
@marcaaron marcaaron removed the Reviewing Has a PR in review label Dec 1, 2022
@JmillsExpensify
Copy link

Ah thanks, I forgot about that. So what's our next step in that case? We have a daily on this issue, though we're all not treating it that way, so minimally we should agree on it's priority and update the labels/titles accordingly.

@JmillsExpensify JmillsExpensify added Weekly KSv2 and removed Daily KSv2 labels Dec 8, 2022
@marcaaron
Copy link
Contributor

Tried reproducing the original test steps again and could not. I think we can close for now and create a new issue if it gets reported again.

2022-12-08_09-39-42.mp4

@marcaaron marcaaron closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2022
@gadhiyamanan
Copy link
Contributor

issue is reproducible on the latest version
cc: @JmillsExpensify @marcaaron

Screen.Recording.2023-02-03.at.11.49.24.AM.mov

@JmillsExpensify
Copy link

@marcaaron I'm not sure what's going on here, and I know we still have some deprecate sequence numbers polish in play. That said, I was able to reproduce the issue all the same.

@JmillsExpensify
Copy link

Actually, given that we're working on it in the linked issue from Ben and the reporter is the same, let's keep this one closed.

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. Engineering Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants