Page MenuHomePhabricator

dashboard_open event source is always "direct"
Closed, ResolvedPublicBUG REPORT

Description

Coming back to the unified dashboard from any other screen in the application (confirm, search, editor, ...) always logs the event source as direct.

This is caused by the previousRoute not being stored in the application state in most cases following an unrelated patch. More details here: T388031#10727022

Steps

  • Open the unified dashboard
  • Click on any translation suggestion
  • From the confirm screen, click the close (x) button to go back to the dashboard

Actual

  • A "dashboard_open" event is being logged with event_source: direct

Expected

  • A "dashboard_open" event is being logged with event_source: return_from_confirmation

Note: there are at least 5 specific event sources for different paths the user can take back to the dashboard. I don't know if re-testing them all is in scope for this task but doing a spot check can't hurt.

Derived Requirement

Ensure that the #dashboard_open event logs the correct 'event_source' based on the user's navigation path, such as 'return_from_confirmation' when returning from the confirmation screen.

Test Steps

Test Case 1: Ensure #dashboard_open event logs 'return_from_confirmation' when navigating back from confirm screen

  1. Open the Content Translation unified dashboard.
  2. Click on any available translation suggestion to start a translation.
  3. On the confirmation screen, click the close (X) button to return to the dashboard.
  4. Inspect the logged events (via instrumentation or developer tools).
  5. ✅❓❌⬜ AC1: Confirm that the #dashboard_open event logs 'event_source' as 'return_from_confirmation' instead of 'direct'.

Test Case 2: Spot check that #dashboard_open event source varies appropriately from different navigation paths

  1. From the dashboard, go to the search screen or editor.
  2. Navigate back to the dashboard via the standard route (e.g., browser back or in-app UI).
  3. Inspect the #dashboard_open event in the logs.
  4. ✅❓❌⬜ AC2: Confirm that the 'event_source' in the #dashboard_open event reflects the appropriate origin (e.g., 'return_from_editor', 'return_from_search') rather than defaulting to 'direct'.

QA Results - Test Beta

ACStatusDetails
1T391500#10784028
2T391500#10784028

Event Timeline

SBisson triaged this task as Medium priority.
SBisson updated the task description. (Show Details)

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

[mediawiki/extensions/ContentTranslation@master] Fix instrumentation by storing "previousRoute" in application state

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

Change #1135475 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Fix instrumentation by storing "previousRoute" in application state

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

No idea. I can't reproduce T391256 with or without the fix for T391500

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

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

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

Change #1136452 merged by jenkins-bot:

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

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

@SBisson Confirmed event log is not direct as seen in the screenshots below. I will move this to sign-off. Thanks for all your work!

Test Result - Test Beta

Status: ✅ PASS
Environment: Test Beta
OS: macOS Sequoia 15.4.1
Browser: Chrome 135
Device: MBA
Emulated Device: NA

Test Artifact(s):
https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&filter-id=CEE%20Spring%202025%20Lithuania&filter-type=collections&from=en&to=fr#/
https://test.m.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&filter-id=CEE%20Spring%202025%20Poland&filter-type=collections&from=en&to=fr&page=Pubal#/sx

Test Steps

Test Case 1: Ensure #dashboard_open event logs 'return_from_confirmation' when navigating back from confirm screen

  1. Open the Content Translation unified dashboard.
  2. Click on any available translation suggestion to start a translation.
  3. On the confirmation screen, click the close (X) button to return to the dashboard.
  4. Inspect the logged events (via instrumentation or developer tools).
  5. AC1: Confirm that the #dashboard_open event logs 'event_source' as 'return_from_confirmation' instead of 'direct'.
return_from_confirmation
2025-05-01_08-26-37.png (929×1 px, 313 KB)

Test Case 2: Spot check that #dashboard_open event source varies appropriately from different navigation paths

  1. From the dashboard, go to the search screen or editor.
  2. Navigate back to the dashboard via the standard route (e.g., browser back or in-app UI).
  3. Inspect the #dashboard_open event in the logs.
  4. AC2: Confirm that the 'event_source' in the #dashboard_open event reflects the appropriate origin (e.g., 'return_from_editor', 'return_from_search') rather than defaulting to 'direct'.
suggestion_filter_direct_preselectreturn_from_searchreturn_from_section_selection
2025-05-01_08-25-11.png (929×1 px, 287 KB)
2025-05-01_08-28-50.png (930×1 px, 329 KB)
2025-05-01_08-52-28.png (928×1 px, 387 KB)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.