Page MenuHomePhabricator

[Reading Lists] Create hidden user preference to scope Reading Lists web UI to specific logged-in users
Closed, ResolvedPublic2 Estimated Story Points

Description

As part of T397532, we want to limit the initial reading list experiment to a subset of logged-in users in order to avoid complex UI & workflow considerations.

We only want to show the new Reading List UI to users who:

  1. Are logged-in
  2. Have zero watchlist items
  3. Have zero existing reading lists (from mobile apps)
  4. Have zero edits

Additionally, we don't want user experience to change mid-way through the experiment, if one of these parameters change. Therefore, we want to use these parameters to set a hidden user preference (or other persistent DB flag) for the user that will maintain their ability to be enrolled in the experiment, as well as maintain their reading list functionality after the experiment is over.

User story

As a logged-in reader, I want to the ability to save articles, and I don't want that functionality to disappear after an arbitrary amount of time.


Requirements

We want to create a new hidden user preference (or other persistent DB flag) that will be set to true under the following conditions

  • The user is logged-in
  • The user has zero watchlist items
  • The user has zero existing reading list items
  • The user has zero edits

When this preference is true, we want users to see the new Reading List feature.

Acceptance criteria

  • Only users with the criteria mentioned above can initially see the new reading list feature.
  • After making an edit, users who initially saw the reading list feature will continue to see it.
  • After adding items to their watchlist, users will continue to see the reading list feature
  • After adding items to their reading list on mobile apps, users will continue to see the reading list feature.

BDD

  • For QA engineer to fill out.

Test Steps

  • For QA engineer to fill out.

Communication criteria

Add if this needs an announcement or discussion.

Rollback plan

Describe the rollback plan in production for this task if something goes wrong.

This task was created by Version 1.0.0 of the Reader Experience team task template using phabulous.

Event Timeline

Jdrewniak moved this task from Incoming to Needs refinement on the Reader Experience Team board.

Steph to refine/spike out how this bucketing strategy will look

Jdrewniak renamed this task from [Reading Lists] Scope Reading Lists web UI to specific logged-in users to [Reading Lists] Create hidden user preference to scope Reading Lists web UI to specific logged-in users.Aug 20 2025, 4:55 PM

Note: We should include active users in this by looking at when the users last sign in.

Jdrewniak updated the task description. (Show Details)
Jdrewniak updated the task description. (Show Details)
Jdrewniak updated the task description. (Show Details)
LMora-WMF set the point value for this task to 5.Sep 9 2025, 5:43 PM

Where we left things:

  • We want to write a maintenance script to set the user property for eligible users - the outcome of this patch is a script reviewed and merged, but not yet run
    • the script should ideally accept a list of user IDs, to be sourced from analytics, as either a file or from STDIN
    • there must be a way to specify an upper limit of properties to be added, which would ideally be enforced across multiple runs of the script as well
    • we must ensure that we're not writing negative properties for people who _aren't_ eligible (no false/null, only true)
    • setting of properties should be done in batches so that we don't have to leave the script running for long periods of time, meaning it will also need to be able to be re-run without issue

Anyone should feel welcome to comment anything else I am missing - tagging in @Jdlrobson-WMF as the original idea for the script and @aude as the one who suggested additional clarification

@SToyofuku-WMF @Jdrewniak will the user IDs be the global central auth id for the user? and we set the preference on only certain wikis that are part of the experiment and where the user has an account?

there must be a way to specify an upper limit of properties to be added, which would ideally be enforced across multiple runs of the script as well

Is this on a per-wiki basis? or can we limit globally based on the list of user IDs provided and make sure the input does not exceed some maximum size?

The user has zero watchlist items

should this be <= 2 watchlist items, since most users have their user page and user talk page automatically added to their watchlist?

and do we need to do further verification of user eligibility in the script of can we rely on what analytics provides us?

The user has zero watchlist items

should this be <= 2 watchlist items, since most users have their user page and user talk page automatically added to their watchlist?

and do we need to do further verification of user eligibility in the script of can we rely on what analytics provides us?

I believe it should be <= 2, but also that this part will be handled by Jennifer - we can hold off on additional verification given performance concerns, unless you think that's a bad idea

there must be a way to specify an upper limit of properties to be added, which would ideally be enforced across multiple runs of the script as well

Is this on a per-wiki basis? or can we limit globally based on the list of user IDs provided and make sure the input does not exceed some maximum size?

Ideally it would be total upper limit globally - hopefully that's not too difficult. I asked @jwang in slack about what format we could expect to get the IDs in

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

[mediawiki/extensions/ReadingLists@master] WIP - Script for populating hidden user preference

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

Steph to take another pass on this and hopefully +1 pre-Amir

Change #1189348 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Script for populating hidden user preference

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

@SToyofuku-WMF I assume there is additional work needed here to wire up the hidden user preference to the experiment platform control group? Currently when the preference is enabled the bookmark will be always shown. Is that part of this ticket or another?

I think that's T405294? I'd be in favor of this going to QA (which I guess will be done by @Ladsgroup...?)

SToyofuku-WMF added a subscriber: Edtadros.

Gonna trust myself since all of these actions are free - I'll hold onto the ticket since I can be ultimately responsible for making sure this gets QAed in some form or another (we could have @Edtadros QA on the beta cluster but that might be super involved and not worth it given how the feature code is currently set up)

Is this still waiting on some sort of QA, or should it be signed off?

Apologies - I was waiting for @Ladsgroup to confirm the script looked good to him, but I guess he already did that

Apologies - I was waiting for @Ladsgroup to confirm the script looked good to him, but I guess he already did that

Oh I didn't know it was waiting on me. My apologies. The script looked good to me but haven't tested it so I couldn't +2 it.

Jdlrobson-WMF claimed this task.

No worries! Thanks for taking a look ☺️