Page MenuHomePhabricator

DVisual Editor: Create public edit tag highlighting an edit came from VE in the app
Closed, ResolvedPublic0 Estimated Story Points

Description

Requirements

  • When edits get made, we apply automated "edit tags" to them. This publicly tags where the edit came from and how it was made
  • The edit tag displays in the edit history of an article (for example "Edit suggestion seen, Edit Suggestion used, Mobile edit, Mobile web edit"
  • As part of the Visual Editor journey from apps to mobile web development, we should apply a tag to indicate that an edit came from Visual Editor in the mobile app
  • This will enable us to track how often people use this capability
  • We need to create two separate tags - 'android app redirect' and 'ios app redirect' to ensure clarity about which app the user has edited from, and to ensure we don't break any of Shay's data queries that already look for 'app'

Please see below image from Marshall Miller as an example of the edit tags:

image.png (2,722×190 px, 128 KB)

Test Notes

Please use the special app builds that force the VE feature on. https://wikimedia.slack.com/archives/C0BB6A2NS6A/p1789509451750379

  1. Begin editing a page inside the app.
  2. Choose to go to the web to do a visual edit.
  3. Save changes in the browser.
  4. Look at the edit history of the page you edited.
  5. Confirm you see in the item for the edit you just did the text (Tags: Visual edit, Android app edit (web), Mobile edit, Mobile web edit) (or iOS, depending on which device you are testing with)

There is a third tag, app edit (other), but I don't think this can be organically tested because it's a fallback if the web can't determine your platform.

Event Timeline

ABendall-WMF triaged this task as High priority.
ABendall-WMF updated the task description. (Show Details)

Change #1339876 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Refactor vetags to not be a single saveField

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

Change #1339877 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] New hook: VisualEditorRegisterChangeTagsHook

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

Change #1339878 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/MobileFrontend@master] VisualEditorOverlay: tag edits from the apps

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

Change #1339880 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/MobileApp@master] Tell VisualEditor about the app edit web tag

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

Change #1339930 had a related patch set uploaded (by DLynch; author: DLynch):

[integration/config@master] Add VisualEditor to MobileApp phan dependencies

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

Change #1339876 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Refactor vetags to not be a single saveField

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

Change #1339877 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] New hook: VisualEditorRegisterChangeTagsHook

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

Change #1339878 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] VisualEditorOverlay: tag edits from the apps

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

Change #1339930 merged by jenkins-bot:

[integration/config@master] Zuul: [mediawiki/extensions/MobileApp] Add VisualEditor phan dep

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

Mentioned in SAL (#wikimedia-releng) [2026-09-14T19:50:59Z] <James_F> Zuul: [mediawiki/extensions/MobileApp] Add VisualEditor phan dep, for T437736

Change #1339880 merged by jenkins-bot:

[mediawiki/extensions/MobileApp@master] Tell VisualEditor about the app web edit tags

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

Change #1342046 had a related patch set uploaded (by Jdlrobson; author: DLynch):

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.19] [DONOTMERGE - demoing deployment process only] Refactor vetags to not be a single saveField

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

ABorbaWMF subscribed.

Looks good
Build: 1878-alpha-2026-09-15
Tested on:
iPhone 16, iOS 26.6
iPad Air, iPadOS 26.6
iPhone SE, iOS 26.5.2

Testing on 50608-alpha-2026-09-15
Tested on:
Pixel 8, Android 16
Galaxy A36, Android 15

Screenshot 2026-09-15 at 6.27.58 PM.png (2,314×256 px, 145 KB)

The newish VisualEditorRegisterChangeTagsHook that was introduced in VisualEditor and used by MobileApp leads to the train blocker T438125. The reason is that votewiki/loginwiki do have MobileApp but intentioanlly do not have VisualEditor. When MobileApp triggers the hook on those wikis, it results in an error because the VisualEditor hook class does not exist. That needs a fix that should be attached to the train blocker T438125 ;)

Change #1342201 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/MobileApp@master] Revert "Tell VisualEditor about the app web edit tags"

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

Change #1342210 had a related patch set uploaded (by Jaime Nuche; author: Urbanecm):

[mediawiki/extensions/MobileApp@wmf/1.47.0-wmf.20] Revert "Tell VisualEditor about the app web edit tags"

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

Change #1342201 merged by jenkins-bot:

[mediawiki/extensions/MobileApp@master] Revert "Tell VisualEditor about the app web edit tags"

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

Change #1342210 merged by jenkins-bot:

[mediawiki/extensions/MobileApp@wmf/1.47.0-wmf.20] Revert "Tell VisualEditor about the app web edit tags"

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

Mentioned in SAL (#wikimedia-operations) [2026-09-16T10:37:33Z] <jnuche@deploy1003> Started scap sync-world: Backport for [[gerrit:1342210|Revert "Tell VisualEditor about the app web edit tags" (T437736 T438125)]]

Mentioned in SAL (#wikimedia-operations) [2026-09-16T10:57:25Z] <jnuche@deploy1003> jnuche: Backport for [[gerrit:1342210|Revert "Tell VisualEditor about the app web edit tags" (T437736 T438125)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

For transparency:

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileApp/+/1339880 is...wrong on multiple levels:

  • it doesn't actually do anything just yet (it adds code for a hook handler, but the hook handler is not actually registered in extension.json),
  • it introduces an undeclared hard dependency on VisualEditor
    • to resolve it, it either should be declared (then MobileApp needs to be undeployed from wikis where VisualEditor is not present, such as loginwiki),
    • or it needs to be softened (and then the hook handler needs to be in a dedicated class, to avoid PHP from loading an interface that is not guaranteed to exists).

Since the patch is currently a no op, reverting it should be good enough for train blocker purposes. Decisions on how to move forward can be done separately.

Mentioned in SAL (#wikimedia-operations) [2026-09-16T11:10:48Z] <jnuche@deploy1003> Finished scap sync-world: Backport for [[gerrit:1342210|Revert "Tell VisualEditor about the app web edit tags" (T437736 T438125)]] (duration: 33m 14s)

Will move this back into Blocked, since this was reverted.

Cklimas updated the task description. (Show Details)

Looks good
Build: 6177-beta-2026-09-17
Tested on:
iPhone 16, iOS 26.6
iPad Air, iPadOS 26.6
iPhone SE, iOS 26.5.2

Testing on 50608-alpha-2026-09-15
Tested on:
Pixel 8, Android 16
Galaxy A36, Android 15

Screenshot 2026-09-17 at 11.15.41 AM.png (2,296×266 px, 170 KB)

Verifying I am seeing revision tag values for app web edit android and app web edit ios in event.mediawiki_revision_tags_change data

Seddon renamed this task from Visual Editor: Create public edit tag highlighting an edit came from VE in the app to DVisual Editor: Create public edit tag highlighting an edit came from VE in the app.Tue, Sep 22, 5:25 PM
Seddon set the point value for this task to 0.

Change #1342046 abandoned by Jdlrobson:

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.19] [DONOTMERGE - demoing deployment process only] Refactor vetags to not be a single saveField

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