The CheckUser interface currently surfaces user agents when listing users or edits, but there's no way to search by user agent. It would be nice if you could click on a listed user agent and it would then show you all users or edits performed by that user agent/IP combination.
This may be an expensive query, so we may have to introduce a new database column with hashed user agents that could be used as an index. This would preclude us from being able to do wildcard or prefix searches, however, (for example with a text field) but in almost all cases, the user will want to search for a specific user agent anyway, so I think that's a decent trade-off.
We will need to add one or more indexes to the table for this.
The user agent search will only be performed as a combined search for user agent and IP address. (If you just searched for user agent on its own, a common user agent would return too many results to be meaningful.)
There will be a second text field under the existing IP/username field that only appears when you click on a user agent link or a user agent is specified in the query string.
Description of the workflow, Get users:
- User pastes IP address into "IP/username" field, chooses Get users
- Results list has usernames, IP address and user agents. All three are links. User clicks on one of the user agent links.
- On refresh, there is an "IP/username" field with the IP address filled in, and a second "user agent" field with the user agent filled in.
- User can now search again for Get edits or Get users, and the results will only show this IP and user agent combination.
- User can also blank the "user agent" field, if they don't want to use it anymore.
- Alternatively, user can change the IP to a different IP or a CIDR range.
- Note: The "IP/username" field allows for ranges. We should do the same for the "user agent" field, if possible.
Description of the workflow, Get edits:
- User pastes IP address or username into "IP/username" field, chooses Get edits
- Results list has log entries, with IP and user agent listed under each entry. IP and user agent are both links. User clicks on user agent link.
- On refresh, there is an "IP/username" field with the IP address filled in, and a second "user agent" field with the user agent filled in.
Wireframes: