Page MenuHomePhabricator

"Refresh suggestions" is not showing a different new set of suggestions
Closed, ResolvedPublic

Description

When checking the Section Translation dashboard the articles shown in the suggestions list are the same no matter how many times I tap on "refresh".

As displayed in the short screencast below, 3 page suggestions and no section suggestions are initially shown. The issue about the section suggestions is being tracked in T296510.

Regarding page suggestions, the first time the user clicks on the refresh button, they seem to be refreshed (with the loading indicator being shown) but the same 3 suggestions as shown. If the user clicks on the refresh button again, nothing happens as if the refresh button was disabled.

Screen Recording 2021-11-29 at 12.45.43 PM.gif (820×388 px, 3 MB)

Following some investigation, it seems that there are two different problems that cause this issue. The first is that suggestion seeds are not properly fetched, and this is the reason why the same articles are being fetched when user clicks the refresh button for the first time. This issue is being fixed in T296510.

The second issue is that there exists a bug inside suggestion fetching logic that prevents the current page suggestions slice index from being properly increased. This issue "disables" the refresh button after the first click and should be fixed in this ticket.

Event Timeline

ngkountas updated the task description. (Show Details)
ngkountas updated the task description. (Show Details)

Change 742435 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX useSuggestions: Fix typo in nextPageSuggestionsSliceIndex variable

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

Change 742435 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX useSuggestions: Fix index in nextPageSuggestionsSliceIndex variable

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

In general the issue seems solved, but it still seems to happen when the user gets back to the dashboard after closing the confirmation step. This can be covered on a separate follow-up ticket.