Page MenuHomePhabricator

Add labels column in Special:EditWatchlist
Closed, ResolvedPublic

Description

Add a column to the table on Special:EditWatchlist and display a list of labels for each page. The labels should be shown as a comma-separated list of label names, with no link.


Derived Requirements

  1. Special:EditWatchlist must include a new Labels column in the watchlist table.
  2. The Labels column must display all labels assigned to each watched page.
  3. Labels must be rendered as a comma-separated list of label names.
  4. Label names in the Labels column must be plain text and must not be clickable.
  5. Pages with no assigned labels must display an empty state in the Labels column without placeholders or links.
  6. The addition of the Labels column must not alter existing watchlist table behavior, sorting, or selection functionality.

Test Result - Beta|Prod

Status: ✅ PASS / ❓ Need More Info / ❌ FAIL
Environment: beta/enwiki
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Display Labels Column in Watchlist Table

Preconditions

  • The user is logged in.
  • The watchlist contains at least one page with assigned labels and one page without labels.
  1. Navigate to Special:EditWatchlist.
  2. Observe the table headers.
  3. Locate the newly added Labels column.
  4. Review the label content for multiple watchlist rows.
  5. ✅❓❌⬜ AC1: Verify that the Labels column is present and displays a comma-separated list of label names as plain text for pages with labels, while pages without labels display no linked or placeholder content.

Test Case 2: Verify Labels Are Non-Interactive

Preconditions

  • Same as Test Case 1.
  • At least one watchlist item has multiple labels.
  1. Navigate to Special:EditWatchlist.
  2. Locate a watchlist row with multiple labels in the Labels column.
  3. Hover over and click on individual label names.
  4. Observe cursor behavior and navigation.
  5. ✅❓❌⬜ AC2: Verify that label names are rendered as non-interactive text with no links, hover states, or navigation behavior.

Test Case 3: Validate Table Stability After Adding Labels Column

Preconditions

  • Same as Test Case 1.
  1. Navigate to Special:EditWatchlist.
  2. Use existing table functionality such as selecting rows and using bulk actions.
  3. Scroll through the watchlist table.
  4. Observe alignment and layout consistency.
  5. ✅❓❌⬜ AC3: Verify that adding the Labels column does not disrupt existing table layout, selection behavior, or bulk actions on Special:EditWatchlist.

QA Results -Beta

ACStatusDetails
1T411599#11518967
2T411599#11518967
3T411599#11518967

Event Timeline

This assumes that labels may not include a comma. Is that the case?

No that's not the case. Labels can contain any characters. We created this task in a meeting yesterday and were slightly rushed. We talked about making the labels show as InfoChips, but as a decision hasn't yet been made about how the labels are going to show on the watchlist itself we though it might just be simpler to do a basic comma-separated list for now. But I think we'll update it soon.

Actually I'm not really sure what the correct design is for making InfoChips into links. I assume they don't get the link color, but more than that the existing Codex-PHP structure should probably be fixed up because otherwise we end up with something like this:

<a class="mw-watchlistpager-wllabel" href="/w/index.php?title=Special:Watchlist&amp;wllabel=34">
  <div class="cdx-info-chip cdx-info-chip--notice">
    <span class="cdx-info-chip--text">Ballooning, hot air</span>
  </div>
</a>

Change #1224049 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Add 'Labels' column to Special:EditWatchlist

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

Samwilson changed the task status from Open to In Progress.Jan 12 2026, 3:33 AM

Change #1224049 merged by jenkins-bot:

[mediawiki/core@master] Add 'Labels' column to Special:EditWatchlist

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

The labels in the new column are not updated after saving, because we're outputting the next page as the response the post request and querying the replica DB for the labels. Looks like we need to either query primary, or reload the page as a new get request.

Change #1225757 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Special:EditWatchlist: Use primary DB during POST requests

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

Change #1225757 merged by jenkins-bot:

[mediawiki/core@master] Special:EditWatchlist: Use primary DB during POST requests

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

@Samwilson Confirmed that Add labels column are in Special:EditWatchlist, as seen in screenshot/videos below. I will mark this as Resolved. Thanks for all your work!

Test Result - Beta

Status: ✅ PASS
Environment: Beta
OS: macOS Tahoe 26.1
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://en.wikipedia.beta.wmcloud.org/w/index.php?limit=20&title=Special%3AEditWatchlist

Test Steps

Test Case 1: Display Labels Column in Watchlist Table

Preconditions

  • The user is logged in.
  • The watchlist contains at least one page with assigned labels and one page without labels.
  1. Navigate to Special:EditWatchlist.
  2. Observe the table headers.
  3. Locate the newly added Labels column.
  4. Review the label content for multiple watchlist rows.
  5. AC1: Verify that the Labels column is present and displays a comma-separated list of label names as plain text for pages with labels, while pages without labels display no linked or placeholder content.

2026-01-13_08-57-11.png (1,305×979 px, 184 KB)

Test Case 2: Verify Labels Are Non-Interactive

Preconditions

  • Same as Test Case 1.
  • At least one watchlist item has multiple labels.
  1. Navigate to Special:EditWatchlist.
  2. Locate a watchlist row with multiple labels in the Labels column.
  3. Hover over and click on individual label names.
  4. Observe cursor behavior and navigation.
  5. AC2: Verify that label names are rendered as non-interactive text with no links, hover states, or navigation behavior.

Test Case 3: Validate Table Stability After Adding Labels Column

Preconditions

  • Same as Test Case 1.
  1. Navigate to Special:EditWatchlist.
  2. Use existing table functionality such as selecting rows and using bulk actions.
  3. Scroll through the watchlist table.
  4. Observe alignment and layout consistency.
  5. AC3: Verify that adding the Labels column does not disrupt existing table layout, selection behavior, or bulk actions on Special:EditWatchlist.
En-LTR: AddingAr- RTL: Removing

|

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)