Page MenuHomePhabricator

Bundled notifications: The counter for bundled notifications shows sum of notifications of Alerts and Messages.
Closed, ResolvedPublic

Description

Moved from comments on T138888: Cross-wiki counter does not show correct number of unread messages
The counter for cross-wiki bundles (beta-labs) consistently shows the sum of both Alerts and Messages.
e.g. User cawiki has only cross-wiki Alerts and Messages


Another example

  1. Expanded Alerts from the first screenshot show 5 new messages on user's talk page and the message that the user's comment was edited several times (unspecified). What was calculated there? The number of multiple edits of the user's comment might be 3 times according to overall badge count or it may be 15-5=10 times according to the sub-panel counter.

Open Messages (the flyout counter shows 7, the cross-wiki sub-panel counter shows 15 again )

Expand it - the number of cross-wiki notifications is shown correctly 7(6+1), the same count as in the flyout.

A simpler example - User:ET91 has 5 events according to db:
3 events in cawiki -

[cawiki]> select event_id, event_type, event_deleted from echo_event join echo_notification on notification_event=event_id where notification_user in (select user_id from user where user_name='ET91');
+----------+------------+---------------+
| event_id | event_type | event_deleted |
+----------+------------+---------------+
|     1279 | welcome    |             0 |
|     1280 | mention    |             0 |
|     1281 | mention    |             0 |
+----------+------------+---------------+
3 rows in set (0.00 sec)

2 events in enwiki -

[enwiki]> select event_id, event_type, event_deleted from echo_event join echo_notification on notification_event=event_id where notification_user in (select user_id from user where user_name='ET91');
+----------+----------------+---------------+
| event_id | event_type     | event_deleted |
+----------+----------------+---------------+
|   307211 | emailuser      |             0 |
|   307316 | flow-new-topic |             0 |
+----------+----------------+---------------+
2 rows in set (0.00 sec)

(CORRECT) Alerts in cawiki will display two Mentions


Messages will display "Failed to fetch notificaitons" which is filed as T139112: [regression-betalabs] 'Failed to fetch notifications'

Switching to enwiki - cawiki there will have incorrect count:


Expand cawiki Alerts - two Mentions are here, but apparently 'Welcome' was counted?:

enwiki Messages - cawiki count is incorrect

Expand cawiki Messages subpanel - only 'Welcome' is displayed:

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 5 2016, 1:02 AM

The screen recording shows a new user ET93 who has only three notifications only on enwiki

  • 'welcome' + 'enable Flow on user talk page' (2 messages)
  • 'change of user rights'(1 alert).

ET93 goes to a foreign wiki (cawiki) to view them as cross-wiki notifications. The cross-wiki notifications are counted together as Alerts(1)+Messages (2) = 3

SBisson claimed this task.Jul 6 2016, 5:22 PM
SBisson triaged this task as High priority.

How to reproduce:

  1. Create a new user
  2. Write on the newly created user's talk page with another user
  3. Now the new user has 1 message (welcome) and 1 alert (edit-user-talk)
  4. Login on a different wiki with the new user
  5. Alert shows 2 foreign alerts (but where you expand there is only 1)
  6. Message shows 2 foreign messages (but when you expand there is only 1)

Change 297509 had a related patch set uploaded (by Mattflaschen):
Notification count: don't assume 'all'

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

Change 297509 merged by jenkins-bot:
Notification count: don't assume 'all'

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

Change 297707 had a related patch set uploaded (by Mattflaschen):
Notification count: don't assume 'all'

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

Change 297707 merged by jenkins-bot:
Notification count: don't assume 'all'

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

Stashbot added a subscriber: Stashbot.

Mentioned in SAL [2016-07-06T23:41:24Z] <legoktm@tin> Synchronized php-1.28.0-wmf.9/extensions/Echo/: T139321, T139323 (duration: 00m 32s)

Checked the fix in betalabs - the counters display correct numbers.

jmatazzoni closed this task as Resolved.Jul 8 2016, 6:23 PM