Page MenuHomePhabricator

Investigate cases where no mention happens due edit instead of addition
Closed, ResolvedPublic8 Story Points

Description

Task: The technical details page[1] for mentions lists a restriction for mentions that is likely to produce mention errors:

  • the comment, in which the mention occured, was not considered an addition but an edit (the mention itself and the signature do not make it an addition, only the rest counts)

Questions to answer:

  • What would be the consequences of lifting these conditions? How could we do that?
  • If we can't lift them, could we inform users about mentions that are not being sent out due to these conditions?

Goal: We want to reduce the sources of mention failures. If that is not possible, let's try to at least give an error message in form of a mention failure notification.

Background: This task is based on a wish that received 21 points (#9) in the German Community Wishlist[1]. Originally, the wish was to receive an information about the sent messages. To keep the number of notifications smaller, and to help people use mentions in a way that they are sent, the task informs about mention failures, and adds the reasons for the failure as well.

[1] Link to wish (in German): https://de.wikipedia.org/wiki/Wikipedia:Umfragen/Technische_W%C3%BCnsche_2015/Topw%C3%BCnsche#Bei_Speichern_Hinweis_.C3.BCber_abgegebene_Benachrichtigungen_.5BUmfrage_2015.5D
in English: https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes#Notifications_about_failed_mentions

Event Timeline

Lea_WMDE created this task.May 26 2016, 4:01 PM
Lea_WMDE renamed this task from [GTWL] Add a mention fail notice due to >50 mentions to [GTWL] Add a mention fail notice due to >50 mentions - TASK STILL TO BE DISCUSSED.May 26 2016, 4:08 PM
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE renamed this task from [GTWL] Add a mention fail notice due to >50 mentions - TASK STILL TO BE DISCUSSED to Investigate properties of mention behavior to cancel out mention failure reasons.Jun 15 2016, 10:28 AM
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE renamed this task from Investigate properties of mention behavior to cancel out mention failure reasons to Investigate cases where no mention happens due edit instead of addition.Jun 15 2016, 4:40 PM
Lea_WMDE updated the task description. (Show Details)
Tobi_WMDE_SW set the point value for this task to 8.Jun 16 2016, 2:13 PM
Tobi_WMDE_SW moved this task from Proposed to Backlog on the TCB-Team-Sprint-2016-06-16 board.

So mentions will only be carried out if the action has a type of 'add-comment' or 'new-section-with-comment'.
These action types are defined in the phpdoc of DiscussionParser::interpretDiff
For convenience I have copied all of the possible types of action into this comment.
The other actions account for other cases where mentions will not happen.
Note: A single edit / diff can contain multiple actions AFAIK

	 * - add-comment: A comment signed by the user is added to an
	 *    existing section.
	 * - new-section-with-comment: A new section is added, containing
	 *    a single comment signed by the user in question.
	 * - unknown-signed-addition: Some signed content is added, but it
	 *    includes section headers, is signed by another user or
	 *    otherwise confuses the interpretation engine.
	 * - unknown-multi-signed-addition: Some signed content is added,
	 *    but it contains multiple signatures.
	 * - unknown-unsigned-addition: Some content is added, but it is
	 *    unsigned.
	 * - unknown-subtraction: Some content was removed. These actions are
	 *    not currently analysed.
	 * - unknown-change: Some content was replaced with other content.
	 *    These actions are not currently analysed.
	 * - unknown: Unrecognised change type.

So one of the requirements for a mention to work is to have the user sign the comment, and in most cases this signiture will contain a link to the user that wrote the comment.
I can only assume that this accounts for the high level of 'sameUser' error counted on https://grafana.wikimedia.org/dashboard/db/echo-mention-errors

QU1 - What would be the consequences of lifting these conditions? How could we do that?

We don't know, I guess knowing how many of each of the types of actions are generally generated from edits would help us here. Looking at the main description of this task the most interesting action type would be "unknown-change" which I expect would be the case if someone adds a comment and forgets to mention someone and then in another edit goes back and adds a link which would noramlly trigger a mention.

QU2 - If we can't lift them, could we inform users about mentions that are not being sent out due to these conditions?

I guess we could still find possible mentions that would have happened in these edits by simply diffing the links as is currently done. IMO this could result in many unexpected things, for example if I simply want to add some links to my talk page for some other reason I would get a notification saying that no notification had happened (when I didn't intend on one happening in the first place) and lifiting of the restrictions would of course result in notifications being sent.
I think changing these restrictions should wait until a new mention syntax is in place as described at the bottom of https://www.mediawiki.org/wiki/User:Legoktm/pings

Addshore updated the task description. (Show Details)
Addshore moved this task from Backlog to Doing on the TCB-Team-Sprint-2016-06-16 board.

IMO this could result in many unexpected things, for example if I simply want to add some links to my talk page for some other reason I would get a notification saying that no notification had happened

This would be the case of not adding any content except the links, which I agree is one of the cases where the current system of mentioning people is too vague for us to know if they actually want to send a mention.
Can you think of a use case, where somebody adds a user link, edits some text, signs, and does not want to mention the user? Is there anything that would oppose implementing this from your point of view?

Addshore triaged this task as Normal priority.Jun 22 2016, 2:39 PM

Can you think of a use case, where somebody adds a user link, edits some text, signs, and does not want to mention the user? Is there anything that would oppose implementing this from your point of view?

Well, there is nothing to stop a user doing so.

Addshore removed Addshore as the assignee of this task.Jul 12 2016, 1:04 PM
Addshore removed a project: User-Addshore.

The TCB-Team decided to allow mentions for edits. This means:
"The tree is importend"
being changed to
"[[User:SomeUser]] The tree is important ~~~~"
will send a mention once T138938 is deployed

Lea_WMDE closed this task as Resolved.Jul 14 2016, 9:02 AM
Lea_WMDE claimed this task.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptAug 31 2016, 2:14 PM