Page MenuHomePhabricator

Remove beta code from MobileFrontend
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

In 2019 we disabled the mobile beta (T237290)
Since then we have been maintaining a large amount of code (1000+ lines) that impacts user performance for no good reason.

The beta mode has not been used for 6 years, so restoring it at this point would come with considerable risk.
We should be responsible and remove all this code.

You can enable the beta mode locally with

$wgMFEnableBeta = true;
$wgMFBetaFeedbackLink = true;

Do this before working on this ticket!!

User story

  • As a developer I don't want to maintain unused code
  • As a user I don't want to download unnecessary code.

Requirements

  • set up meeting with Jon to walk through
  • The beta mode option and feedback option is removed from includes/specials/SpecialMobileOptions.php. Make sure you can see it before working on the changes needed to remove it!
  • The $wgMFEnableBeta and MFBetaFeedbackLink feature flag is removed from extension.json and README is updated.
  • Minerva skin repo is updated to remove the reference to MFEnableBeta
  • All feature flag configuration in extension.json which features "beta": true is updated to not include it. For context feature flags in MobileFrontend express a mode and then whether the feature is enabled so once beta is removed these are inactive and doing nothing.
  • includes/Features/BetaUserMode.php is removed
  • The method MobileContext::isBetaGroupMember is removed
  • Any code checking isBetaGroupMember to be truthy is eliminated.
  • $vars['wgMFMode'] should be set to 'stable' unconditionally. This is how many extensions detect if the mobile site is running so must be kept intact. See {T299772#11126078} for more information.

BDD

  • For QA engineer to fill out

Test Steps

  • For QA engineer to fill out

Design

  • Add mockups and design requirements

Acceptance criteria

  • Add acceptance criteria

Communication criteria - does this need an announcement or discussion?

  • Add communication criteria

Rollback plan

  • What is the rollback plan in production for this task if something goes wrong?

This task was created by Version 1.2.0 of the Web team task template using phabulous

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change #1116844 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] [WIP][POC] Remove AMC Outreach drawer

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

Jdlrobson-WMF renamed this task from Remove AMC Outreach code and beta code to Remove AMC Outreach and beta code.Feb 3 2025, 5:43 PM
Jdlrobson-WMF updated the task description. (Show Details)
Jdlrobson-WMF changed the task status from Open to In Progress.Feb 3 2025, 7:43 PM
Jdlrobson-WMF set the point value for this task to 3.Feb 7 2025, 11:53 PM

Change #1116844 abandoned by Jdlrobson:

[mediawiki/extensions/MobileFrontend@master] [WIP][POC] Remove AMC Outreach drawer

Reason:

just a poc for now.

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

Jdlrobson-WMF changed the task status from In Progress to Open.Feb 19 2025, 12:23 AM

(proposing if time as this caused some confusion in our donation work)

@Jdlrobson-WMF - wonder why this is high priority. Could you add some context?

ovasileva lowered the priority of this task from High to Medium.Mar 19 2025, 5:52 PM

Change #1149713 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/QuickSurveys@master] Remove use of MFMode since beta is inactive

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

Change #1149713 abandoned by Jdlrobson:

[mediawiki/extensions/QuickSurveys@master] Remove use of MFMode since beta is inactive

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

Hey @Jdlrobson, the Reader Growth engineers are willing to work on this but most of us don't have much context about AMC, what exactly needs to be removed, etc.

Could you update the task description with a little more information (what needs to be removed exactly, where does it live, etc) suitable for those with little-to-no prior knowledge of MobileFrontend and AMC? Then we can estimate this and pick it up in a future sprint.

Hey @egardner will respond either tomorrow or Monday.

Change #1116844 restored by Jdlrobson:

[mediawiki/extensions/MobileFrontend@master] [WIP][POC] Remove AMC Outreach drawer

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

Jdlrobson-WMF renamed this task from Remove AMC Outreach and beta code to Remove beta code from MobileFrontend.Aug 21 2025, 12:08 AM
Jdlrobson-WMF updated the task description. (Show Details)
Jdlrobson-WMF removed the point value 3 for this task.

@egardner done. I split this out into two tickets the other being T402470: Remove AMC Outreach code from Mobile. I suspect this one is the smaller of the two and worth doing first as an introduction to MobileFrontend. I'm happy to pair with whoever wants to work on this.

HSwan-WMF set the point value for this task to 5.

@Jdlrobson-WMF If I understand correctly, the optin cookie serves only to enable the "Beta" mode (as distinct from the default "stable" mode). Is that correct?

If so, does that mean it is essentially unused in production?

Right now, there is hardcoded references to the optin cookie in the Varnish configuration (T228861), however this has no Varnish unit tests, and I could find no documentation for how to enalbe ot test this in production, nor the Beta Cluster. It is only mobile-related piece of Varnish configuration that remains untested, so if it isn't needed, I'd like to help remove it from the Varnish and MobileFrontend code, so that there is no uncertainty or risk over what it may do. In particular, because it is as of now undefined what that code might do with Unified mobile routing if it were activated from the MediaWiki side.

Can I help with code review?

Jdlrobson-WMF raised the priority of this task from Medium to High.Sep 25 2025, 10:01 AM
Jdlrobson-WMF added a subscriber: HSwan-WMF.

@Krinkle yes all this code can be removed and having an extra reviewer would be great (the Readers Growth team highlighted this ticket as a pairing opportunity to onboard with the codebase). @HSwan-WMF @egardner perhaps you could plan to include this ticket for the sprint you are kicking off on the 30th given it reduces risk of mobile domain sunset?

egardner lowered the priority of this task from High to Medium.Oct 9 2025, 5:15 PM

Change #1197352 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/skins/MinervaNeue@master] MobileFrontend Beta Removal Adjustment

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

Change #1197730 had a related patch set uploaded (by Krinkle; author: Krinkle):

[operations/puppet@production] varnish: Remove unreachable optin=beta code

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

Change #1149713 restored by Jdlrobson:

[mediawiki/extensions/QuickSurveys@master] Remove use of MFMode since beta is inactive

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

Change #1197352 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] MobileFrontend Beta Removal Adjustment

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

Change #1197734 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/extensions/MobileFrontend@master] [WIP] MobileFrontend Beta Deprecation

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

Change #1198175 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] Stop varying on beta cookie

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

Change #1197730 merged by BCornwall:

[operations/puppet@production] varnish: Remove unreachable optin=beta code

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

Change #1198588 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/extensions/MobileFrontend@master] MobileFrontend Beta Deprecation

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

Change #1198588 abandoned by Kimberly Sarabia:

[mediawiki/extensions/MobileFrontend@master] MobileFrontend Beta Deprecation

Reason:

[DUPLICATE] accidental push

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

Change #1198175 abandoned by Jdlrobson:

[mediawiki/extensions/MobileFrontend@master] Stop varying on beta cookie

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

Change #1149713 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@master] Remove use of MFMode since beta is inactive

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

Jdlrobson-WMF removed KSarabia-WMF as the assignee of this task.EditedOct 28 2025, 3:57 PM
Jdlrobson-WMF added a subscriber: KSarabia-WMF.

The majority of this is now done. As discussed with Kim on Gerrit the following work should be covered by a follow up task to clean up the remaining piece, which is:

  • Update mobile.special.mobileoptions.scripts.js to rewrite infuseToggles to infuseToggle since only one toggle is now infused.

I've captured in T407654: Cleanup and simplify redundant code in MobileFrontend

Change #1197734 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] MobileFrontend Beta Deprecation

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

Jdlrobson-WMF updated the task description. (Show Details)

Change #1116844 abandoned by Jdlrobson:

[mediawiki/extensions/MobileFrontend@master] [WIP][POC] Remove AMC Outreach drawer

Reason:

Done in https://phabricator.wikimedia.org/T402470

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