Closed Bug 1970975 Opened 2 months ago Closed 2 months ago

complete onboarding by running the originally triggered prompt, e.g., summarize page

Categories

(Core :: Machine Learning, enhancement)

enhancement
Points:
3

Tracking

()

VERIFIED FIXED
142 Branch
Tracking Status
firefox-esr140 --- disabled
firefox140 --- disabled
firefox141 --- verified
firefox142 --- verified

People

(Reporter: Mardak, Assigned: Mardak)

References

(Blocks 1 open bug)

Details

(Whiteboard: [genai])

Attachments

(1 file, 1 obsolete file)

various entrypoints like bug 1969292 and bug 1970682 want to run summarize of the original page after selecting a provider. we might need to support any prompt if we end up always showing the text selection to match the behavior of bug 1970686

currently handleAskChat assumes it's called when a provider is configured, so maybe it should somehow save the prompt and context although that could get tricky as the sidebar can stay open without the user selecting a provider right away and perhaps closes the original tab

https://searchfox.org/mozilla-central/rev/6dc5dffd0ee7ba8173f3e478ef2ec487940bdce4/browser/components/genai/GenAI.sys.mjs#800,816,841,845

See Also: → 1970978
See Also: → 1972778

maybe we short circuit in handleAskChat when no provider is selected and stash the promptObj and context on the sidebar contentWindow, so when onboarding finishes, we re-call handleAskChat

or similarly, contentWindow.onOnboardingComplete = () => this.handleAskChat(promptObj, context) and from chat.js probably from AWFinish window.onOnboardingComplete?.() https://searchfox.org/mozilla-central/rev/d52edf7ea4236446e118a2edc815023c5479663f/browser/components/genai/chat.js#413

Refactor page summarization from chat.js and expose onboarding promise to wait if no provider. Allow actor to register for provider-less use cases.

Assignee: nobody → edilee
Status: NEW → ASSIGNED
Pushed by elee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/91fe38ccd932 https://hg.mozilla.org/integration/autoland/rev/1e640d57fcd2 complete onboarding by running the originally triggered prompt, e.g., summarize page r=yjamora,firefox-ai-ml-reviewers
Blocks: 1974182
Blocks: 1974185
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Duplicate of this bug: 1972778
Blocks: 1972779

This issue is verified a fixed in our latest Nightly 142.0a1 (2025-06-29)

Refactor page summarization from chat.js and expose onboarding promise to wait if no provider. Allow actor to register for provider-less use cases and show menu entry with appropriate copy and badging.

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

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

firefox-beta Uplift Approval Request

  • User impact if declined: non-chatbot users would be unable to use page summarization experiment
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: 1. enable feature with browser.ml.chat.page 2. open page context menu and select summarize page
  • Risk associated with taking this patch: low
  • Explanation of risk level: feature behind an experiment pref with slight js refactoring of functionality originally verified in nightly 141
  • String changes made/needed: none
  • Is Android affected?: no
Flags: qe-verify+
QA Whiteboard: [uplift] [qa-ver-needed-c142/b141]
QA Contact: rdoghi
Attachment #9497665 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9497665 - Flags: approval-mozilla-beta+ → approval-mozilla-beta?
Attachment #9497665 - Attachment is obsolete: true
Attachment #9497665 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

Verified as fixed in our latest Beta 141.0b5

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift] [qa-ver-needed-c142/b141] → [uplift] [qa-ver-done-c142/b141]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: