Open Bug 1922379 Opened 2 months ago Updated 19 days ago

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

Categories

(Core :: Machine Learning, enhancement, P1)

Desktop
Windows
enhancement
Points:
5

Tracking

()

Tracking Status
firefox133 --- affected

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

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: