Page MenuHomePhabricator

Provide an option to hide temporary accounts on Special:CheckUser
Closed, ResolvedPublic1.5 Estimated Story Points

Description

Background

On Special:CheckUser, it is possible to search for all users and actions of a given IP address or range. It would be helpful to be able to filter out temporary accounts from these results, for cases when the checkuser is checking for regular accounts.

Specification

Add a filter form to the results page in Special:CheckUser:

image.png (1×2 px, 100 KB)

Acceptance criteria
  • A checkbox is added to the search results on Special:CheckUser to filter out temporary accounts from the results, when checking (1) which users have used an IP address/range and (2) which actions have been performed from the range
  • The form is collapsible
  • Submitting the form does not cause a new log to be made (as the new search will return a subset of the already-logged search)
  • The checkbox is unchecked by default

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

when checking which users have used an IP address/range

Does this mean just the 'Get users' check type, or also 'Get actions'?

I would also recommend not putting this checkbox in the search form, but instead place it somewhere in the results:

  • Each modification of the parameters in the search form results in a new cu_log entry
  • Therefore, a CU wanting to filter out and then filter in temporary accounts would be generating multiple cu_log table entries

I guess it should be possible for checking users and checking actions.

If the logging problem is considered prohibitive, then we can add the checkbox to the results, perhaps something like:

image.png (657×962 px, 50 KB)

(Please overlook the styling of this crude HTML copy-paste-modify...)

I have also been thinking in no-temp-accounts land that it is very tiring to work past all IP contributions sometimes.

There is at least one problem with a naive solution here and it's that (attempted?) logins show up as the IP and not the user.

I agree with DJ about where it should be located. I don't want to need to run a separate check to see a different view of the data for an IP/range. I am not sure the best way to do that, since the 5k edits per page is painful to do anything with Javascript with on busy ranges (I have a few that load on Special:CU, as well as the in-core table generation which really honestly should probably not be in JS itself, and it can be up to a half minute before interactive in those cases). But I suppose this option wouldn't be turned on by default ever....

I agree with DJ about where it should be located. I don't want to need to run a separate check to see a different view of the data for an IP/range. I am not sure the best way to do that, since the 5k edits per page is painful to do anything with Javascript with on busy ranges (I have a few that load on Special:CU, as well as the in-core table generation which really honestly should probably not be in JS itself, and it can be up to a half minute before interactive in those cases). But I suppose this option wouldn't be turned on by default ever....

I had been thinking that we'd execute a new query when the option to filter temp accounts is submitted, just without a new log.

We do have some code to avoid a new log entry when paging that could be extended for this use case. It uses the same system that Special:Investigate does (which is a JWT token to ensure that no other parameters but those can be modified without creating a new log entry are modified)

@KColeman-WMF @Niharika Does the flow in T404979#11194251 look OK?

I agree the flow looks good to me! I'd suggest we use similar filter styling to special:Investigate:

image.png (1×2 px, 100 KB)

Special:Investigate also has a duration filer, but I don't know if that's needed in this case?

image.png (652×1 px, 63 KB)

Thanks @Niharika and @KColeman-WMF - I think a duration filter would go beyond the scope of this task. I'll add that this form should be collapsible, as suggested by @Dreamy_Jazz

Tchanders changed the point value for this task from 0.5 to 1.5.Sep 22 2025, 11:36 AM

Special:Investigate also has a duration filer, but I don't know if that's needed in this case?

Special:CheckUser does have a duration filter in the main search form, though changing the selected option AFAIK will cause another log entry

@KColeman-WMF should the filters be collapsed by default? We can either have it open by default or collapsed by default.

Here are some screenshots of what open / collapsed looks like for reference:

image.png (492×967 px, 15 KB)

image.png (741×980 px, 42 KB)

Special:Investigate also has a duration filer, but I don't know if that's needed in this case?

Special:CheckUser does have a duration filter in the main search form, though changing the selected option AFAIK will cause another log entry

(I pause to wonder if literally anyone has ever used it.)

Special:Investigate also has a duration filer, but I don't know if that's needed in this case?

Special:CheckUser does have a duration filter in the main search form, though changing the selected option AFAIK will cause another log entry

(I pause to wonder if literally anyone has ever used it.)

I have with my volunteer hat on, but I think only ever to see what the feature did 😄

@KColeman-WMF should the filters be collapsed by default? We can either have it open by default or collapsed by default.

Here are some screenshots of what open / collapsed looks like for reference:

image.png (492×967 px, 15 KB)

image.png (741×980 px, 42 KB)

I'm tempted to follow the Special:Investigate pattern, which has filters collapsed as default. Do you have a preference for collapsed or open by default? I'm not sure how frequently this filter will be used.

@KColeman-WMF should the filters be collapsed by default? We can either have it open by default or collapsed by default.

Here are some screenshots of what open / collapsed looks like for reference:

image.png (492×967 px, 15 KB)

image.png (741×980 px, 42 KB)

I'm tempted to follow the Special:Investigate pattern, which has filters collapsed as default. Do you have a preference for collapsed or open by default? I'm not sure how frequently this filter will be used.

I think collapsed by default would be best. I'll go with that, thanks

Change #1190694 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [WIP] Add temporary account filter to Special:CheckUser

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

Change #1190784 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Add PHPUnit tests for CheckUserPagerNavigationBuilder

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

But I suppose this option wouldn't be turned on by default ever....

I think this would be the case for a default for all CUs, but the following could be considered:

  • A userscript could be built that sets the filter before the search form is submitted (it might be a bit hacky, but is a way around it)
  • If this is something that we think would have enough requests for, then we could add a preference that allows a CU to control if they want the filter to be enabled by default

Change #1190996 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Expand SpecialCheckUserTest

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

Dreamy_Jazz changed the task status from In Progress to Open.Sep 24 2025, 11:29 AM

Change #1190784 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add PHPUnit tests for CheckUserPagerNavigationBuilder

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

Change #1190996 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Expand SpecialCheckUserTest

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

Change #1190694 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add temporary account filter to Special:CheckUser

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

  • If this is something that we think would have enough requests for, then we could add a preference that allows a CU to control if they want the filter to be enabled by default

Let's see if we get these requests, and do this under a new task if so.

I have also been thinking in no-temp-accounts land that it is very tiring to work past all IP contributions sometimes.

Hey turns out we have some ancient similar tasks for this one, since people are poking at similar:

T26231: Allow CheckUsers to filter checks for account creations only
T26232: Allow CheckUsers to filter results to new accounts only