Page MenuHomePhabricator

[ReadingLists] mobile apps Saved items will be displayed twice in Reading lists
Closed, ResolvedPublic3 Estimated Story Points

Description

Tested on testwiki wmf.17 and mobile app (on iPhone). Seems to be iPhone specific

Steps:

  1. As a logged-in user on mobile app, create a list, e.g. as in the screenshots below, the reading list "Cosmology" was created.
  2. On mobile app add one article to the "Cosmology" list - e.g. "Max Tegmark" article is added to the "Cosmology" list

On the app "Max Tegmark" article is added to the Saved list "Cosmology" and will be displayed in "Cosmology" and in All articles:

IMG_7906.PNG (1×828 px, 163 KB)
IMG_7908.PNG (1×828 px, 164 KB)
  1. Go to the test wiki Reading list as a user who just added "Max Tegmark" article to the "Cosmology" reading list on app.

What happened:

  • "Max Tegmark" article will be displayed twice:

Screenshot 2026-02-26 at 11.36.56 AM.png (816×3 px, 272 KB)

Screenshot 2026-02-26 at 3.30.46 PM.png (1×2 px, 1 MB)

  • All articles and Cosmology reading lists on mobile app were synced resulting in displaying the same article twice.

Event Timeline

@HFan-WMF @Sneha If a mobile apps user has a page (e.g. Max Tegmark) in a custom list and the "default" list , or in 2 different custom lists, do we want to deduplicate these and show "Max Tegmark" only once on the "all articles" view on Special:ReadingLists?

aude triaged this task as High priority.Mar 9 2026, 4:38 PM

The ios app appears to add custom reading list entries to both the custom list and default reading list, hence we see it twice on the special page. The android app does not appear to do this.

https://github.com/wikimedia/wikipedia-ios/blob/main/Wikipedia/Code/ReadingListsController.swift#L370-L373

Also, a user can add a particular page to multiple custom lists and don't think we should restrict users from doing this.

@aude Yes, an article should only show once in all items even if its added to multiple lists including default.

When we work on custom list we will have to figure out the best approach that is consistent between web, android app, and iOS app but will require cross team discussion

Aklapper renamed this task from [ReadingLists] mobile apps Saved items wil be displayed twice in Reading lists to [ReadingLists] mobile apps Saved items will be displayed twice in Reading lists.Mar 9 2026, 8:28 PM
aude set the point value for this task to 3.Mar 10 2026, 1:46 PM

For this, I think we can handle deduplication via the database query in ReadingListRepository::getAllListEntries(), which could have a $duplicate option.

Change #1251170 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/ReadingLists@master] Deduplicate reading list entries in ReadingListRepository::getAllListEntries

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

Change #1251170 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Deduplicate reading list entries in ReadingListRepository::getAllListEntries

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

Checked testwiki wmf. 22 - the issue is fixed.
Test scenarios that were checked (besides the steps in the task description) on both Android and iOS:
(1) an article is added to the app default Saved list and later to existing multiple lists

(2) an article is added to a newly created list and then to multiple existing lists

(3) an article in Saved lists was moved to different existing lists (Android specific; iOS app allows to add to another reading list, not move)