Page MenuHomePhabricator

Inject nominated collection suggestions for popular filter
Closed, ResolvedPublic4 Estimated Story Points

Description

When there is a nominated collection for the target language and the current filter is 'popular', try to show 1 page creation suggestion and 1 page expansion suggestion from the nominated collection and the rest from the 'most' popular search algorithm. This requires coordination between what the recommendation api returns and what the CX dashboard shows.

When there is no nominated collection, nothing different from the current state.


Derived Requirement

Ensure that when a community-nominated collection exists for the selected target language and the active filter is 'popular', the Content Translation dashboard injects a balanced set of suggestions by including exactly one page creation suggestion and one page expansion suggestion sourced from the nominated collection, while populating the remaining suggestions using the existing most-popular algorithm; additionally, ensure that behavior remains unchanged when no nominated collection exists.

Test Steps

Test Case 1: Inject nominated collection suggestions when 'popular' filter is active

  1. Open the Content Translation dashboard.
  2. Select a translation pair where the target language has a community-nominated collection configured.
  3. Switch the active filter to 'popular'.
  4. Observe the list of suggestions displayed.
  5. ✅❓❌⬜ AC1: Confirm that the suggestions include exactly one page creation and one page expansion sourced from the nominated collection.

Test Case 2: Fill remaining suggestions using the most-popular algorithm

  1. With the 'popular' filter active and a nominated collection available, review all suggestions beyond the first two injected items.
  2. Verify the source or type of the remaining suggestions.
  3. ✅❓❌⬜ AC2: Confirm that all remaining suggestions are populated using the existing most-popular search algorithm and are not sourced from the nominated collection unless selected by that algorithm.

Test Case 3: Maintain correct behavior when no nominated collection exists

  1. Open the Content Translation dashboard for a target language with no community-nominated collection.
  2. Switch the active filter to 'popular'.
  3. Observe the list of suggestions.
  4. ✅❓❌⬜ AC3: Confirm that the suggestions match the current behavior of the 'popular' filter with no injected items and no change from the existing state.

QA Results - TestWiki

ACStatusDetails
1T409333#11482673
2T409333#11482673
3T409333#11482673

Event Timeline

SBisson moved this task from Backlog to Incoming on the LPL Hypothesis board.
SBisson triaged this task as High priority.Nov 6 2025, 3:14 PM
SBisson added a project: Recommendation-API.
SBisson updated the task description. (Show Details)
SBisson moved this task from Incoming to Prioritized on the LPL Hypothesis board.

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

[mediawiki/extensions/ContentTranslation@master] Inject nominated collection suggestions for popular filter

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

ngkountas changed the task status from Open to In Progress.Nov 10 2025, 2:10 PM
ngkountas moved this task from Prioritized to In-progress on the LPL Hypothesis board.
ngkountas set the point value for this task to 4.Nov 10 2025, 2:16 PM

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

[mediawiki/extensions/ContentTranslation@master] CX: Improve popular suggestion fetching

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

Change #1203234 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Inject nominated collection suggestions for popular filter

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

Change #1206188 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Improve popular suggestion fetching

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

Change #1210670 had a related patch set uploaded (by Eamedina; author: Eamedina):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20251124

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

Change #1210670 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20251124

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

@ngkountas A few weird things I noticed as seen in the video of AC1.

  1. Does it take that long to pull something up when you go to the "Popular "chip?
  2. When 1 each came from New Section and New Page, I clicked on Refresh suggestions, and No Suggestions came up.
  3. When I toggled to another chip and then went back to "Popular", All 6 suggestions came up but they were all from the Nominated Chip since it had all "Community Priority"

Test Result - TestWiki

Status: ❌ FAIL
Environment: TestWiki
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Inject nominated collection suggestions when 'popular' filter is active

  1. Open the Content Translation dashboard.
  2. Select a translation pair where the target language has a community-nominated collection configured.
  3. Switch the active filter to 'popular'.
  4. Observe the list of suggestions displayed.
  5. AC1: Confirm that the suggestions include exactly one page creation and one page expansion sourced from the nominated collection.

Test Case 2: Fill remaining suggestions using the most-popular algorithm

  1. With the 'popular' filter active and a nominated collection available, review all suggestions beyond the first two injected items.
  2. Verify the source or type of the remaining suggestions.
  3. AC2: Confirm that all remaining suggestions are populated using the existing most-popular search algorithm and are not sourced from the nominated collection unless selected by that algorithm.

They seem to be all "Community Priority"
See AC1

Test Case 3: Maintain correct behavior when no nominated collection exists

  1. Open the Content Translation dashboard for a target language with no community-nominated collection.
  2. Switch the active filter to 'popular'.
  3. Observe the list of suggestions.
  4. AC3: Confirm that the suggestions match the current behavior of the 'popular' filter with no injected items and no change from the existing state.

I tried multiple languages (En->Es, En->Fr,En->Ja), and I'm not getting any articles pulled up for popular as seen in the screenshot

2025-12-19_16-24-49.png (895×1 px, 111 KB)

@GMikesell-WMF this weird behavior is caused by a mostviewed API failure, and is not related to this task. This API powers the "Popular" filter, and is known to fail from time to time. The issue is tracked in T389168.

Let's test the task again at a time when the mostviewed API isn't failing.

@ngkountas Confirmed Inject nominated collection suggestions for popular filter, as seen in the videos. I will move this to Sign-off. Thanks for all your work!

Test Result - TestWiki

Status: ✅ Pass
Environment: TestWiki
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Inject nominated collection suggestions when 'popular' filter is active

  1. Open the Content Translation dashboard.
  2. Select a translation pair where the target language has a community-nominated collection configured.
  3. Switch the active filter to 'popular'.
  4. Observe the list of suggestions displayed.
  5. AC1: Confirm that the suggestions include exactly one page creation and one page expansion sourced from the nominated collection.

Test Case 2: Fill remaining suggestions using the most-popular algorithm

  1. With the 'popular' filter active and a nominated collection available, review all suggestions beyond the first two injected items.
  2. Verify the source or type of the remaining suggestions.
  3. AC2: Confirm that all remaining suggestions are populated using the existing most-popular search algorithm and are not sourced from the nominated collection unless selected by that algorithm.

Test Case 3: Maintain correct behavior when no nominated collection exists

  1. Open the Content Translation dashboard for a target language with no community-nominated collection.
  2. Switch the active filter to 'popular'.
  3. Observe the list of suggestions.
  4. AC3: Confirm that the suggestions match the current behavior of the 'popular' filter with no injected items and no change from the existing state.

2025-12-22_14-41-31.png (1×1 px, 177 KB)

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.