Closed Bug 2081015 Opened 1 month ago Closed 20 days ago

Add an AI control for widget generation

Categories

(Firefox :: Widgets, task, P3)

task
Points:
2

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: fchasen, Assigned: nina-py)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [hnt][hnt-wattle])

Attachments

(4 external files)

No description provided.
Whiteboard: [hnt][hnt-wattle]
Points: --- → 2
Assignee: nobody → npypchenko
Status: NEW → ASSIGNED
Blocks: 2089914
Blocks: 2089915

Custom widgets have been added to AI Controls as a feature of their
own, with the pref browser.ai.control.generatedWidgets. Blocking it,
or blocking all AI, only sets the control pref, so the user stays in the
Firefox Labs feature. Installed widgets keep running, since
extensions.widgets.generated.enabled is left alone.

The feature only counts as allowed while the Labs pref is on, so AI
Controls treats it as unavailable for users outside Labs. Making the
feature available again never enrols anyone.

WidgetGenerator.generate() now stops with the new
GENERATION_ERRORS.BLOCKED code while custom widgets are blocked in
AI Controls. Without a signed-in Mozilla account it stops with AUTH,
so a guest can no longer create widgets. The block is checked before
the account, so a blocked user is never asked to sign in.

A block during generation stops it after the current model reply,
which is thrown away, so no further request reaches the server. The
developer endpoint pref still skips the account check, but not the
block.

The Widget Studio sidebar tool is hidden while custom widgets are
blocked, with its own block check in browser-sidebar.js, since
blocking no longer turns off browser.widgets.generated.enabled.

The AIControls policy has a new CustomWidgets key for the control
pref browser.ai.control.generatedWidgets, which follows Default
like the other features.

As with Smart Window, "available" leaves the feature's own switch,
browser.widgets.generated.enabled, alone: users opt in through
Firefox Labs. "blocked" only sets the control pref, locked if the
policy is, which is enough to refuse generation and hide the Widget
Studio panel.

AI Controls has a new "Custom widgets" group beneath the sidebar
chatbot, with one row offering Available, Enabled and Blocked. The group
only shows while browser.widgets.generated.enabled is on, even with
the aiControlsShowUnavailable debug pref set, and the "Block AI
enhancements" dialog lists custom widgets only for those users. A user
in Labs reads "Enabled" until they choose "Available" or block it.

The strings are in browser/locales-preview/widgets.ftl until the copy
is confirmed, and the "Learn more" link points at the AI Controls
support article for now.

Attachment #9677561 - Attachment description: Bug 2081015 - Part 2: Refuse widget generation while blocked or signed out. r=fchasen! → Bug 2081015 - Part 2: Refuse widget generation while custom widgets are blocked. r=fchasen!
Pushed by npypchenko@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cdeb33f5dbc3 https://hg.mozilla.org/integration/autoland/rev/f43d8b011431 Part 1: Register custom widgets as an AI Controls feature. r=fchasen,settings-reviewers,omc-reviewers,tgiles,sachung https://github.com/mozilla-firefox/firefox/commit/baacdc9eb9f1 https://hg.mozilla.org/integration/autoland/rev/dfbb0dc3d573 Part 2: Refuse widget generation while custom widgets are blocked. r=fchasen https://github.com/mozilla-firefox/firefox/commit/b5b5a755e7e7 https://hg.mozilla.org/integration/autoland/rev/b0785bee5c37 Part 3: Add custom widgets to the AIControls policy. r=fchasen,mkaply https://github.com/mozilla-firefox/firefox/commit/93d83f562e6c https://hg.mozilla.org/integration/autoland/rev/b61f0a8108fa Part 4: Add the custom widgets row to AI Controls. r=fchasen,fluent-reviewers,settings-reviewers,tgiles,flod
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: