Unread notification count is wrong when presentationModel::canRender() returns false
Open, LowPublic

Description

presentationModel::canRender() can be used to suppress notifications about pages or users that have been deleted. The unread notifications count doesn't take these into account. The badge shows up with a number but when the panel expands it does not contain the new notifications that have been suppressed.

SBisson created this task.Jan 27 2016, 7:14 PM
SBisson updated the task description. (Show Details)
SBisson raised the priority of this task from to Needs Triage.
SBisson added a subscriber: SBisson.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 27 2016, 7:14 PM

I'm not sure we want to do something about this: getting the raw number from DB is fast; looping all of them just to validate the number will be expensive (especially for cross-wiki notifications)

Implementations should just make sure not to create notifications that can not be displayed. Maybe on insert time, we should already run the notifications through canRender once, just to make sure we can actually store the notifications. We could then still have edge cases where some conditions have changed a week later and the notification can't be displayed (e.g. page suppressed), but then those will just be that: edge cases.

jmatazzoni triaged this task as Low priority.Mar 29 2016, 11:49 PM