Open Bug 1830213 Opened 11 months ago Updated 10 months ago

Wrong screen impression sent after switching locale and reload of about:welcome

Categories

(Firefox :: Messaging System, defect, P2)

defect

Tracking

()

People

(Reporter: pdahiya, Unassigned)

References

(Blocks 1 open bug)

Details

Followup of https://bugzilla.mozilla.org/show_bug.cgi?id=1823779 fix tracking below edge case

STR:

  1. Open about:welcome with Language Switcher flow
  2. Switch locale on Language switcher screen
  3. Hit Reload or complete onboarding by navigating to about:home and hit back button
  4. Screen impression in telemetry ping are incorrect

This only happens on about:welcome reloads due to explicit click of refresh or back navigation from about:home to about:welcome due to filtering out AW_LANGUAGE_MISMATCH screen in useLanguageSwitcher custom hook and updating screen index , while useEffect hook that sends impression ping still using upcomingScreens from defaultScreens to get filteredScreens

https://searchfox.org/mozilla-release/rev/a2c0963d8de08c70624a8869461435b45490a42a/browser/components/newtab/content-src/aboutwelcome/components/LanguageSwitcher.jsx#134

let upcomingScreens = defaultScreens.filter(
    s => !screensVisited.find(v => v.id === s.id)
  );

  let filteredScreens = screensVisited.concat(
    (await window.AWEvaluateScreenTargeting(upcomingScreens)) ??
      upcomingScreens
  );

`

One option to fix is maintaining defaultLanguageModifiedScreens state thats gets updated if useLanguageSwitcher custom hook filter AW_LANGUAGE_MISMATCH and using that instead of defaultScreens.

https://phabricator.services.mozilla.com/D174044#5820568

Depends on: 1823779
Priority: -- → P2

The severity field is not set for this bug.
:tspurway, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(tspurway)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:lsmith, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(tspurway) → needinfo?(lsmith)
Severity: -- → S4
Flags: needinfo?(lsmith)
You need to log in before you can comment on or make changes to this bug.