Closed Bug 1922379 Opened 1 year ago Closed 1 year ago

[UX Follow] Add error message for when too many characters are selected before selecting a prompt

Categories

(Core :: Machine Learning: General, enhancement, P1)

Desktop
Windows
enhancement
Points:
5

Tracking

()

VERIFIED FIXED
135 Branch
Tracking Status
firefox133 --- wontfix
firefox134 --- wontfix
firefox135 --- verified

People

(Reporter: epang, Assigned: ngrato)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [genai])

Attachments

(1 file)

We currently truncate what is sent to the provider (different limits for each provider) without letting the user know.
An error message needs to be added so that the user is aware that only a portion of their selected text will be sent to the prompt.

See UX spec here

Blocks: 1922413
Whiteboard: [genai]

new strings and styling for conditionally showing message based on provider and selection. some logic probably will be approximated similar to bug 1903900 especially with custom prompt could reduce how much selection is sent (custom prompt could be much longer than selection)

Points: --- → 5
See Also: → 1903900
Priority: -- → P1
Keywords: access, stalled

Use moz-message-bar warning to conditionally show long selection warning.

Assignee: nobody → ngrato

the strings we want are updated in the figma from comment 0:

[Provider] won’t get your full selection
You’ve selected about [NNNNN] characters. But, we can only send about [NNNNN] characters to [Provider].

Attachment #9431413 - Attachment description: WIP: Bug 1922379 - Add error message for when too many characters are selected before selecting a prompt → Bug 1922379 - Add error message for when too many characters are selected before selecting a prompt r=Mardak!

would be good to add glean/telemetry for when we show the message but can also split out to a separate patch/bug

we have existing telemetry for when we show prompts:
https://searchfox.org/mozilla-central/rev/53e8dfd81c32f1ab275516406ec06a68136aaef0/browser/components/genai/metrics.yaml#431-449
https://searchfox.org/mozilla-central/rev/53e8dfd81c32f1ab275516406ec06a68136aaef0/browser/components/genai/GenAI.sys.mjs#512-513

so maybe we can add an extra_key entry bool indicating the message was shown

Pushed by elee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/948ae9cdc704 Add error message for when too many characters are selected before selecting a prompt r=Mardak,fluent-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,bolsson,firefox-ai-ml-reviewers,emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

Verified as fixed in our latest Nightly build 135.0a1 (2024-12-10).

Status: RESOLVED → VERIFIED
Blocks: 1980228
See Also: → 1994586
See Also: → 2041178
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: