Background
A bugs was discovered during Jennifer's QA of eu/ca events
https://phabricator.wikimedia.org/T386142#10553847
- Show empty search recommendation event is missing funnel data
Requirements
- Show empty search recommendation event has funnel data with the search activity id
- fix(es) are backported and QAed in production
Acceptance criteria
- Show empty search recommendations should have a valid funnel_entry_token
SELECT dt, action, action_context, action_source, action_subtype, funnel_entry_token FROM event.product_metrics_web_base_search_ab_test_clicks WHERE year=2025 and month=2 AND performer.session_id='0503d55281c5066deefa' ORDER BY dt limit 100
Developer notes
I can reproduce Show empty search recommendation event is missing funnel data. Looks like ext.MobileFrontend.searchOverlay.empty hook fires before ext.MobileFrontend.searchOverlay.open as the constructor calls resetSearch
We'd need to either:
Adjust MobileFrontend code so the hook firing order is as expected
In WikimediaEvents update the hook callback for ext.MobileFrontend.searchOverlay.empty so that the event is delayed until it's available (e.g. via a setInterval).
BDD
Feature: Ensure Show Empty Search Recommendation event includes funnel data
Scenario: Verify Show Empty Search Recommendation event contains search activity ID
Given a user activates the search box
When the empty search recommendations are displayed
Then the event should include a valid funnel_entry_tokenTest Steps
Test Case 1: Verify Show Empty Search Recommendation event contains funnel data
- Open the developer console.
- Enable event logging by running:
mw.loader.using('mediawiki.api').then(function () {
new mw.Api().saveOption('eventlogging-display-console', '1');
});- Activate the search box without entering a query.
- Observe the console logs for the Show Empty Search Recommendation event.
- Confirm that the event includes a valid funnel_entry_token with the search activity ID.
- AC1: The event includes a valid funnel_entry_token.
QA Results - Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T386735#10577109 |

