CX Dashboard: Error when "All collections" filter is preselected in the URL but no collections are returned from the API
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Block the /page-collections endpoint from the LiftWing APIwiki
  2. Open ContentTranslation page in any wiki with the "All collections" filter preselected in the URL. e.g.

https://el.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=collections&active-list=suggestions&from=en&to=el

What happens?:
An error is thrown in the browser console, and no suggestion filter is selected. Additionally, only the "More" option is displayed in the filter bar, and clicking on it throws new errors.

What should have happened instead?:
The default filter ("For you" filter, with filter-type equal to automatic and filter-id equal to previous-edits) should have been selected, given that the "All collections" is not available. The suggestion filter bar should have contained three options (including the "More" option), and clicking on the "More" option should properly open the filters dialog.

Screencast from greek (el) production wiki:

Derived Requirement

If the /page-collections endpoint fails or returns no collections when the Content Translation page is opened with the "All collections" filter preselected via URL parameters, the system must:

  • Automatically fall back to the default filter: “For you” (filter-type=automatic, filter-id=previous-edits)
  • Display the full suggestion filter bar with all expected filters (e.g., “For you,” “Collections,” and “More”)
  • Ensure clicking on “More” opens the filters dialog without causing any console errors
Test Steps

Precondition: Simulate a failure or block access to the /page-collections API endpoint on the target wiki.

Test Case 1: Fallback to “For you” filter when collections are unavailable

  1. Visit the following URL on the wiki with the endpoint blocked: https://el.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=collections&active-list=suggestions&from=en&to=el
  2. ✅❓❌⬜ AC1: Confirm that the "For you" filter is selected automatically.

Test Case 2: Verify expected filter bar display

  1. Observe the suggestion filter bar after loading the URL.
  2. ✅❓❌⬜ AC2: Confirm that the filter bar displays at least three options, including the “More” button.

Test Case 3: Validate “More” filter dialog behavior

  1. Click on the “More” option in the filter bar.
  2. ✅❓❌⬜ AC3: Confirm that the filters dialog opens properly without console or UI errors.

QA Results - PROD

ACStatusDetails
1T395242#10885640
2T395242#10885640
3T395242#10885640

Event Timeline

ngkountas triaged this task as High priority.
ngkountas moved this task from Incoming to Prioritized on the LPL Hypothesis board.

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

[mediawiki/extensions/ContentTranslation@master] CX: Re-validate URL filter when page collections are fetched

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

Change #1150649 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Re-validate URL filter when page collections are fetched

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

Change #1150746 had a related patch set uploaded (by Sbisson; author: Sbisson):

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

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

Change #1150746 merged by jenkins-bot:

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

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

@ngkountas Confirmed that the "For you" filter is selected automatically, the filter bar displays correctly, and there are no errors in the console board, except for the API, which was blocked. I will move this to sign-off. Thanks for all your work!

Test Result - PROD

Status: ✅ PASS
Environment: PROD
OS: macOS Sequoia 15.6
Browser: Chrome 136
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://el.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=el#/

Test Steps

Precondition: Simulate a failure or block access to the /page-collections API endpoint on the target wiki.

Test Case 1: Fallback to “For you” filter when collections are unavailable

  1. Visit the following URL on the wiki with the endpoint blocked: https://el.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=collections&active-list=suggestions&from=en&to=el
  2. ✅❓❌⬜ AC1: Confirm that the "For you" filter is selected automatically.

gif

2025-06-04_08-53-34.mp4.gif (908×1 px, 3 MB)

Test Case 2: Verify expected filter bar display

  1. Observe the suggestion filter bar after loading the URL.
  2. ✅❓❌⬜ AC2: Confirm that the filter bar displays at least three options, including the “More” button.

See AC1

Test Case 3: Validate “More” filter dialog behavior

  1. Click on the “More” option in the filter bar.
  2. ✅❓❌⬜ AC3: Confirm that the filters dialog opens properly without console or UI errors.

See AC1

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.