-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Hold][$2000] Unread message shows as bold in the LHN but green line does not appear #15019
Comments
Triggered auto assignment to @bfitzexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01649bcaf76128383a |
Current assignee @bfitzexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
Triggered auto assignment to @bondydaa ( |
I want to investigate that one, Callstack |
ProposalPlease re-state the problem that we are trying to solve in this issue.User logs in to his account and already has unread messages. If user goes to the unread chat 'new' message indicator doesn't show up. What is the root cause of that problem?Background 1: When the user logs in, we fetch the list of all reports(this doesn't include report actions). Now when user goes to any chat we call openReport API to fetch all the details of the chat including report actions. This openReport API also updates the lastReadTime to current time in the chat. Root cause: What changes do you think we should make in order to solve the problem?I think there is a core problem in having newMarkerReportActionID as state to show new indicator which represents the message id to show as new. But we end up doing lot of checks and complex logic to make the newMarkerReportActionID a proper value when the message gets deleted or new message is marked as unread. It seems like we are re-doing the old sequence number unread logic. I propose instead of having newMarkerReportActionID as a state to show new indicator, have the 'lastReadTime' of a report as a state to show the new line indicator and new message button indicator as well.
This way only the 'lastReadTime' state is the primary source of truth to display the 'new' message UI in the ReportActionsView.js Advantages:
This could solve these 4 bugs in one shot Only one disadvantage i see is that we would compute which message to show up as a new message while displaying, but it shouldn't be that complex computation as well as we only compare lastReadTime and action created time. As this is not going to be an one line change there are multiple code-paths we can achieve the replacement of newMarkerReportActionID with lastReadTime state. One of best path at current codebase would be to maintain the state at reportScreen and propogate as we don't mount ReportActionsView(data won't be propagate to it when unmounted state). We can also do the same at other places but the core proposal is to remove the state of maintaining message ids and move to maintaining state of lastReadTime. What alternative solutions did you explore? (Optional)Alternative 1: Alternative 2: Alternative 3(Best IMO):
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Opening an unread report for the first time is missing the new marker indicator What is the root cause of that problem?Opening any report will not only return the report actions but also set the last read time of that report to the current time. This is not necessary a bug. I'm considering this as a design decision and working on top of that. To help understand the problem let's consider two unread reports:
And let's consider the working flow after you click a report as follow:
Rendering the first report will have the new marker indicator set since we have unread report actions in onyx. However that is not the case with the second report, in fact the second report will be rendered without the new messages (despite being shown on LHN) up until getting a response from What changes do you think we should make in order to solve the problem?Fetch unread report actions before rendering the report. This can be achieved by having the server prefetch report actions for prefetched reports (or at least for prefetched unread reports). The report actions should be returned as a part of the What alternative solutions did you explore? (Optional)None |
I believe this is something that needs to be discussed on slack for more visibility. We need more opinions on this. Can you please start a discussion @abdulrahuman5196 ? |
@thesahindia Thank you. I have raised slack conversation here - https://expensify.slack.com/archives/C01GTK53T8Q/p1676267128690339 |
@thesahindia I have updated the proposal with clear information as per slack request - #15019 (comment) |
@bondydaa, @bfitzexpensify, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick! |
we're discussing in the slack thread still https://expensify.slack.com/archives/C01GTK53T8Q/p1676267128690339 |
Coming from this issue, please make sure that the case from #12598 is also addressed. I've also added the reproduction steps from that issue at the top of this one. Thanks! |
This is a regression right? |
Why is this on hold, this used to work |
Tracking issue continues to progress |
This issue also occurs after flagging a message as spam, inconsiderate, etc. expensify-flag-message-bug.movI thought I'd create a new bug, but it looked to similar to the current issue. There's another recently opened issue where marking Concierge's message as unread doesn't work when it's the last message that could be worthy of being added to the tracking issue. Thoughts, @bondydaa? |
web deploy and deploy blockers have taken all my time this week |
looks like design doc was reviewed and implementation has started per #15212 (comment) |
looks like the tracking issue is getting close to being done 🎉 I'm going to retest these steps now. |
Hmm I'm not sure if these are the intended behaviors or not anymore but this is what I'm seeing: Logging in, no new message indicator: https://github.com/Expensify/App/assets/4073354/0c0f764f-82d6-4291-9fc9-d17b6d2a2b1d Even when if I leave the tab open, it looks like a new message shows up then gets marked as read quickly after: https://github.com/Expensify/App/assets/4073354/9d89865d-dce1-456a-a022-57b388f00b89 |
oh sorry looks like the 2nd thing is being tracked here #23171 |
looks like #23171 is still open |
Still on hold |
This should be fixed! Can we please retest and close this issue |
Yes, I'm no longer able to reproduce. Closing this out. |
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:
Two cases:
First Case
Second Case
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
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.68-0
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:
Recording.1488.mp4
Screen.Recording.2023-02-09.at.4.48.49.PM.mov
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1675942126884169
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: