-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[$1000] New messages aren't showing up as unread and bold in LHN #23599
Comments
Triggered auto assignment to @lschurr ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01519e1ea6dde7dd1f |
Current assignee @lschurr is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
@NikkiWines reproduced this, so I'm going to go ahead and add the external label myself to move it along. |
ProposalPlease re-state the problem that we are trying to solve in this issue.New messages received via Pusher are marked as read in focus mode. What is the root cause of that problem?This only happens when you previously open the target report in default mode then switch to focus mode. If we open the target report, we push its App/src/pages/home/report/ReportActionsView.js Lines 127 to 129 in 0fec944
The event subscriber is supposed to be removed when the report unmount. However, since navigation refactor we allow multiple report screens to be on top of each other. As a result the report screens wouldn't unmount. App/src/pages/home/report/ReportActionsView.js Lines 155 to 163 in 1fac96b
So, even when the report was hidden in focus mode, the new action subscriber for that report has not been removed; and eventually triggered App/src/pages/home/report/ReportActionsView.js Lines 139 to 144 in 0fec944
There's another issue that if you have previously opened a report then navigate to another one, when a new message is notified, it'll be marked as read. On the other hand, if you haven't opened that report before, it is unread. I think whenever we're not focusing on the report, any new message to the report should be unread. It's here: #23446. What changes do you think we should make in order to solve the problem?Unsubscribe the new action event when App/src/pages/home/report/ReportActionsView.js Lines 155 to 163 in 1fac96b
But we cannot simply add What alternative solutions did you explore? (Optional)The
Thus, we can initialize const currentScrollOffset = useRef(undefined); |
@tienifr thanks for the proposal, do you know if this is a regression? I never noticed this behavior until yesterday (or maybe Monday at the earliest). |
I think his issue has the same root cause as #23446, and I have already posted my proposal in #23446 (comment). ProposalPlease re-state the problem that we are trying to solve in this issue.Unread not working on the LHN. What is the root cause of that problem?If user B received a message from user A, the following code is executed, and then calculate new marker actions. App/src/pages/home/report/ReportActionsView.js Lines 129 to 153 in c779139
In this issue, user B already navigates to another report, but previous report view is not unmounted, and still receive push event. What changes do you think we should make in order to solve the problem?We should add checking whether the report is visible (i.e. the current report) in new action event handler as below. unsubscribeFromNewActionEvent.current = Report.subscribeToNewActionEvent(props.report.reportID, (isFromCurrentUser, newActionID) => {
+ if (Navigation.getTopmostReportId() === props.report.reportID) {
+ return;
+ } What alternative solutions did you explore? (Optional)None. |
FYI we're treating this as a fire and so I've applied the hourly label. |
I think it's a regression from #22645. Before that the new action subscriber was an object and allowed only one subscriber (i.e. |
Thanks for treating as a fire and assigning |
Should we take this internal @sakluger @mallenexpensify or are we waiting for proposals here? |
@Santhosh-Sellavel are you able to review the proposal here? |
@mountiny @allroundexperts Seems its a regression from #22645, please take care. |
@lazar-stamenkovic Can you please confirm this? |
The issue in op has been fixed by the PR from Hanno, right @allroundexperts ? |
That's correct, yes. Still, I would want to check if this was really related to #22645 |
@allroundexperts confirming. seemed it's related to #22645. but while working on the PR #22645, subscribeToNewActionEvent and unsubscribeFromNewActionEvent in ReportActionsView was correctly called and it doesn't have this issue. But now unsubscribeFromNewActionEvent isn't called and subscribeToNewActionEvent is called for previous report id when move to other pages. |
To clarify, are you working on this @allroundexperts? Should this GH be assigned to you? |
@lschurr This issue has been fixed already by a PR from @hannojg. I was just confirming if this is a regression from #22645 but according to the comment from @lazar-stamenkovic, it seems like this was not the case. |
I think we can close this issue now |
Closing! |
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:
Expected Result:
New messages should always show up as unread and appear in the LHN
Actual Result:
The message shows as read in the LHN in Most Recent mode, and doesn't show up at all in the LHN in focus mode.
Workaround:
I get these messages as desktop notifications, but I still have missed some.
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.45-3
Reproducible in staging?: Yes
Reproducible in production?: Not sure
Email or phone of affected tester (no customers): sasha@expensify.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Desktop notification:
LHN in Most Recent mode:
Issue reported by: @sakluger
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690309413291369
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: