Page MenuHomePhabricator

Duplicate notifications if a topic is archived by a user who posted in it
Closed, ResolvedPublicBUG REPORT

Description

Steps to reproduce

  1. As user A, subscribe to an existing topic on, say, Talk:Main Page.
  2. As user B, reply to it.
  3. As user B, archive the said section to e.g. Talk:Main Page/Archive 1.
  4. As user A, look at your notifications.

Actual result

  1. There are two notifications about user B’s reply:
    • one linking to Talk:Main Page, with the timestamp when the reply was posted;
    • and one linking to Talk:Main Page/Archive 1, with the timestamp of the archival.

Duplicate notification - Patch Demo (668779,27).png (193×500 px, 14 KB)

Expected result

  1. There is one notification, with the timestamp when the reply was posted, linking to Talk:Main Page/Archive 1. (Fixing the link is rather a feature request and may not be possible at the current stage of the project, but the duplicate notification is definitely a bug.)

Software version

Patch demo of If96a0df1efbf5cadfb6bf2bf8f7ad5c9c90ea142 at https://patchdemo.wmflabs.org/wikis/de6265b1b7/. The bug doesn’t seem to be connected to the patch, though.

Event Timeline

This is a limitation of the current system. For every edit, we send notifications for every comment added by the current user. This works well when archiving is done by bots that don't post any comments themselves, but not so well when it's done by humans.

We don't have a reliable way to tell if an added comment is a "new" one, or if it's being archived from another page. We probably could try to guess it better (e.g. depending on how old the timestamp is, or on whether there are comments by other users), but I didn't want to invent a complicated system that would probably still not be perfect, and would result in missed notifications (like how the mention notifications sometimes don't get sent for reasons that are difficult to understand).

(Also, the current behavior has another drawback: when an unsigned comment is signed by someone else or a bot, that doesn't send a notification.)

I would actually want us to work on a better approach – we could have a database where we could look up each comment, and check whether it exists (or existed) on another page already. This would also be useful for permalinks to archived comments (T273341), and all kinds of fancy analytics work (T284200). But it would be a significant effort.

Esanders renamed this task from Duplicate notifications upon topic archival to Duplicate notifications if a topic is archived by a user who posted in it.Oct 18 2021, 10:49 PM

I think a timestamp check wouldn't be unreasonable. There would need to be some flexibility (x minutes) as the timestamps are generated at different times (one at parse time, one in deferred updates) and the timestamp signature timestamp doesn't include seconds.

Change 737444 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Suppress events from comments that are more than 10 minutes old

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

Change 737444 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Suppress events from comments that are more than 10 minutes old

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

@Tacsipacsi, at enwiki I'm only seeing this when one of the https://en.wikipedia.org/wiki/Wikipedia:One_click_archiving scripts is used. Which page did you see this at, and what script or bot was used for the archiving?