Page MenuHomePhabricator

Autoreveal sometimes adds broken Reveal IP links
Closed, ResolvedPublicBUG REPORT

Description

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

What happens?:

Show IP buttons show next to each entry on the page. Clicking that button shows (error), and the API call is a local one (not cross-wiki).

What should have happened instead?:

Right now, no Show IP button is expected. T404718: Investigate: Adding Reveal IP button to Special:GlobalContributions asks for adding them.

Other information (browser name/version, screenshots, etc.):

This problem occurs for all pages that should have no IP reveal buttons.

Event Timeline

What happens on disabling autoreveal?

ipReveal.disableAutoReveal calls ipReveal.hideAllIps, which looks for all temp user links on the page and adds IP reveal buttons next to them.

What should happen?

What should happen is the same as in dispatcher.js, which is that specific logic is executed depending on the page. This could mean only adding IP reveal if extra conditions are met, adding a different type of IP reveal button, or never adding any IP reveal buttons for that page.

The simplest way to ensure IP reveal buttons get added correctly would be to simply reload the page, which would run dispatcher.js again. We could add a warning to the dialog that the page will refresh if auto-reveal is switched off.

We decided not to reload the page when the mode changed in a code review discussion, where it was imagined that IP reveal may need switching on while the user is interacting with the page. The precise timing of switching off IP reveal is likely to be less sensitive, so the user can finish their interaction with the page before switching it off, if they want to avoid a page reload.

(Implemented in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/1190241 but abandoned in favour of the solution in T404720#11201016.)

Change #1190238 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] IP auto-reveal: On disabling, check that IP was revealed before adding button

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

The simplest way to ensure IP reveal buttons get added correctly would be to simply reload the page, which would run dispatcher.js again. We could add a warning to the dialog that the page will refresh if auto-reveal is switched off.

The patch does something simpler: only adds the button if there was a revealed IP.

Change #1190238 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] IP auto-reveal: On disabling, check that IP was revealed before adding button

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

Dreamy_Jazz subscribed.

I've assumed that this can be closed, so closing