Page MenuHomePhabricator

Regression: AMC Outreach campaign is not showing when mobile users click desktop link
Open, MediumPublic3 Estimated Story Points

Description

New regression in wmf.5. This will likely trigger error logging tomorrow.

If you are logged in and click the desktop link we showed a AMC drawer like so (note that the "No thanks" and enabled button are pressed together - likely a longstanding issue from our move to Codex). We didn't catch this in development as it's hard to test this workflow and we don't have any tests covering it.

Screenshot 2023-11-15 at 5.00.52 PM.png (508×966 px, 75 KB)

This is no longer working on group 1 wikis (flagged by error reporting)
This looks related to the work we did to restrict our unstable APIs from gadgets/extensions.

We should either remove this feature, or fix it.

TODO

  • Fix the immediate issue
  • Add some tests for catching regressions to this component in future since it is hard to test. [done in https://github.com/wikimedia/pixel/pull/224]
  • ICorrect the design. It should be possible to scroll the entire drawer. It shouldn't be clipped at the bottom. The button and "no thanks:" should be visually separated.

Developer notes

The following is needed for testing:

$wgMFAmcOutreachMinEditCount = 0;
$wgMFAmcOutreach = true;

Production error

Error: TypeError: Cannot read properties of undefined (reading 'loadCampaign')

t HTMLAnchorElement.amcDesktopClickHandler  https://m.mediawiki.org/w/load.php?lang=en&modules=skins.minerva.scripts&skin=minerva&version=sffel:42:689
at HTMLAnchorElement.dispatch  https://m.mediawiki.org/w/load.php?lang=en&modules=ext.discussionTools.init%7Cjquery%2Coojs-ui-core&skin=minerva&version=1oirs:376:932
at elemData.handle  https://m.mediawiki.org/w/load.php?lang=en&modules=ext.discussionTools.init%7Cjquery%2Coojs-ui-core&skin=minerva&version=1oirs:373:565

QA steps

NOTE: For production a minimum edit account of 100 is needed. Please attempt in an incognito window.
  • Login and make sure AMC is disabled
  • Click desktop link in footer at bottom of page
  • Expected: the drawer should show.

Click the button

  • Expected: you should get AMC mode and stay in mobile site

QA Results - Prod

ACStatusDetails
1T351362#9343005

Event Timeline

ovasileva set the point value for this task to 3.Nov 16 2023, 6:26 PM

Looks like we've had an increase in errors since deploying the train today

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

[mediawiki/extensions/MobileFrontend@master] Fixes AMC outreach drawer

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

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

[operations/mediawiki-config@master] Disable drawer temporarily while erroring

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

@jeena could we backport https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/975097 as a temporary fix? It will disable the error and give us some time to fix the problem.

Change 975097 merged by jenkins-bot:

[operations/mediawiki-config@master] Disable drawer temporarily while erroring

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

Mentioned in SAL (#wikimedia-operations) [2023-11-16T23:28:43Z] <samtar@deploy2002> Started scap: Backport for [[gerrit:975097|Disable drawer temporarily while erroring (T351362)]]

Mentioned in SAL (#wikimedia-operations) [2023-11-16T23:29:59Z] <samtar@deploy2002> jdlrobson and samtar: Backport for [[gerrit:975097|Disable drawer temporarily while erroring (T351362)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Change 975096 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Fixes AMC outreach drawer

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

Change 975037 had a related patch set uploaded (by Mabualruz; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@wmf/1.42.0-wmf.5] Fixes AMC outreach drawer

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

Change 975037 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@wmf/1.42.0-wmf.5] Fixes AMC outreach drawer

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

Mentioned in SAL (#wikimedia-operations) [2023-11-17T11:28:36Z] <mabualruz@deploy2002> Started scap: Backport for [[gerrit:975037|Fixes AMC outreach drawer (T351362)]]

Mentioned in SAL (#wikimedia-operations) [2023-11-17T11:29:55Z] <mabualruz@deploy2002> mabualruz: Backport for [[gerrit:975037|Fixes AMC outreach drawer (T351362)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-11-17T11:36:08Z] <mabualruz@deploy2002> Finished scap: Backport for [[gerrit:975037|Fixes AMC outreach drawer (T351362)]] (duration: 07m 32s)

Jdlrobson lowered the priority of this task from High to Medium.Nov 17 2023, 3:57 PM
Jdlrobson updated the task description. (Show Details)

Dropping to medium now the drawer is showing again. There is remaining work to do here to fix the design.

Jdlrobson updated the task description. (Show Details)
Edtadros subscribed.

Test Result - Prod

Status: ❌ FAIL
Environment: enwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

Login and make sure AMC is disabled
Click desktop link in footer at bottom of page
❌ AC1: Expected: the drawer should show.
I cannot get the drawer to appear, before I kick this back to "needs more work" I'm curious if there is a setting or step I'm missing.

screenshot 126.mov.gif (898×1 px, 1 MB)

Edtadros updated the task description. (Show Details)

Test Result - Prod

Status: ❌ FAIL
Environment: enwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

Login and make sure AMC is disabled
Click desktop link in footer at bottom of page
❌ AC1: Expected: the drawer should show.
I cannot get the drawer to appear, before I kick this back to "needs more work" I'm curious if there is a setting or step I'm missing.

screenshot 126.mov.gif (898×1 px, 1 MB)

@Edtadros - were you logged-in during testing? Just tried it and I did get the toast to show, however the button to turn on advanced mode wasn't working.

I updated QA steps (also note this might not be fixed yet - we've only backported the code needed to stop the error).