It is suggested that we move all setMobileBetaMode, isBetaGroupMember, and beta/stable constants from MobileContext into new class, something like MobileUserOptions, or MobileUserMode and keep all logic (reading/writing user options/cookies etc) there. It will be easier to maintain/rewrite this feature, plus if we decide to handle anons, the only place where changes will be required are Special::MobileOptions (for render and submit logic) and that new class. See related T144085 and T143189.
= Outcomes
[] What is needed to move setMobileBetaMode, isBetaGroupMember, and beta/stable constants are moved to a new file or replace them with something unrelated to MobileContext?
[] What tests are missing?
[] How do we deal withNote isBetaGroupMember is a public API - there are 2 known usages outside MobileFrontend - UniversalLanguageSelector and Minerva - https://github.com/search?q=org%3Awikimedia+isBetaGroupMember&type=Code - … we do modify the public API we will need to follow [[ https://www.mediawiki.org/wiki/Deprecation_policy | the official MediaWiki deprecation policy ]].
[] Are there things we should do before taking this on? (We might want to hold off doing this in lieu of a discussed and agreed refactoring plan for MobileContext (see epic))