Closed Bug 2034541 Opened 4 months ago Closed 2 months ago

Send user feedback payload via Glean

Categories

(Core :: Machine Learning: Frontend, task)

task

Tracking

()

VERIFIED FIXED
154 Branch
Tracking Status
firefox152 --- verified
firefox153 --- verified
firefox154 --- verified

People

(Reporter: jlevinsohn, Assigned: echa)

References

Details

(Whiteboard: [aiasst])

Attachments

(3 files, 2 obsolete files)

Instrument and send Smart Window user feedback data via Glean.

  • Feedback data is collected when user:

    • clicks thumbs up
    • clicks thumbs down
    • submits feedback from modal
  • Glean payload follows the structure defined in the feedback JSON spec

  • Glean configuration is defined appropriately (e.g. metrics.yaml and/or pings.yaml)

  • Data collection category is determined and documented

  • Required data review and approvals are completed prior to landing (if applicable)

  • Collection is only enabled when pref smartwindow.user_feedback_collection is enabled

  • Tests are added to validate telemetry collection

  • Instrumentation does not block feedback UI behavior

  • Collected data is validated post-landing to confirm expected payloads are received

Reference

Assignee: nobody → echa
Depends on: 2036194, 2036193
Attachment #9593235 - Attachment description: Bug 2034541 - Add chat log and Firefox metadata to smart_window_user_feedback_data metric r?pdahiya → Bug 2034541 - Add dedicated highly_sensitive metric for Smart Window feedback chat history r?pdahiya
Blocks: 2046201
Blocks: 2033002
Pushed by echa@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/103c7411199d https://hg.mozilla.org/integration/autoland/rev/0c2b48498683 Add dedicated highly_sensitive metric for Smart Window feedback chat history r=pdahiya,omc-reviewers,data-stewards,aminomancer

For QA, here are a few fields that require specific actions to populate:

toolUIData (requires a tab action)

  1. Ask Smart Window to close a tab.

  2. Submit feedback.

  3. Verify the assistant message associated with the tab action contains:

    • toolUIData.uiType
    • toolUIData.toolCallId

Page content toggle

  1. Ask Smart Window to summarize a page.
  2. Submit feedback with "Include page content" checked.
  3. Verify the recorded chat contains tool result messages (role: 3) with page content in content.body.result.

Repeat with "Include page content" unchecked:

  1. Ask Smart Window to summarize a page.
  2. Uncheck "Include page content" and submit feedback.
  3. Verify tool result messages (role: 3) are absent from the recorded chat.
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: If declined, Smart Window feedback reports will continue to omit the conversation history that led to the user's feedback. This limits our ability to understand reported issues, reproduce user-reported problems, and evaluate feedback in the context of the interaction that generated it.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Enable Smart Window and start a conversation.
    Ask Smart Window to summarize a webpage.
    Open the thumbs up or thumbs down feedback modal.
    Verify the chat preview is displayed.
    Submit feedback with Include page content checked.
    Verify the submitted telemetry contains the conversation history, including tool result messages (role: 3) containing page content.
    Repeat with Include page content unchecked.
    Verify tool result messages (role: 3) are excluded from the submitted conversation history.

Additional verification:
Ask Smart Window to perform a tab action (for example, close a tab).
Submit feedback.
Verify the associated assistant message contains toolUIData.uiType and toolUIData.toolCallId.

  • Risk associated with taking this patch: medium
  • Explanation of risk level: This patch adds a new telemetry metric and updates the Smart Window feedback flow to include conversation history in submitted feedback reports. It touches feedback UI, telemetry collection, and payload construction logic.
  • String changes made/needed?: no
  • Is Android affected?: unknown
Attachment #9600647 - Flags: approval-mozilla-beta?
Flags: qe-verify+

This patch adds a dedicated highly_sensitive microsurvey.smart_window.chat metric for the chat log and keeps the remaining feedback metadata in microsurvey.smart_window.user_feedback_data (technical). This separation allows the chat data to be handled independently and requires Sensitive Data Collection Review

Original Revision: https://phabricator.services.mozilla.com/D304565

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: If declined, Smart Window feedback reports will continue to omit the conversation history that led to the user's feedback. This limits our ability to understand reported issues, reproduce user-reported problems, and evaluate feedback in the context of the interaction that generated it.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Enable Smart Window and start a conversation.
    Ask Smart Window to summarize a webpage.
    Open the thumbs up or thumbs down feedback modal.
    Verify the chat preview is displayed.
    Submit feedback with Include page content checked.
    Verify the submitted telemetry contains the conversation history, including tool result messages (role: 3) containing page content.
    Repeat with Include page content unchecked.
    Verify tool result messages (role: 3) are excluded from the submitted conversation history.

Additional verification:
Ask Smart Window to perform a tab action (for example, close a tab).
Submit feedback.
Verify the associated assistant message contains toolUIData.uiType and toolUIData.toolCallId.

  • Risk associated with taking this patch: medium
  • Explanation of risk level: This patch adds a new telemetry metric and updates the Smart Window feedback flow to include conversation history in submitted feedback reports. It touches feedback UI, telemetry collection, and payload construction logic.
  • String changes made/needed?: no
  • Is Android affected?: unknown
Attachment #9600660 - Flags: approval-mozilla-release?

This patch adds a dedicated highly_sensitive microsurvey.smart_window.chat metric for the chat log and keeps the remaining feedback metadata in microsurvey.smart_window.user_feedback_data (technical). This separation allows the chat data to be handled independently and requires Sensitive Data Collection Review

Original Revision: https://phabricator.services.mozilla.com/D304565

QA Whiteboard: [uplift][qa-ver-needed-c154/b153]

I tried to verify this fix but after reaching about:glean and submitting a Microsurvey type of ping Im getting the following issues:

I am getting this error multiple times :
JSON_VALIDATION_ERROR_DEBUG_VIEW [{"keyword": "additionalProperties", "dataPath": ".ping_info", "schemaPath": "#/properties/ping_info/additionalProperties", "params":{"additionalProperty": "server_knobs_config"},"message": "should NOT have additional properties"}]

and for the Microsurvey ping I get this error:
"labeled_counter": {
"glean.error.invalid_value": {
"microsurvey.smart_window.chat": 1
}
},

Please also note that microsurvey.smart_window.user_feedback_data is left blank.
You can find my events here:
https://debug-ping-preview.firebaseapp.com/pings/raresTel
https://debug-ping-preview.firebaseapp.com/pings/raresTel/6f9f04d5-0113-4770-b64d-e2d28cfb1abe

Flags: needinfo?(echa)
Attachment #9600647 - Attachment is obsolete: true
Attachment #9600647 - Flags: approval-mozilla-beta?
Attachment #9600660 - Attachment is obsolete: true
Attachment #9600660 - Flags: approval-mozilla-release?
Regressions: 2050195

Thanks Rares! Seems there was a schema mismatch, which will be fixed with Bug 2050195
Also I can see microsurvey.smart_window.user_feedback_data being populated in your ping here? https://debug-ping-preview.firebaseapp.com/pings/raresTel/6f9f04d5-0113-4770-b64d-e2d28cfb1abe

"microsurvey.smart_window.user_feedback_data": { "metadata": { "model": "qwen3-235b-a22b-instruct-2507-maas", "turn_count": 4, "prompt_version": 7 }

Flags: needinfo?(echa)

Verified as fixed in our latest Nightly ID 20260625094708, Please note that we still get the following error every time we open or Close the Feedback modal:

messaging-System
JSON_VALIDATION_ERROR_DEBUG_VIEW [{"keyword": "additionalProperties", "dataPath": ".ping_info", "schemaPath": "#/properties/ping_info/additionalProperties", "params":{"additionalProperty": "server_knobs_config"},"message": "should NOT have additional properties"}]

QA Contact: rdoghi

This patch adds a dedicated highly_sensitive microsurvey.smart_window.chat metric for the chat log and keeps the remaining feedback metadata in microsurvey.smart_window.user_feedback_data (technical). This separation allows the chat data to be handled independently and requires Sensitive Data Collection Review

Original Revision: https://phabricator.services.mozilla.com/D304565

Attachment #9601476 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: If declined, Smart Window feedback reports will continue to omit the conversation history that led to the user's feedback. This limits our ability to understand reported issues, reproduce user-reported problems, and evaluate feedback in the context of the interaction that generated it.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Enable Smart Window and start a conversation.
    Ask Smart Window to summarize a webpage.
    Open the thumbs up or thumbs down feedback modal.
    Verify the chat preview is displayed.
    Submit feedback with Include page content checked.
    Verify the submitted telemetry contains the conversation history, including tool result messages (role: 3) containing page content.
    Repeat with Include page content unchecked.
    Verify tool result messages (role: 3) are excluded from the submitted conversation history.

Additional verification:
Ask Smart Window to perform a tab action (for example, close a tab).
Submit feedback.
Verify the associated assistant message contains toolUIData.uiType and toolUIData.toolCallId.

  • Risk associated with taking this patch: medium
  • Explanation of risk level: This patch adds a new telemetry metric and updates the Smart Window feedback flow to include conversation history in submitted feedback reports. It touches feedback UI, telemetry collection, and payload construction logic.
  • String changes made/needed?: no
  • Is Android affected?: unknown

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: If declined, Smart Window feedback reports will continue to omit the conversation history that led to the user's feedback. This limits our ability to understand reported issues, reproduce user-reported problems, and evaluate feedback in the context of the interaction that generated it.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Enable Smart Window and start a conversation.
    Ask Smart Window to summarize a webpage.
    Open the thumbs up or thumbs down feedback modal.
    Verify the chat preview is displayed.
    Submit feedback with Include page content checked.
    Verify the submitted telemetry contains the conversation history, including tool result messages (role: 3) containing page content.
    Repeat with Include page content unchecked.
    Verify tool result messages (role: 3) are excluded from the submitted conversation history.

Additional verification:
Ask Smart Window to perform a tab action (for example, close a tab).
Submit feedback.
Verify the associated assistant message contains toolUIData.uiType and toolUIData.toolCallId.

  • Risk associated with taking this patch: medium
  • Explanation of risk level: This patch adds a new telemetry metric and updates the Smart Window feedback flow to include conversation history in submitted feedback reports. It touches feedback UI, telemetry collection, and payload construction logic.
  • String changes made/needed?: no
  • Is Android affected?: unknown
Attachment #9601480 - Flags: approval-mozilla-release?

This patch adds a dedicated highly_sensitive microsurvey.smart_window.chat metric for the chat log and keeps the remaining feedback metadata in microsurvey.smart_window.user_feedback_data (technical). This separation allows the chat data to be handled independently and requires Sensitive Data Collection Review

Original Revision: https://phabricator.services.mozilla.com/D304565

Attachment #9601476 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Blocks: 2050630

Verified as fixed in our latest Beta Verified as fixed in our latest Beta 153.0b5

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-ver-needed-c154/b153] → [uplift][qa-ver-done-c154/b153]
Flags: qe-verify+
Flags: in-testsuite+
Attachment #9601480 - Flags: approval-mozilla-release? → approval-mozilla-release+

Verified as fixed in our latest Release 152.0.4

Regressions: 2059831
Blocks: 2059831
No longer regressions: 2059831
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: