Page MenuHomePhabricator

Show Community Wishlist entity titles in search results
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
MusikAnimal
Oct 5 2025, 7:17 AM
Referenced Files
F66782132: 2025-10-22_12-06-08.png
Oct 22 2025, 7:39 PM
F66782130: 2025-10-22_12-05-53.png
Oct 22 2025, 7:39 PM
F66782127: 2025-10-22_12-05-17.png
Oct 22 2025, 7:39 PM
F66782096: 2025-10-22_12-13-19.png
Oct 22 2025, 7:39 PM
F66782094: 2025-10-22_12-12-41.png
Oct 22 2025, 7:39 PM
F66782091: 2025-10-22_12-12-08.png
Oct 22 2025, 7:39 PM
F66782088: 2025-10-22_12-11-46.png
Oct 22 2025, 7:39 PM
F66782085: 2025-10-22_12-10-20.png
Oct 22 2025, 7:39 PM

Description

Background

Since we're using auto-generated numerical page titles now, the results through Special:Search can look confusing with only the page title being shown as the link. The entity's title should be shown as well, and as the more prominent part of the link, just as is seen on Wikidata.

Wikidata's ShowSearchHitHandler.php looks like basically what we want. We can even have it follow the language fallback chain. Currently we work around this by using {{#translation:}} in the MediaWiki-extensions-InputBox we currently have embedded in the wikitext at Community Wishlist/Wishes, which limits its results.

Other problems:

  • No-JS messages show up in search results (example). We can configure CirrusSearch to index what we want, namely only the title, description and other free-form fields. See related task: T406419

Efforts for improving the search results for entities is tracked separately at T410548: Improve search results for Community Wishlist entities.

Acceptance criteria
  • Show the entity page's display title in place of the actual page title

Derived Requirement

Ensure that Community Wishlist entities (wishes and focus areas) display improved, user-friendly information in search results on Special:Search. Instead of showing only auto-generated numerical page titles (e.g., *W10*, *FA3*), the entity’s display title should appear prominently as the main search result heading—similar to how Wikidata handles entity search results.

Additionally, search indexing and rendering should:

  • Follow the language fallback chain for multilingual titles.
  • Exclude No-JS or system messages from search results.
  • Include only relevant content fields such as the title, description, and other free-form fields.

Test Steps

Test Case 1: Verify display title appears in search results

  1. Navigate to Special:Search on Meta beta.
  2. Search for an existing wish (e.g., type part of the wish’s display title).
  3. Observe the search results.
  4. ✅❓❌⬜ AC1: Confirm that the entity’s display title (e.g., *Allow section translation for all users*) appears prominently instead of the numeric page title (e.g., *W10*).

Test Case 2: Verify display title handling for focus areas

  1. On Special:Search, search for a focus area (e.g., *Improving Editing Tools*).
  2. Observe the search result link and snippet.
  3. ✅❓❌⬜ AC2: Confirm that the focus area’s display title appears as the main result heading and not the auto-generated title (e.g., *FA3*).

Test Case 3: Verify exclusion of No-JS messages and irrelevant content

  1. Perform a search with a keyword likely to return system-related pages (e.g., “Community Wishlist”).
  2. Review the search results for any No-JS messages or system text.
  3. ✅❓❌⬜ AC3: Confirm that No-JS messages or internal system strings do not appear in search results, and only relevant fields (title, description, free-form text) are indexed.

Test Case 4: Verify multilingual and language fallback behavior

  1. Switch the wiki interface to a language that uses translation fallback (e.g., English → Hebrew).
  2. Search for a translated wish or focus area.
  3. ✅❓❌⬜ AC4: Confirm that the search result correctly displays the translated display title or falls back to the next available language in the fallback chain.

QA Results - Meta Beta

Event Timeline

MusikAnimal triaged this task as Medium priority.

Change #1194299 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CommunityRequests@master] SearchHooks: show search results using the entity title

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

MusikAnimal changed the task status from Open to In Progress.Oct 14 2025, 5:55 AM

Change #1194299 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] SearchHooks: show search results using the entity title

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

HMonroy changed the task status from In Progress to Open.Oct 21 2025, 7:58 PM
HMonroy moved this task from Feedback and Review to QA on the Community-Tech (Sea Lion Squad) board.

@MusikAnimal I'm not sure how you wanted this test because it does display the title besides Community Wishlist/FA4 but the search is all over the place. Some display the title as the first result, while others show it 10 options later or not at all. Please review AC2, AC4 and Other Random Searches.

Test Result - Meta Beta/ PROD

Status: ✅ PASS / ❓Need More Info / ❌ FAIL
Environment:Meta Beta/ PROD
OS: macOS Tahoe 26.0.1
Browser: Chrome 141
Device: MBA
Emulated Device: NA

Test Artifact(s):
https://meta.wikimedia.beta.wmcloud.org/wiki/Community_Wishlist
https://meta.wikimedia.org/wiki/Community_Wishlist

Test Steps

Test Case 1: Verify display title appears in search results

  1. Navigate to Special:Search on Meta beta.
  2. Search for an existing wish (e.g., type part of the wish’s display title).
  3. Observe the search results.
  4. AC1: Confirm that the entity’s display title (e.g., *Allow section translation for all users*) appears prominently instead of the numeric page title (e.g., *W10*).
Meta Beta- WishMeta Beta- Search ResultProd- WishProd- Search Result
2025-10-22_12-26-23.png (677×864 px, 100 KB)
2025-10-22_12-26-37.png (787×915 px, 163 KB)
2025-10-22_12-27-42.png (568×861 px, 93 KB)
2025-10-22_12-28-10.png (830×782 px, 150 KB)

Test Case 2: Verify display title handling for focus areas

  1. On Special:Search, search for a focus area (e.g., *Improving Editing Tools*).
  2. Observe the search result link and snippet.
  3. AC2: Confirm that the focus area’s display title appears as the main result heading and not the auto-generated title (e.g., *FA3*).

I'm not sure how you want to test this but the title is displayed beside W4. The search results are interesting in Meta Beta. I thought "Bread" would should up first since in it's the title not the 10 one down

Meta Beta- FAMeta Beta- Search ResultProd- FAProd- Search Result
2025-10-22_12-17-30.png (570×869 px, 97 KB)
2025-10-22_12-07-10.png (1×925 px, 243 KB)
2025-10-22_12-08-36.png (707×882 px, 140 KB)
2025-10-22_12-08-16.png (658×844 px, 106 KB)

Test Case 3: Verify exclusion of No-JS messages and irrelevant content

  1. Perform a search with a keyword likely to return system-related pages (e.g., “Community Wishlist”).
  2. Review the search results for any No-JS messages or system text.
  3. AC3: Confirm that No-JS messages or internal system strings do not appear in search results, and only relevant fields (title, description, free-form text) are indexed.

2025-10-22_12-10-20.png (871×1 px, 266 KB)

Test Case 4: Verify multilingual and language fallback behavior

  1. Switch the wiki interface to a language that uses translation fallback (e.g., English → Hebrew).
  2. Search for a translated wish or focus area.
  3. AC4: Confirm that the search result correctly displays the translated display title or falls back to the next available language in the fallback chain.

Did not find anything

He- WishHe- Search Wish Result
2025-10-22_12-11-46.png (1×834 px, 182 KB)
2025-10-22_12-12-08.png (656×824 px, 68 KB)

It didn't even pull any Hebrew titles

He- FAHe- Search FA Result
2025-10-22_12-12-41.png (771×900 px, 124 KB)
2025-10-22_12-13-19.png (1×900 px, 230 KB)

❓Other Random Searches

Greens didn't even show anything in the search. Noodles didn't show the title.

Meta Beta- WishesMeta Beta Search Results
2025-10-22_12-05-17.png (1×842 px, 158 KB)
2025-10-22_12-05-53.png (687×900 px, 102 KB)
2025-10-22_12-06-08.png (861×897 px, 79 KB)
GMikesell-WMF changed the task status from Open to In Progress.Oct 22 2025, 7:46 PM
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from QA to In Development on the Community-Tech (Sea Lion Squad) board.

We don't (yet) have control over the search results themselves, only how the search result appears, but that was next on the list anyway, so I'll work on that now.

MusikAnimal renamed this task from Make Community Wishlist entites appear better in search results to Show Community Wishlist entity titles in search results.Nov 19 2025, 7:10 PM
MusikAnimal updated the task description. (Show Details)

This has live for a while. I will save QA from another pass until we have T410548: Improve search results for Community Wishlist entities.