Endlessly discussed and griped about but apparently there's no task.
This system is carelessly leaving behind a trail of maintenance overhead. With new issues popping up all the time. Here's a quick sample just from MediaWiki core (quick Resources.php search for "target" and "mobile").
### Fixups
* {c2d117b}
* {a4fcb59}
* {69d779c}
* {50f46c6}
* {007acdc}
* {4726a30}
* {2947ba0}
* {e089718}
* {ecc5f63}
* {21ec580}
* {0172428}
* {81c11be}
* {de0c7cb}
* {fce27ff}
* {67c1308}
* {945eabb7}
* {e81b4e4}
* {b41781f}
* {639cecb}
* ...
### Issues
* {T66512} – {80f1f08}
* {T67823} – {9cf7b5f}
* {T78069} – {96180a4}
* {T93262} – {f6bda94}
* {T104940} – {9259263}
* {T108191} – {0dadc39}
* {T63861} – {848eabe}
* {T126935} – {46cabd4}
* …
* {T284367}
= Plan
Right now, the problem is that many extensions rely on using OutputPage::addModule inside hooks to add code. There is no way for mobile or a skin to override these decisions. However, many JavaScript modules assume a certain skin and would break if loaded in the wrong skin.
Existing violations can be determined by using X-Wikimedia-Debug and scanning the logs for the query "message:"not loadable on target"
e.g. https://logstash.wikimedia.org/app/kibana#/dashboard/x-debug?_g=h@7bf0c26&_a=h@f3073fc
== Prep work
[] Many modules in MobileFrontend set "targets": "mobile". This is a shortcut to making sure code only loads in mobile. A module should either by desktop+mobile or desktop going forward. Fix all violations that set only mobile. The important thing to fix is "where" and how the code gets loaded. Where code needs to only load on mobile it should make use of MobileContext.
[] Error when a module is loaded without the 'desktop' target.
[] We need a mechanism for extensions to load modules in such a way that a skin can disable them (or use a different module in its place). One way might be to move all module registrations to Skin::getDefaultModules and preventing access to addModules and addModuleStyles. This would allow the skin the final say in what modules get added to the page. Is that something that's plausible?
[] Certain modules like gadgets and mobile.site are kept out of mobile by the targets system
[] We'll mark any deprecated modules that are not mobile friendly as 'deprecated' e.g. jquery.ui - while it will be possible to load these on mobile, we'll make sure these are not on the critical path of non-special page views.
== Deprecating 'targets' system
[] Move all modules to the new system for module registration.
[] target mode `desktop` will be used on special pages going forward. This should remove many of the special page related violations.
[] When the logs are running clean, we'll turn off the targets system - all modules will be 'mobile'+'desktop' by default.