Closed Bug 2027637 Opened 13 days ago Closed 4 days ago

Some of the Intent, Mentions and Input Telemetry events show incorrect values

Categories

(Core :: Machine Learning: Frontend, defect)

Desktop
Unspecified
defect

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox-esr140 --- disabled
firefox149 --- disabled
firefox150 --- affected
firefox151 --- verified

People

(Reporter: rdoghi, Assigned: flozia, NeedInfo)

References

(Blocks 2 open bugs, Regressed 3 open bugs)

Details

(Whiteboard: [genai][input])

Attachments

(2 files)

Found in

  • Nightly 151.0a1 (2026-03-29)

Affected versions

  • Nightly 151.0a1 (2026-03-29)
  • Beta 150.0b2

Affected platforms

  • all

Steps to reproduce

  1. Open a Smart Window.
  2. Trigger the following TElemetry events:

navigate_submit
chat_submit
search_submit
smart_bar_intent_change_preview
add_tabs_click
add_tabs_selection
remove_tab
mention_start
mention_select
mention_remove

Expected result

  • The Telemetry events are fired and they contain the correct values

Actual result

  • The following issues have been encountered:

navigate_submit: (No Data to display)
does not fire if we Type www.gamespot.com and then Hit Enter Directly
does not fire for search or anything.
submit_type does not work correctly, it will not identify the Button click instead of Enter.

chat_submit:
no tokens value displayed
memories values not displayed
Submit Type will not register that I clicked the Ask button instead of Enter.
asking from the Address bar will show Tabs - 0
Location is not registered from the address bar.

search_submit:
detected intent was incorrect, intent was ask while the user selected the search
search from the address bar is not detected

add_tabs_click:
Tabs preselected will not record 1 only if 2 or more are preselected in which case for 2 tabs added it will show 1 preselected tab (not sure if its ok, technically its true if we already add 1 tab 1 is already there preselected.)
"message_seq": does this count users prompt as well ? for 1 user prompt and 1 response from the ai its counted as 2 message_seq

Regression range
N/A

Duplicate of this bug: 2027638
Assignee: nobody → fzia
Blocks: 2024028
Attachment #9560798 - Attachment description: WIP: Bug 2027637 - Fix smartbar metric extra keys → Bug 2027637 - Update smartbar telemetry events
QA Whiteboard: [qa-found-in-c151][QA-4747][S3] → [qa-found-in-c151][QA-4747][S3][uplift]
See Also: → 2028783

Adds the extra_key window to the urlbar engagement telemetry. The key makes it possible to distinguish telemetry between different window modes.

Attachment #9563869 - Attachment description: WIP: Bug 2027637 - Add extra_key window to urlbar engagement telemetry → Bug 2027637 - Add extra_key window to urlbar engagement telemetry r=mak,mbeier
Duplicate of this bug: 2028783
Pushed by elee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9be95dbc6edc https://hg.mozilla.org/integration/autoland/rev/dce45ee988c1 Update smartbar telemetry events r=urlbar-reviewers,ai-frontend-reviewers,Mardak,daisuke https://github.com/mozilla-firefox/firefox/commit/9d33901e28ee https://hg.mozilla.org/integration/autoland/rev/d149e0736cdb Add extra_key window to urlbar engagement telemetry r=urlbar-reviewers,ai-frontend-reviewers,daisuke,Mardak
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6dc2bbaa39f9 https://hg.mozilla.org/integration/autoland/rev/47eadf23c78d Revert "Bug 2027637 - Add extra_key window to urlbar engagement telemetry r=urlbar-reviewers,ai-frontend-reviewers,daisuke,Mardak" for causing bc failures at engagementTelemtry

Backed out for causing bc and TV failures at engagementTelemetry
Backout Link
Push with failures
Failure Log Bc
Failure log TV
Failure line TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/engagementTelemetry/browser/browser_glean_telemetry_engagement_window.js | handoff - Test timed out

Flags: needinfo?(fzia)
Pushed by elee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/29629d107135 https://hg.mozilla.org/integration/autoland/rev/1c39c19c9289 Update smartbar telemetry events r=urlbar-reviewers,ai-frontend-reviewers,Mardak,daisuke https://github.com/mozilla-firefox/firefox/commit/1799a1ec61ca https://hg.mozilla.org/integration/autoland/rev/a571cabdfb5b Add extra_key window to urlbar engagement telemetry r=urlbar-reviewers,ai-frontend-reviewers,daisuke,Mardak
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0bbd6507ad0f https://hg.mozilla.org/integration/autoland/rev/255933389dea Revert "Bug 2027637 - Add extra_key window to urlbar engagement telemetry r=urlbar-reviewers,ai-frontend-reviewers,daisuke,Mardak" for causing bc process crashes @ browser_aiwindow_smartbar_telemetry.js
Pushed by fzia@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/eba539b3ac58 https://hg.mozilla.org/integration/autoland/rev/0a2096561973 Update smartbar telemetry events r=urlbar-reviewers,ai-frontend-reviewers,Mardak,daisuke https://github.com/mozilla-firefox/firefox/commit/9e9afcad2e89 https://hg.mozilla.org/integration/autoland/rev/bcabbb26fe8e Add extra_key window to urlbar engagement telemetry r=urlbar-reviewers,ai-frontend-reviewers,daisuke,Mardak
Regressions: 2030034
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e4967a12f4d9 https://hg.mozilla.org/integration/autoland/rev/b5870abd15c2 Revert "Bug 2027637 - Add extra_key window to urlbar engagement telemetry r=urlbar-reviewers,ai-frontend-reviewers,daisuke,Mardak" for causing documentation failures
Pushed by fzia@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ebb9370546c5 https://hg.mozilla.org/integration/autoland/rev/3c465482a379 Update smartbar telemetry events r=urlbar-reviewers,ai-frontend-reviewers,Mardak,daisuke https://github.com/mozilla-firefox/firefox/commit/d9df5be17087 https://hg.mozilla.org/integration/autoland/rev/7bdee5ba7c96 Add extra_key window to urlbar engagement telemetry r=urlbar-reviewers,ai-frontend-reviewers,daisuke,Mardak
Regressions: 2030315
Status: NEW → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch

Needs QA from @rdoghi in Nightly Fx151 before uplifting to beta. The two Phabricator revisions associated with this bug also resolve bug 2028783.

Flags: needinfo?(fzia) → needinfo?(rdoghi)

Florian, I took a look at this patch while Rares is on PTO. It seems that with the latest Nightly 151.0a1 on macOS 26, the telemetry events that were problematic are triggered in about:glean. However, I have some questions that need clarification:

  1. For the chatSubmit event, I don't see the value added for memories, although I have memories saved in about:preferences#manageMemories, and they were mentioned a couple of times in the sidebar chat when using the AI. Do we need to have a value for memories as well?
  2. The chatSubmit event does not show information when searched from the URL bar under the "location" value. I can only see "fullpage" or "sidebar".
    e.g. { "chat_id": "9e79aae4-8928-4bdf-8607-4feaf4e0ed71", "detected_intent": "chat", "length": "18", "location": "sidebar", "mentions": "0", "message_seq": "0", "model": "Qwen3-235B-A22B-Instruct-2507", "submit_type": "enter", "tabs": "1" }
  3. As mentioned in comment 0, "Tabs preselected will not record 1, only if 2 or more are preselected, in which case for 2 tabs added it will show 1 preselected tab (not sure if it's OK; technically it's true if we already add 1 tab, 1 is already there preselected.)". Can you please confirm if this is expected? I can see this behavior on the latest Nightly.
  4. Also, from comment 0, "message_seq": does this count the user's prompts as well? For 1 user prompt and 1 response from the AI, it's counted as 2 message_seq. Can you tell us more about how this works? I can see "message_seq": "5" when chatting a bit with the AI.
Flags: needinfo?(fzia)

Thank you @cgeorgiu!

  1. Memories are being recorded as part of the chatSubmit event anymore and were removed from the list directly, but can be merged with the model_request telemetry.
  2. We did not add the location property to the existing urlbar implemetation and will be covered under bug 2024631. For the purpose of the Smart Window events we can correctly assume that a missing location extra_key means the event comes from the urlbar still.
  3. That is the correct behaviour.
  4. This is the correct behaviour as well: We are counting user and system prompts.
Flags: needinfo?(fzia)

[removed duplicate comment]

Regressions: 2030782

(In reply to Florian Zia [:flozia] from comment #18)

Thank you @cgeorgiu!

  1. Memories are being recorded as part of the chatSubmit event anymore and were removed from the list directly, but can be merged with the model_request telemetry.
  2. We did not add the location property to the existing urlbar implemetation and will be covered under bug 2024631. For the purpose of the Smart Window events we can correctly assume that a missing location extra_key means the event comes from the urlbar still.
  3. That is the correct behaviour.
  4. This is the correct behaviour as well: We are counting user and system prompts.

Thank you! I'm going to mark this issue verified as fixed on latest Nightly 151.0a1.

I’m also confirming the fix for Bug 2028783. The window_mode key for the urlbar.engagement and urlbar.abandonment events is now correctly displaying classic, private, and Smart Window when following the steps mentioned on Slack.

For urlbar.engagement:

  1. Open a window
  2. Click in the URL bar
  3. Type something: For example “test”
  4. Press Enter to navigate or select a result

For urlbar.abandonment:

  1. Open a window
  2. Click in the URL bar
  3. Type something
  4. Click away or press Escape without selecting anything
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: