Page MenuHomePhabricator

When user is reverted by Automoderator, send them a talk page message
Open, LowPublic5 Estimated Story Points

Description

User story: As a new Wikipedia editor, I want to be told that Automoderator has reverted my edit, so that I understand this was an automated action and know how to report an error.

  • The talk page message text should be a translatable system message which is therefore customisable by editing the corresponding MediaWiki namespace page.
  • The message heading should be defined in MediaWiki config and surfaced for customisation in wiki config.
  • The edit summary should be defined in MediaWiki config and surfaced for customisation in wiki config.

The message should be posted at the bottom of the reverted user's talk page in a new section.

We should have a MediaWiki (and wiki) config variable for enabling sending the talk page message. The default should be disabled.

Variables
The following data should be available for inserting into the text:

Talk page message

Heading

  • Date (Month and year)
  • Title of page where revert took place

Edit summary

  • Title of page where revert took place

Default text

Heading
<MONTH> <YEAR>: <AUTOMODERATOR USERNAME> reverted your edit

Message content

Hello! I am [[User:<AUTOMODERATOR USERNAME>|]], an automated system which uses a machine learning model to identify and revert potentially bad edits to ensure Wikipedia remains reliable and trustworthy. Unfortunately, I reverted one of your [[Special:Diff/<DIFF ID>|recent edits]] to [[<PAGE TITLE>]]. 
* Because the model I use is not perfect, it sometimes reverts good edits. If you believe the change you made was constructive, please [[<REPORT PAGE NAME>|report it here]]. 
* [[:mw:Moderator Tools/Automoderator|Learn more]] about my software.
* To learn more about editing visit your [[Special:Homepage|Newcomer Homepage]].

Edit summary
Notice of automated revert on [[<PAGE TITLE>]]

Event Timeline

At our offsite we noted that we may want to bail on sending this message if the recipient has had their account blocked in the time since the edit was reverted.

Samwalton9-WMF renamed this task from When user is reverted by Automoderator, send them an informative talk page message to When user is reverted by Automoderator, send them a talk page message.Apr 29 2024, 11:31 AM
Samwalton9-WMF updated the task description. (Show Details)

The talk page message text should be a translatable system message which is therefore customisable by editing the corresponding MediaWiki namespace page.

I want to make a note explaining why this is different to the other messages, which we've put in MW/wiki config. Existing anti-vandalism bots use, in some cases, fairly complex markup and structure for these messages. This includes icons, buttons, and other formatting. Customising these messages in any detail would be frustrating in a basic text box in Community Configuration, so we'd like to give editors the full wiki editor to edit this message, giving them the ability to preview their changes and access other editor features. We'll then link out to this MediaWiki page in community config.

This presumably requires us to work on T349604.

jsn.sherman set the point value for this task to 5.Apr 30 2024, 3:28 PM
jsn.sherman moved this task from To be estimated to Up next on the Moderator-Tools-Team board.
jsn.sherman subscribed.

I will provide a default message in the summary.

Just leaving some comments/updates since I'll be out on Monday.
I've got the header and the edit summary coded/working locally, but I'm not sure how to create a system message.

Is it just as easy as creating a wiki page in the MediaWiki namespace with its message key as the name of the page?
I know that it has to be globally unique as well and want to account for that.

Also, do we want to leave a talk page message if the user isn't logged in?

Also, do we want to leave a talk page message if the user isn't logged in?

Yes, I believe so. Current anti-vandalism bots seem to do so, and in the world of temporary accounts it might be easier for users to find their talk page.

Change #1037182 had a related patch set uploaded (by Kgraessle; author: Kgraessle):

[mediawiki/extensions/AutoModerator@master] When user is reverted by Automoderator, send them a talk page message

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

Two potential complications occurred to me today - Flow and temporary accounts.

We should verify that this patch works when temporary accounts are enabled (I don't think talk pages behave any differently but we should verify).

Flow is being decommissioned but is still in use on some wikis. I've asked if any Wikipedia wikis use it for user talk pages. I'm not sure if they do or not, but if they do I assume our implementation wouldn't work there. I'm not convinced we should build in a dependency for the probably very small number of wikis this might affect, but worth us knowing about anyway.

Change #1037182 abandoned by Kgraessle:

[mediawiki/extensions/AutoModerator@master] When user is reverted by Automoderator, send them a talk page message

Reason:

Bad Merge Conflict- Fixing locally will create a new patch.

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

Change #1037545 had a related patch set uploaded (by Kgraessle; author: Kgraessle):

[mediawiki/extensions/AutoModerator@master] When user is reverted by Automoderator, send them a talk page message

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

Flow is being decommissioned but is still in use on some wikis. I've asked if any Wikipedia wikis use it for user talk pages. I'm not sure if they do or not, but if they do I assume our implementation wouldn't work there. I'm not convinced we should build in a dependency for the probably very small number of wikis this might affect, but worth us knowing about anyway.

@Trizek-WMF and I talked about this today and agreed that given we have a timeline for freezing Flow and ultimately deprecating it, we should opt to not deploy on wikis using Flow for the time being. Within the space of a few months it should be the case that we can safely deploy to these wikis - although Flow won't yet be removed, it will no longer be in use on any active talk pages. We'll update the deploying documentation to include a note about this.

Two potential complications occurred to me today - Flow and temporary accounts.

We should verify that this patch works when temporary accounts are enabled (I don't think talk pages behave any differently but we should verify).

Flow is being decommissioned but is still in use on some wikis. I've asked if any Wikipedia wikis use it for user talk pages. I'm not sure if they do or not, but if they do I assume our implementation wouldn't work there. I'm not convinced we should build in a dependency for the probably very small number of wikis this might affect, but worth us knowing about anyway.

@Samwalton9-WMF

I'll take a look at both of these today. I was able to get temporary accounts setup locally and am now looking at how it works with the current code.

As far as Flow/Structured Discussions, I found all the wikis that use it here. I'm not sure how up to date it is though.

Flow is being decommissioned but is still in use on some wikis. I've asked if any Wikipedia wikis use it for user talk pages. I'm not sure if they do or not, but if they do I assume our implementation wouldn't work there. I'm not convinced we should build in a dependency for the probably very small number of wikis this might affect, but worth us knowing about anyway.

@Trizek-WMF and I talked about this today and agreed that given we have a timeline for freezing Flow and ultimately deprecating it, we should opt to not deploy on wikis using Flow for the time being. Within the space of a few months it should be the case that we can safely deploy to these wikis - although Flow won't yet be removed, it will no longer be in use on any active talk pages. We'll update the deploying documentation to include a note about this.

https://extloc.toolforge.org/extensions/Flow is the list of wikis that have Flow installed (not whether they're using it though, and this doesn't explain if they're using configs like 'all new talk pages are Flow'). This includes id.wiki, although thankfully only on three community pages (per a query Benoît ran), and users can no longer change user talk pages to Flow - so we're safe to continue here.

We'll just need to do this check for other wikis - if they have any user talk pages that are Flow we'll need to decide whether to pause deploying there until Flow deprecation continues, build something into Automoderator to check for Flow pages and skip them, or something else.

T365846: Assist communities in archiving Flow/StructuredDiscussions boards is supposed to be done this quarter. Communities are asked to put their Flow boards on subpages and switch back to wikitext talk pages. The Flow boards would then be locked. It is a matter of a few months.

Meanwhile, I think we can safely consider any wiki, as far as newcomers/recent accounts don't have a Flow talk page. We can check how Flow is for each of them, manually.

As far as Flow/Structured Discussions, I found all the wikis that use it here. I'm not sure how up to date it is though.

Being the former maintainer of this list, It is not up to date at all. I tagged it accordingly, thank you for highlighting it!

T365846: Assist communities in archiving Flow/StructuredDiscussions boards is supposed to be done this quarter. Communities are asked to put their Flow boards on subpages and switch back to wikitext talk pages. The Flow boards would then be locked. It is a matter of a few months.

Meanwhile, I think we can safely consider any wiki, as far as newcomers/recent accounts don't have a Flow talk page. We can check how Flow is for each of them, manually.

As far as Flow/Structured Discussions, I found all the wikis that use it here. I'm not sure how up to date it is though.

Being the former maintainer of this list, It is not up to date at all. I tagged it accordingly, thank you for highlighting it!

Adding a message to discussion page is a common workflow - so when Wikimedia was using multiple discussion systems in parallel (Wikitext/LQT/Flow) there is a proposal to add a mechanism in core with a default implementation that can be overrided in extensions providing alternative discussion page. Even Flow/LQT will be sunset, having such feature in core may still be beneficial to reduce redundant codes (other benefits including possible supports for non-WMF discussion workflow like DPLforum, and make a simpler API to post a message). See T123522: Implement a server-side mw.MessagePoster equivalent.

jsn.sherman added subscribers: SonjaPerry, OTichonova.

@Trizek-WMF @SonjaPerry @OTichonova

This task (re)raises a design/product question that I still don't think has been adequately answered: what's the dividing line for message like strings to be included in wikiConfig vs i18n? All i18n messages can be edited via the message system via their own message key pages (eg. /wiki/MediaWiki:automoderator-desc). We have AutoModeratorUndoSummary in the wikiConfig page (/wiki/MediaWiki:AutoModeratorConfig.json), but then there's also been discussion of using i18n messages to set the default for some wikiConfig strings. I feel like we're creating a patchwork i18n/config system for these message strings and I don't think the benefit of centralizing these customization options is worth the break from conformity for config and i18n. I think all of our messages should just run through the i18n pipeline. I'd suggest that we just link out to relevant message pages from our community config page.

I tested this locally against Discussion Tools and it looks good with that extension as well, just noting that we've accounted for that.