Page MenuHomePhabricator

Yellow talk page message banner appearing inconsistently on edit page
Closed, ResolvedPublic

Description

Steps to reproduce

  1. In incognito mode, make an edit on desktop site
  2. As logged in user edit https://en.wikipedia.org/w/index.php?title=User_talk:<ip>
  3. Switch to mobile in incognito window and open editor

Expected:

  • Edit notice appears

Observed:

  • Edit notice does not appear or appears inconsistently

Note: some initial debugging done in T284642: Add yellow talk page message banner to non-main namespace pages on mobile

QA Results - Beta

ACStatusDetails
1T295910#7609013

Event Timeline

Quiddity subscribed.

If I understand correctly, the User-notice tag was not intended to be replicated here (it was just copied whilst creating the subtask), so I'm removing it.
If I'm mistaken, please re-add it, and let us know what you want the Tech News entry to say! Thanks.

Context for what's happening here: https://phabricator.wikimedia.org/T284642#7500475

As part of analysis we should see how the session cookie is set on desktop and make sure it is also set in the mobile editor.

Tagging editing team as perhaps they have some ideas.

On desktop it's set via SubmitAction (called on save or preview). On mobile you'll probably have to set it via an AJAX call. A very ugly hack would be to call the login API, or Special:UserLogin, which always starts a session. A better way would be to just create a new dedicated API endpoint that creates a session, or have the appropriate edit APIs replicate the behavior of SubmitAction.

There's a performance tradeoff (having a session means all requests pass through the edge caches and are served from the main DC) so the ideal solution would be to display the notice via a separate API call which has its own caching semantics. But that looks like a very complicated change (it's a bit alongside the lines of T140664: Achieve predictable MediaWiki routing and cacheable skin data) and IP masking will uproot (possibly obsolete) anon messaging anyway so hardly worth trying now.

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

[mediawiki/core@master] Edits via API should set cookie for anons

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

Above patch should fix this, but it's not clear to me who maintains ApiEditPage. Would that be the editing team?

From Gerrit "All in all, I thing this is good to merge; I'll leave it around for a week or so in case others want to comment. Also adding someone from Platform, just for the FYI."
Have tagged platform engineering on this ticket.

Marked as a risky patch, just in case: T293957#7578985

Change 745334 merged by jenkins-bot:

[mediawiki/core@master] Edits via API should set cookie for anons

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

For QA, please test the wikitext editor as well as the visual editor, as they use different APIs internally. (The change should work for both of them.)

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

In incognito mode, make an edit on desktop site
As logged in user edit https://en.wikipedia.org/w/index.php?title=User_talk:<ip>
Switch to mobile in incognito window and open editor
✅ AC1: Edit notice appears

Wikitext:

Screen Shot 2022-01-10 at 6.00.49 AM.png (929×430 px, 52 KB)

Visual Editor:

Screen Shot 2022-01-10 at 6.03.49 AM.png (928×430 px, 42 KB)

Test Result - Prod

Status: ❓ Need more info
Environment: testwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

In incognito mode, make an edit on desktop site
As logged in user edit https://en.wikipedia.org/w/index.php?title=User_talk:<ip>
Switch to mobile in incognito window and open editor
✅ AC1: Edit notice appears

Wikitext:

Screen Shot 2022-01-13 at 2.57.33 PM.png (880×429 px, 47 KB)

Visual Editor:

Screen Shot 2022-01-13 at 2.58.17 PM.png (928×429 px, 43 KB)

@ovasileva , the message notification ends up under the VE Toolbar. IF the test is whether it appears then this passes, but the location of the message under the toolbar should be addressed separately. If the consistency is not just that it shows up, but that it shows up in the right place, then this is a fail. This occurred in Beta as well, but somehow I let it go.

Test Result - Prod

Status: ❓ Need more info
Environment: testwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

In incognito mode, make an edit on desktop site
As logged in user edit https://en.wikipedia.org/w/index.php?title=User_talk:<ip>
Switch to mobile in incognito window and open editor
✅ AC1: Edit notice appears

Wikitext:

Screen Shot 2022-01-13 at 2.57.33 PM.png (880×429 px, 47 KB)

Visual Editor:

Screen Shot 2022-01-13 at 2.58.17 PM.png (928×429 px, 43 KB)

@ovasileva , the message notification ends up under the VE Toolbar. IF the test is whether it appears then this passes, but the location of the message under the toolbar should be addressed separately. If the consistency is not just that it shows up, but that it shows up in the right place, then this is a fail. This occurred in Beta as well, but somehow I let it go.

@Edtadros - this is okay - thank you for double-checking! Resolving this one.