Page MenuHomePhabricator

Extend `DiscoverableEventsLookup` to expand titles via MoreLike
Open, Needs TriagePublic

Description

Background

DiscoverableEventsLookup::getAndRecordPromotableEvents passes
only the edited article's prefixed title to getEventsForDiscoveryByPage. To surface events
whose worklists contain topically related articles (not just the exact edited page), the
lookup must call SimilarArticleLookup, merge the results with the edited title, and pass
the combined set. PostEditHandler itself does not need to change — it already delegates
entirely to DiscoverableEventsLookup.

Type of story

  • Backend

Acceptance criteria

  • DiscoverableEventsLookup injects SimilarArticleLookup via the DI container.
  • getAndRecordPromotableEvents calls SimilarArticleLookup::getSimilarArticles with the edited article's prefixed title, then passes the merged array (similar titles + edited title) to getEventsForDiscoveryByPage.
  • ServiceWiring.php updated to inject SimilarArticleLookup into DiscoverableEventsLookup.

Are there dependencies (on someone else or learning something new)?

Testing required?

  • Yes
  • Minimum to pass QA: unit tests cover opted-out user (no dialog), not-opted-out user with no matching events (no dialog), not-opted-out user with one new matching event found via MoreLike (dialog shown), and MoreLike results correctly merged with the edited title before the lookup.