Page MenuHomePhabricator

Inform Flow users when they hit the flow mention limit
Closed, ResolvedPublic

Description

Since Flow mentions users explicitly, there is no need to have the success mention feature for it (see T139962).
However, it is not possible with Flow to realise when you hit the flow mention limit. In contrast to wikitext mentions, flow sends out the first 100 mentions and then stops.

Therefore, please

  • add a mention failure notification for flow
  • The message should reflect that the first 100 mentions have been sent out, only the following ones have not

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore added a project: User-Addshore.
Addshore moved this task from Unsorted 💣 to Next on the User-Addshore board.

Change 308555 had a related patch set uploaded (by Addshore):
Add mention failure notifications to Flow

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

Addshore renamed this task from Inform users when they hit the flow mention limit to Inform Flow users when they hit the flow mention limit.Sep 9 2016, 10:14 AM

The summary of differences for mention notifications between wikitext and Flow pages (for testing after code review)
On wikitext pages

  • the limit is 50
  • the success mention notification is sent as well as the failure mention notification

On Flow pages

  • failure mention notification is not sent, although it's possible to enter incorrect flow-mention using wikitext
  • the proposed limit for mention notifications is 100

A patch was submitted to add mention success/failure notifications to Flow, but it was never merged or followed up on.

Good news. Is it a lot of work?

Change 349251 had a related patch set uploaded (by Sbisson):
[mediawiki/extensions/Echo@master] MentionStatus: prefer failure-type

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

Change 349251 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] MentionStatus: prefer failure-type

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

Change 308555 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Add mention failure notifications to Flow

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

Tested locally (could not make it work in betalabs):
(1) The following spec is not implemented:

The message should reflect that the first 100 mentions have been sent out, only the following ones have not

The notification does not list which ones were not sent.

Screen Shot 2017-04-27 at 2.59.31 PM.png (356×567 px, 51 KB)

(2) Strange counting issue: if "FlowMaxMentionCount" is set to 12, 'flow-mention-failure-too-many' notification will come if the number of mention is between 13 and 18. Above that (I tried 19, 20, 25, and 65) - the failure notification does not come.

re (1)
I'll rework the message. @jmatazzoni any suggestion about how to phrase the notification header? It is currently using the Echo message, it goes like this: Your mentions were not sent because they exceeded the limit of 100. It sort of implies that no mentions were sent but the reality is that your first 100 mentions were successfully sent but the other ones, say from 101 to 115, were not sent.

re (2)
It turns out this change from 2y8m ago cancels all mention attempts of more than 20 users thinking it must be spam.

$wgFlowMaxMentionCount, with its default value of 100, seem to have been introduced by this change about 3y7m ago.

I see no reason to keep the hard limit of 20. $wgFlowMaxMentionCount exist specifically so it can be tweaked to the right balance between functionality and protection.

But I have to agree that 100 is a very high value. I can't really imagine writing a Flow post and explicitly pinging 100 users by name because they are relevant to the conversation. Echo has a limit of 50. We could look in the db for mention-failure-too-many to see how often and in which context that limit is reached.

Change 350877 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Flow@master] Remove arbitrary limit of 20 mentions

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

How about this for language:

You tried to mention more than 100 users. All mentions above that limit were not sent.

Let's limit the mention to 50 users for consistency with the other mention systems.

How about this for language:

You tried to mention more than 100 users. All mentions above that limit were not sent.

That works for me. Do you think we should change it in Echo so it is used for this purpose in both Flow and Echo and leave the Echo one as-is and use this new version for Flow only?

It would be good to make the messaging and functionality consistent across these systems. If it's not too much effort...

It's actually less effort. I'll change it in Echo and let Flow use it as the default.

Change 350886 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Flow@master] Set max mention count to 50

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

Change 350887 had a related patch set uploaded (by Sbisson; owner: Sbisson):
[mediawiki/extensions/Echo@master] Rephrase notification-header-mention-failure-too-many

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

Change 350877 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Remove arbitrary limit of 20 mentions

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

Change 350886 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Set max mention count to 50

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

Change 350887 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Rephrase notification-header-mention-failure-too-many

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

Checked in betalabs

  • the mention limit failure notification is sent when the number of mentions is over 50
  • first 50 notifications are sent successfully
  • the notification message looks like the following:

Screen Shot 2017-05-01 at 12.31.03 PM.png (307×535 px, 44 KB)

Ahecht subscribed.

See https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Pinging_over_50

The new wording "All mentions above that limit were not sent" is still presented on the English wikipedia for Echo notifications, despite the fact that Echo sends none of the messages if the limit is exceeded. Different messages should be shown for Flow and Echo since the behavior is different ("Your mentions were not sent because they exceeded the limit of 50." for Echo, "You tried to mention more than 50 users. All mentions above that limit were not sent" for Flow).

I re-checked - Echo notifications (mention-failure-too-many) are not sent at all when the limit is reached (in betalabs the limit is above 100). Thus, the message "All mentions above that limit were not sent" is incorrect and that should be fixed.

The scope of this ticket was about flow-mention-failure-too-man notification functionality which was done.

The separate phab task - T199391: 'mention-failure-too-many' notification incorrectly says "All mentions above that limit were not sent" - was filed to address Echo notification for above the limit mention count.