Open Bug 1959650 Opened 10 days ago Updated 6 days ago

Ai chat in sidebar sometimes copies the wrong `<tabTitle>` into the prompt

Categories

(Core :: Machine Learning, defect, P1)

Firefox 139
defect
Points:
2

Tracking

()

Tracking Status
firefox139 --- affected

People

(Reporter: omansfeld, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [genai])

This has happened before but went away after updating my nightly, so I assumed it was fixed. Happened again today, my nightly is 2 builds behind I think (I last updated yesterday at ~11am CEST).

How to reproduce

So far I haven't found a way to reliably get my nightly into a state where this happens, but it happens every now and then and then stays until I restart/update. The following is for producing the behavior when already in that state.

  1. Highlight some text on a site, I used this site and highlighted "Bugs and feature requests for Firefox Sidebar" up top next to the component selection.
  2. Hover the chatbot icon that pops up
  3. Choose any of the options that leads to creating a prompt (it happens for all of them, "Summarize", "Explain", custom text, etc.)

What happens

The wrong text is pasted into the <tabTitle></tabTitle> section. E.g. at first:

I’m on page “<tabTitle>Running Tests from the Web — web-platform-tests documentation</tabTitle>” with “<selection>Bugs and feature requests for Firefox Sidebar</selection>” selected.
That's from another tab I had open (in another tab group, but same tab container). It keeps this behavior after reloading both tabs.

After closing the other tab:

I’m on page “<tabTitle></tabTitle>” with “<selection>Bugs and feature requests for Firefox Sidebar</selection>” selected.

After restarting nightly it works again:

I’m on page “<tabTitle>Enter Bug: Firefox</tabTitle>” with “<selection>Bugs and feature requests for Firefox Sidebar</selection>” selected.

But starts to display the wrong tabTitle again after some time. As I said I haven't been able to figure out what triggers that.

Info

Build: 139.0a1 (2025-04-09) (aarch64)
OS: MacOS 15.4
Using tab groups + vertical tabs + tab containers if that's relevant.

Not sure if this is the right component or if it belongs to the AI team, but I guessed since it's probably a bug in the way we're sending data to the sidebar it belongs here.

This sounds like something the AI team should look at, so I'll move it to their component.

Component: Sidebar → Machine Learning
Product: Firefox → Core
Duplicate of this bug: 1959404

To answer the question that you asked the other bug-author in Bug 1959404: It only fills in the wrong title, the selection is correct for me. It fills in the same title on all pages no matter the selection as long as it's happening. Then when I restart nightly it's working again until at some point randomly another title becomes "permanent".

(it happens for all of them, "Summarize", "Explain", custom text, etc.

i'm guessing the prompt and selection update while title doesn't both when it gives the wrong title and empty title after closing the other tab

do you see anything in the error console if you search for "genai" when it starts happening?

I'm assuming you mean the 'browser console' under three-line-menu > more tools > browser console? If so that one is not showing anything that seems relevant. Should I do a log or something? If so what are the logging settings that you'd need?

Edit: And yes, both the selection and the type of prompt update, just not the title.

Blocks: 1922413
Severity: -- → S3
Points: --- → 2
Priority: -- → P1
Whiteboard: [genai]
You need to log in before you can comment on or make changes to this bug.