Page MenuHomePhabricator

[cswiki betalabs] Structured tasks do not load editing surface
Closed, ResolvedPublic

Description

image-recommendation and section-image-recommendation structured tasks on cswiki beta do not load editing surface. Also, the intro tours, the Help panel and the post-edit dialog are not present.

Below is the review of the state of Growth features in beta test environment.

  • different users (with Newcomer Editor features enabled in User Preferences)
  • browsers Chrome and FF
  • Special:CommunityConfiguration has the structured tasks enabled
TestWorks on cswiki beta`?Works on enwiki beta?
Intro toursfixed NOT presentworks as usual
link-recommendationfixed the editing surface is not loadedworks as usual
image-recommendationfixed the editing surface is not loadedN/A
section-image-recommendationfixed the editing surface is not loadedN/A
non-structured suggested taskfixed No Help panel/no post-edit dialog; the proper Tags are addedworks as usual

Event Timeline

I looked into this. In console:

> mw.config.get('wgGESuggestedEditData')
{error: 'No recommendation found for page: Islám_v_Bhútánu'}

Beta loads its recommendations from two places:

  • the existence of a recommendation from the beta search index (see search query),
  • the details about a recommendation from the corresponding production wiki (action=query&prop=growthimagesuggestiondata)

As such, seeing the "No recommendation found for page" means the cswiki beta search index and the production set of articles with a recommendation got out of sync. This can be fixed by manually removing the recommendation tag from the search index and re-adding it for ~200 production pages that has this recommendation.

So far, this is a "beta being beta" kind of issue, the recommendations are provided in a completely different way in production, which continues to work. However...

...I could swear there used to be a visible "No recommendation found" for this error scenario... Or maybe that was for Add Link only? Assuming my memory serves right, then we have an actual bug (that would probably appear in production too, under the right circumstances), and that we should probably fix separately to this.

Okay, the lack of image suggestions was a red herring, as the issue is reproducible with links as well, not only images. For links, wgGESuggestedEditData includes suggestion data just fine, so missing error message doesn't explain the behaviour in full. Furthermore, there also are Add Image tasks that do have suggestion data attached. So, onto a different theory.

I noticed cswiki beta does not load the necessary RL modules that are responsible for the Suggested Edits experience. For example:

> mw.loader.getState('ext.growthExperiments.StructuredTask.desktop')
'registered'
> mw.loader.getState('ext.growthExperiments.StructuredTask.PreEdit')
'registered'
>

This means those modules were not loaded (otherwise they'd be in the ready state) and as such, the code responsible for the edit experience did not have a chance to run. Those modules are loaded from the Help Panel feature, which uses the ext.growthExperiments.HelpPanel RL module, which is not loaded as well.

From there, I wanted to understand why is the Help Panel module not loaded. I tried to edit a random page (outside of the Structured Edit experience), and Help Panel was not present. I ensured I have Help Panel enabled in my preferences (although selecting a structured task should load Help Panel even if disabled).

It turns out @Etonkovidova previously changed Community Configuration at cswiki beta to disable Help Panel in the Main namespace. Unfortunately, this restriction is respected even when user selects a Structured Task in their Homepage (in other words: disabling Help Panel in the main namespace also breaks Structured Edits in this way). Given Structured Edits can be disabled independently on this, we should probably not respect this Community Configuration option in this scenario.

I reverted that change. After that, the editing experience works normally again. It is not possible to select an Add Image task, because those are unavailable (for now). However, as explained above, this is not in the scope of this task. On the plus side, the error message I was recalling in my prior comment appears!

I filled T377862 to fix this edge case in a long term way. Thanks @Etonkovidova for making us notice this problem!

...I could swear there used to be a visible "No recommendation found" for this error scenario... Or maybe that was for Add Link only? Assuming my memory serves right, then we have an actual bug (that would probably appear in production too, under the right circumstances), and that we should probably fix separately to this.

You're right - the message "No recommendation found" was (and is) for all structured tasks. Actually, I saw the message on testwiki wmf.28 (although is a distorted form):

IMG_5887.PNG (1×828 px, 168 KB)

I don't suspect., so far, that something is not right with the message; will keep an eye on it.

It turns out @Etonkovidova previously changed Community Configuration at cswiki beta to disable Help Panel in the Main namespace. Unfortunately, this restriction is respected even when user selects a Structured Task in their Homepage (in other words: disabling Help Panel in the main namespace also breaks Structured Edits in this way). Given Structured Edits can be disabled independently on this, we should probably not respect this Community Configuration option in this scenario.

I reverted that change. After that, the editing experience works normally again. It is not possible to select an Add Image task, because those are unavailable (for now). However, as explained above, this is not in the scope of this task. On the plus side, the error message I was recalling in my prior comment appears!

Argh - I should've checked Community Configuration Help panel settings :), sorry.

Re-checked on cswiki betalabs - all looks good. Updated the task description and closed the task as Resolved.