fetching ai response inconsistently checks adjacent tab at various times
Categories
(Core :: Machine Learning: Frontend, defect)
Tracking
()
People
(Reporter: Mardak, Assigned: omarg)
References
(Blocks 1 open bug)
Details
(Whiteboard: [genai][chat])
Attachments
(2 files)
|
Bug 2022050 - normalize current tab url querying for chat and context chips r=#ai-frontend-reviewers
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
we might end up sending/saving the wrong tab/page information
bug 2012536 gets the current page when fetching ai response
whereas bug 2011266 populates context chips with the current tab
we probably want to unify on one as the source of truth not dependent on the specific timing of when we fetch or for other uses like for bug 2015919
Updated•2 months ago
|
Comment 1•2 months ago
|
||
To be clear this can lead to the LLM summarizing the wrong tab / being given information the user did not expect the LLM to have.
Updated•2 months ago
|
Backed out for causing bc failures at browser_smartwindow_context_url.js
Backout link
Push with failures
Failure log(s)
Failure log(s)
Fixed a test that needed more updates.
Fixed some window leaks from unresolved async calls in browser_smartwindow_context_url.js
Comment 9•2 months ago
|
||
[Tracking Requested - why for this release]:
Required for Smart Window Feature Fx150 MVP launch.
Comment 10•2 months ago
|
||
NI @rdoghi to help QA in Nightly Fx151 before uplifting to beta @Omar will be great if you can add test steps in bug or patch for fix verification thanks!
| Assignee | ||
Comment 11•2 months ago
|
||
I'm not sure how to best verify this from the interface side.
The bug was to ensure that all LLM requests that are triggered from a user's prompt always reference the currently selected tab as was selected at the time of prompting.
Before the changes different parts of the code would directly access the browser's selected tab, which could potentially change after submitting the user prompt.
I suppose the only thing that would potentially surface to the interface was if the conversation response from the LLM referenced an incorrect tab, but I don't have reliable way to reproduce that.
Updated•2 months ago
|
Comment 12•2 months ago
|
||
Hi, I tried to reproduce this issue but without success, all I can say is that in our latest builds the correct tab is being summarized even though I tried switching tabs between submitting a prompt, each time the current active tab was summarized. Im not sure if I should mark this Verified since I wasnt able to reproduce this issue to begin with but maybe somebody else can close it. Based on our latest builds this issue is Verified as fixed.
Comment 13•2 months ago
|
||
The patch landed in nightly and beta is affected.
:omarg, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox150towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 14•2 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D288576
Updated•2 months ago
|
Comment 15•2 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Potential to submit wrong tab data during a conversation, which could expose private data the user did not intend to submit to an LLM backend in the course of a Smart Window chat conversation.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: 1. Open Smart Window
- Navigate to a URL
- Open a second tab, navigate to a different URL
- Start a conversation in the tab on the second site, asking it to summarize the page or something that would respond using context of the current page
- Immediately after pressing Enter try switching to the first tab
- Switch back to the second tab where the conversation was started
- The summary should always be based on the tab/site adjacent to the chat when the tab is chosen
Note: This was an edge case that was hard to replicate in UI, but a possibility based on the code implementation. The patch removes accessing the selectedTab's URL at various points in the lifetime of an LLM prompt, making sure it only takes the selectedTab's URL when the prompt is submitted by the user.
- Risk associated with taking this patch: low
- Explanation of risk level: Does not affect the user experience of chat. Does not change the underlying integrations with the LLM backend, just reduces times the LLM response cycle tries to access the selectedTab's URL to one, at prompt submission.
- String changes made/needed?: None.
- Is Android affected?: no
Updated•2 months ago
|
Updated•2 months ago
|
Comment 16•2 months ago
|
||
| uplift | ||
Updated•2 months ago
|
Comment 17•2 months ago
|
||
Verified as fixed in our latest BEta 150.0b4 and our latest Nightly build 151.0a1 (2026-03-30)
Description
•