Steps to replicate the issue (include links if applicable):
- Go to a wiki on which $wgCiteRemoveSyntheticRefsUnsafe = true, such as https://en.wikipedia.beta.wmflabs.org/
- Create a page with the following wikitext source:
<ref name=":0" details="details">Main</ref> <references />
- change "Main"
- open the visual diff
What happens?:
no change is visible in VisualDiff
What should have happened instead?:
The change should be visible, like this visual diff on wikis which still have "synthetic list-defined main refs":
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



