Page MenuHomePhabricator

Expanded view of an item in Special:Watchlist when using advanced mode grouping has temporary account IPs as unavailable
Closed, ResolvedPublicBUG REPORT

Description

It seems that the temporary account IP reveal when using Special:Watchlist with "Group changes by page in recent changes and watchlist" checked in the preferences does not properly reveal the IP in the expanded view for a line.

Steps to replicate the issue
  1. Make at least two testing edits using a temporary account
  2. Log into an account with the checkuser group
  3. Go to Special:Preferences and navigate to the Recent changes section
  4. Check the Group changes by page in recent changes and watchlist preference
  5. Load Special:Watchlist and find the edits made in step 1
  6. Click on Show IP next to the temporary account username used in step 1
  7. Click on the arrow icon to expand the edits made by the temporary account

What happens?:
In the expanded list view, the IP address is shown as (unavailable). Before this patch it would be a mismatch to the IP shown in the shortened list above (because the expanded list would use the latest IP which was wrong).

Screenshot:

image.png (1×728 px, 254 KB)

What should have happened instead?:
The IP address should be correctly shown in the expanded view

Event Timeline

Tchanders subscribed.

@Dreamy_Jazz and I discussed this.

In the grouped line, the IP addresses fetched are the latest ones, because there is no associated revision/log ID with each user link. The expanded lines do have IDs, and should show the IP address associated with each ID. This behaviour was decided and implemented in T326395.

The bug here

The bug introduced by this patch is that:

  • Now only the first button on the page performs an API lookup
  • The first button on the page performs a lookup for the latest IP, since it has no associated ID
  • The subsequent buttons have IDs, and assume that the API results are for an ID-based lookup
  • This assumption is wrong, so they find nothing for their own ID in the API results, so they display unavailable

We should fix that in this task.

Other related questions

These won't be answered in this task, so are captured in other tasks:

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

[mediawiki/extensions/CheckUser@master] ipReveal.js: Fix bugs in multi-reveal functionality

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

Change #1054381 abandoned by Tchanders:

[mediawiki/extensions/CheckUser@master] ipReveal.js: Fix bugs in multi-reveal functionality

Reason:

Abandoning in favour of I33caa4dcb545f6c9a41b779f3eb745a6b52402cb

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

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

[mediawiki/extensions/CheckUser@master] WIP ipReveal.js: Fix revealing IP for grouped recent changes lines

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

Change #1054383 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] ipReveal.js: Fix revealing IP for grouped recent changes lines

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

I have verified the new code has been implemented and is functioning and displaying as expected.

image.png (829×1 px, 127 KB)