Skip to content

Conversation

@Rinwaoluwa
Copy link
Contributor

@Rinwaoluwa Rinwaoluwa commented Oct 26, 2025

📜 Tickets

Jira ticket
Github issue

💡 Description

Fixes missing homepage.viewed telemetry events when users create a new tab using the "+" toolbar button while viewing a regular webpage.

Closes #29068

Problem

The updateEmbeddedContent method contained a guard condition that prevented the didSelectedTabChangeToHomepage action from being dispatched unless the previous tab was also a homepage:

guard previousTab?.isFxHomeTab ?? false else { return }

Comented out the guard condition that prevented the didSelectedTabChangeToHomepage action from firing if the user navigated to the homepage from a non-homepage tab. This change ensures that the homepage.viewed telemetry impression is correctly recorded when a new tab is created via the "+" toolbar button, regardless of the previous tab's content.

🎥 Demos

Before After
Demo

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

…when opening new tab from toolbar.

Removed a guard condition that prevented the didSelectedTabChangeToHomepage action from firing if the user navigated to the homepage from a non-homepage tab. This change ensures that the homepage.viewed telemetry impression is correctly recorded when a new tab is created via the "+" toolbar button, regardless of the previous tab's content.
@Rinwaoluwa Rinwaoluwa requested a review from a team as a code owner October 26, 2025 14:25
@Rinwaoluwa Rinwaoluwa requested a review from PARAIPAN9 October 26, 2025 14:25
@mergify
Copy link
Contributor

mergify bot commented Oct 26, 2025

⚠️ The sha of the head commit of this PR conflicts with #30100. Mergify cannot evaluate rules on this PR. ⚠️

@Rinwaoluwa
Copy link
Contributor Author

Hiii @cyndichin 😊 could you please take a look at this once you’re done reviewing my other PR? Thanks so much! 🙏

@Rinwaoluwa
Copy link
Contributor Author

hi @PARAIPAN9 😊 can you please take a look at this ?

@PARAIPAN9
Copy link
Collaborator

How did I miss this. Sorry @Rinwaoluwa for taking too long to review your PR. I'll let @cyndichin review it as it seems she has some context around this issue.

@cyndichin
Copy link
Contributor

@Rinwaoluwa apologies for the delay, I fell ill towards the end of last week. Taking a look now!

@cyndichin
Copy link
Contributor

@Rinwaoluwa thanks for looking into this, the issue is that if we remove that guard then we get the issue that the homepage viewed telemetry will be reported twice in other cases such as launching the app. Here are some cases that we want to make sure are also reporting properly with any fix that we add:

  • Open a new tab from the tab tray
  • Switch from private to normal via mask (ipad)
  • Open a new tab from long press on tab tray
  • Switch from web page to homepage via homepage button
  • Open new tab from new menu
  • Open from address bar when on webpage
  • Launch

@cyndichin cyndichin requested review from Foxbolts and removed request for PARAIPAN9 November 3, 2025 12:58
@cyndichin
Copy link
Contributor

also tagging @Foxbolts as he is the reference person for this ticket

Copy link
Contributor

@cyndichin cyndichin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on, requesting changes based on comment here.

@mergify
Copy link
Contributor

mergify bot commented Nov 5, 2025

This pull request has conflicts when rebasing. Could you fix it @Rinwaoluwa? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing homepage impression telemetry when creating a new tab from the toolbar

3 participants