Page MenuHomePhabricator

Implement system to convert client hint data to a string representation
Closed, ResolvedPublic

Description

Client hint data shown in the results may need to be a concatenated string in some situations. Being able to determine what is and isn't useful in this string representation is likely to require some thought. Furthermore, Special:Investigate and Special:CheckUser could be both making use of this string format.

A system could be implemented that parses the client hint data and converts it to a useful but compact representation. What this string representation should contain could vary for each usage, so this system should be easily configurable.

A need for a string representation that gives enough entropy but also be compact to make the result lines too large has been detailed in T340993.

Acceptance criteria
  • Create a service that allows conversion of ClientHintsData objects to a human-readable string form that is configurable using site configuration and the results of which can easily be used.

Event Timeline

Dreamy_Jazz renamed this task from Implement system to compact client hint data to a string representation to Implement system to convert client hint data to a string representation.Jul 3 2023, 2:51 PM
Dreamy_Jazz created this task.

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

[mediawiki/extensions/CheckUser@master] [Very WIP] Add UserAgentClientHintsFormatter

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

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

[operations/mediawiki-config@master] clienthints: Pin wgCheckUserDisplayClientHints to false

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

Change 957366 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] clienthints: Add UserAgentClientHintsFormatter

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

This is similar to T341932: Create service to return Client Hints data from the database where I would suggest that QA is skipped for this patch as there isn't an easy way to test that it worked using the wiki interface until other tasks are ready for QA. If QA is skipped, this will be indirectly tested through other subtasks of T337942 (such as T340991, T340993, etc.).