Page MenuHomePhabricator

Notification panel updates remote seentime too aggressively
Closed, ResolvedPublic

Description

With my cross-wiki notification integration patch (https://gerrit.wikimedia.org/r/255328), if you have notifications on both wiki A and wiki B, and you open the notification panel on wiki A, you are shown an item saying you have notifications on wiki B, as you would expect. You don't see the wiki B notifications until you expand this item. However, when the panel first opens, API requests are sent to update the seentime on both wiki A and wiki B.

This is wrong, the seentime for wiki B should not be updated until the user actually views the notifications from wiki B.

(Probably also reproducible with Moriel's demo page in https://gerrit.wikimedia.org/r/254612 but I didn't try that)

Event Timeline

Catrope raised the priority of this task from to High.
Catrope updated the task description. (Show Details)
Catrope added subscribers: Mooeypoo, Aklapper, Catrope.

Change 260410 had a related patch set uploaded (by Mooeypoo):
Only update seenTime in the local API

https://gerrit.wikimedia.org/r/260410

Change 260410 merged by jenkins-bot:
Only update seenTime in the local API

https://gerrit.wikimedia.org/r/260410

@Catrope - let me know if the current behavior for updating the seen status of cross-wiki bundled notifications is correct:

  • Let's have two notifications from another wiki
  • I click on the Notification panel - and not expanding the bundled notifications, dismiss/close it.
  • mw-echo-ui-notificationBadgeButtonPopupWidget-message becomes greyed out indicating seen status.

@Catrope - let me know if the current behavior for updating the seen status of cross-wiki bundled notifications is correct:

  • Let's have two notifications from another wiki
  • I click on the Notification panel - and not expanding the bundled notifications, dismiss/close it.
  • mw-echo-ui-notificationBadgeButtonPopupWidget-message becomes greyed out indicating seen status.

Hah, nice edge case. I hadn't thought of that one. On the one hand, you could argue that this is incorrect behavior because the foreign notifications are still unseen, but on the other hand, it could be confusing that the badge isn't greyed out when you close the popup.

@jmatazzoni, @Pginer-WMF: thoughts?

If the user marks a group as read, we can consider its individual items as read.

We can compare this with the current bundle behaviour: a user gets a bundled message telling that she had 10 new replies about an Easter Island related discussion. Currently, we allow users to mark such bundle as read without any concern that the user didn't actually checked the individual items. We don't care if they were actually read, the user decided to consider them "as read" because she got enough info from the bundle to make that decision. That is fine and the ability to expand such bundles should not interfere with that in my opinion.

the seentime for wiki B should not be updated until the user actually views the notifications from wiki B

It seems to be fine now - expanding bundled cross-wiki notifications on wiki A does not make them 'seen' in wiki B.

The reverse case has an issue - marking as read in wiki B makes bundled cross-wiki notifications in wiki A to display 'no notifications'. Filed as T127242: cross-wiki: If a user sees Alerts and marks as read Messages in local wikis, then the cross-wiki bundle displays 'There are no notifications'

jmatazzoni set Security to None.