Page MenuHomePhabricator

VisualDiff does not show change of a main+details edit
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

<ref name=":0" details="details">Main</ref>
<references />
  • change "Main"
  • open the visual diff

What happens?:
no change is visible in VisualDiff

image.png (274×1 px, 32 KB)

What should have happened instead?:
The change should be visible, like this visual diff on wikis which still have "synthetic list-defined main refs":

image.png (289×1 px, 32 KB)

Technical notes

The VE model shows an updated InternalItemNode, so the failure is in how we render the references list differences. This is a cluster of problems, currently the visual diff has no concept of sub-references.

ve.dm.VisualDiff.prototype.getInternalListDiff iterates over the internal list indexOrder which only includes refs which appear in the body. I imagine that a list-defined ref which isn't used in the article will also fail to appear in the diff. Index order is also incorrect for ordering sub-references since they appear in the reference list according to the order of their main references rather than in order of appearance in the document.

To fix the issue, we should finally teach visual diff something about sub-referencing. Ideally we can keep the coupling mostly loose, eg. by providing a method in InternalList which iterates all item nodes according to both document and sub-referencing order.

Deployment: https://wikitech.wikimedia.org/wiki/Deployments#Monday,_June_1

Event Timeline

I was unable to reproduce this neither on testwiki nor on dewiki. @lilients_WMDE can you double check if this still persists, please? Thanks!

Screenshot From 2026-05-05 18-23-47.png (490×1 px, 93 KB)

Screenshot From 2026-05-05 18-23-30.png (442×1 px, 60 KB)

I was unable to reproduce this neither on testwiki nor on dewiki. @lilients_WMDE can you double check if this still persists, please? Thanks!

Screenshot From 2026-05-05 18-23-47.png (490×1 px, 93 KB)

Screenshot From 2026-05-05 18-23-30.png (442×1 px, 60 KB)

I can reproduce it on betawiki – it's presumably related to our refactoring which isn't deployed to production wikis.

Change #1288831 had a related patch set uploaded (by Awight; author: Awight):

[VisualEditor/VisualEditor@master] [POC] Visual diff becomes aware of sub-references

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

Change #1289186 had a related patch set uploaded (by Awight; author: Awight):

[VisualEditor/VisualEditor@master] no-op: Bring hierarchical reflist logic into InternalList

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

awight moved this task from Doing to Tech Review on the WMDE-TechWish-Sprint-2026-05-12-Fungi board.
awight subscribed.

Change #1289186 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Introduce hierarchical sub-reference logic into InternalList

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

Change #1288831 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Visual diff enumerates all references, including unused main refs

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

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

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (9cf5524e7)

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

Change #1294218 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (9cf5524e7)

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

Change #1294826 had a related patch set uploaded (by WMDE-Fisch; author: DLynch):

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.4] Update VE core submodule to master (9cf5524e7)

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

Change #1294826 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.47.0-wmf.4] Update VE core submodule to master (9cf5524e7)

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

Mentioned in SAL (#wikimedia-operations) [2026-06-01T07:13:38Z] <wmde-fisch@deploy1003> Started scap sync-world: Backport for [[gerrit:1294826|Update VE core submodule to master (9cf5524e7) (T424232)]]

Mentioned in SAL (#wikimedia-operations) [2026-06-01T07:31:22Z] <wmde-fisch@deploy1003> wmde-fisch: Backport for [[gerrit:1294826|Update VE core submodule to master (9cf5524e7) (T424232)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-06-01T07:45:13Z] <wmde-fisch@deploy1003> Finished scap sync-world: Backport for [[gerrit:1294826|Update VE core submodule to master (9cf5524e7) (T424232)]] (duration: 31m 34s)