Landings for Stack Containing D290290

Successfully landed

Landing requested on , by elee@mozilla.com.

Landing Job: 33656

Revisions: D290290 diff 1238473

Last update:

Result: d0f8acfbc6776bcd676ea5c3289c19ead807d114 on firefox-autoland@autoland (git)

Links: Treeherder

Failed to land

Landing requested on , by elee@mozilla.com.

Landing Job: 33655

Revisions: D290290 diff 1238457

While applying revision D290290 to firefox-autoland, the following files had conflicts:

(Hint: try rebasing your changes on the latest commits from firefox-autoland and re-submitting.)

  • browser/components/aiwindow/ui/components/ai-window/ai-window.mjs @ 3240cbf16fa864221839d7f9a035e9929cf6d465
  • diff a/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs b/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs	(rejected hunks)
    @@ -599,10 +599,12 @@
    ...
    
    diff a/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs b/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs	(rejected hunks)
    @@ -599,10 +599,12 @@
           this.#continueAfterToolResult();
         }
       }
     
       async firstUpdated() {
    +    const selectedTab = this.#getCurrentTab();
    +
         // Create a real XUL <browser> element from the chrome document
         const doc = this.ownerDocument; // browser.xhtml
         const browser = doc.createXULElement("browser");
     
         browser.setAttribute("id", "aichat-browser");
    @@ -1641,11 +1660,11 @@
         // Hide chat-active state
         this.#setBrowserContainerActiveState(false);
     
         this.showStarters = false;
     
    -    this.loadStarterPrompts();
    +    this.loadStarterPrompts(false, selectedTab);
       }
     
       showSearchingIndicator(isSearching, searchQuery) {
         this.#dispatchMessageToChatContent({
           role: "loading",
    
    in addition, Git reported this error: while searching for:
        // Hide chat-active state
        this.#setBrowserContainerActiveState(false);
    
        this.showStarters = false;
    
        this.loadStarterPrompts();
      }
    
      showSearchingIndicator(isSearching, searchQuery) {
        this.#dispatchMessageToChatContent({
          role: "loading",
    
    
  • browser/components/aiwindow/ui/components/ai-window/ai-window.mjs @ 3240cbf16fa864221839d7f9a035e9929cf6d465
  • diff a/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs b/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs	(rejected hunks)
    @@ -599,10 +599,12 @@
    ...
    
    diff a/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs b/browser/components/aiwindow/ui/components/ai-window/ai-window.mjs	(rejected hunks)
    @@ -599,10 +599,12 @@
           this.#continueAfterToolResult();
         }
       }
     
       async firstUpdated() {
    +    const selectedTab = this.#getCurrentTab();
    +
         // Create a real XUL <browser> element from the chrome document
         const doc = this.ownerDocument; // browser.xhtml
         const browser = doc.createXULElement("browser");
     
         browser.setAttribute("id", "aichat-browser");
    @@ -1641,11 +1660,11 @@
         // Hide chat-active state
         this.#setBrowserContainerActiveState(false);
     
         this.showStarters = false;
     
    -    this.loadStarterPrompts();
    +    this.loadStarterPrompts(false, selectedTab);
       }
     
       showSearchingIndicator(isSearching, searchQuery) {
         this.#dispatchMessageToChatContent({
           role: "loading",
    
    in addition, Git reported this error: while searching for:
        // Hide chat-active state
        this.#setBrowserContainerActiveState(false);
    
        this.showStarters = false;
    
        this.loadStarterPrompts();
      }
    
      showSearchingIndicator(isSearching, searchQuery) {
        this.#dispatchMessageToChatContent({
          role: "loading",
    
    

Last update:

Raw error output:
Problem while applying patch in revision 290290:

Checking patch browser/components/aiwindow/ui/test/browser/head.js...
Checking patch browser/components/aiwindow/ui/test/browser/browser_smartwindow_prompts.js...
Checking patch browser/components/aiwindow/ui/modules/AIWindowUI.sys.mjs...
Checking patch browser/components/aiwindow/ui/components/ai-window/ai-window.mjs...
error: while searching for:
      this.#continueAfterToolResult();
    }
  }

  async firstUpdated() {
    // Create a real XUL <browser> element from the chrome document
    const doc = this.ownerDocument; // browser.xhtml
    const browser = doc.createXULElement("browser");

    browser.setAttribute("id", "aichat-browser");

error: patch failed: browser/components/aiwindow/ui/components/ai-window/ai-window.mjs:599
Hunk #2 succeeded at 649 (offset 24 lines).
Hunk #3 succeeded at 666 (offset 24 lines).
Hunk #4 succeeded at 688 (offset 24 lines).
Hunk #5 succeeded at 737 (offset 24 lines).
Hunk #6 succeeded at 1651 (offset 32 lines).
error: while searching for:
    // Hide chat-active state
    this.#setBrowserContainerActiveState(false);

    this.showStarters = false;

    this.loadStarterPrompts();
  }

  showSearchingIndicator(isSearching, searchQuery) {
    this.#dispatchMessageToChatContent({
      role: "loading",

error: patch failed: browser/components/aiwindow/ui/components/ai-window/ai-window.mjs:1641
Applied patch browser/components/aiwindow/ui/test/browser/head.js cleanly.
Applied patch browser/components/aiwindow/ui/test/browser/browser_smartwindow_prompts.js cleanly.
Applied patch browser/components/aiwindow/ui/modules/AIWindowUI.sys.mjs cleanly.
Applying patch browser/components/aiwindow/ui/components/ai-window/ai-window.mjs with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Rejected hunk #7.

Uplifts

Uplift assessments for bug 2026191

Assessment #1808

, by ogonzalez@mozilla.com. Requested for uplift from D290290

User impact: Starter prompt generation is triggered when a tab is focused, but if a user switches tabs before the LLM backend returns a response the starter prompts were being loaded into the wrong tab. This... Risk: Low

Show all answers
User impact if declined/Reason for urgency Starter prompt generation is triggered when a tab is focused, but if a user switches tabs before the LLM backend returns a response the starter prompts were being loaded into the wrong tab. This could also cause unintended tab context to then be used if a user clicked on one of the starters prompts meant for a different tab. The patch provides the request context of which tab was in focus when starter prompts were triggered so that when the response is received we can check if the same tab is still in focus before applying the starter prompts to the sidebar. This uplift depends on a fix in Bug 2024781 which was uplifted here: https://lando.moz.tools/uplift/jobs/1484/
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 2. Navigate to a website, some starter prompts should appear for the empty conversation in the sidebar 3. Open a second tab 4. Navigate to a different site in the second tab, some starter prompts should now appear for the second site in the second tab 5. Click on Tab 1, and quickly before starter prompts appear for Tab 1 click back to Tab 2 6. Tab 2 coming into focus will trigger new starter prompts, when they appear they should always be contextual to the actual tab in focus, not Tab 1.
Risk associated with taking this patch Low
Explanation of risk level Risk should be low, changes only affect LLM backend responses for the starter prompts in the Smart Window
String changes made/needed? None.
Is Android affected? No
Train Stack tip Status
firefox-beta — Failed View job
Raw error output:
Aborting, could not apply patch buffer for 290290.
Error running git command; sanitised_command=['git', 'cherry-pick', 'd0f8acfbc6776bcd676ea5c3289c19ead807d114'], path='/files/repos/firefox-beta', error: could not apply d0f8acfbc677... Bug 2026191 - guard starter prompts from loading into wrong tab r=ai-frontend-reviewers,Mardak
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

To manually resolve conflicts and submit your uplift:

git fetch origin
git switch -c uplift-firefox-beta-D290290 origin/beta
git cherry-pick d0f8acfbc6776bcd676ea5c3289c19ead807d114
moz-phab uplift --train firefox-beta --assessment-id 1808

Run these commands from your Firefox checkout. Resolve any merge conflicts during the patch application process, then submit with moz-phab uplift.

Note: These commands assume your official Firefox remote is named origin. If you use a different remote name, adjust the commands accordingly.

D292032 Submitted with moz-phab

Stack containing revision D290290

Land Bug Status Revision Reviewers
2026191
Blocked
Revision is closed.
Closed
D290290: Bug 2026191 - guard starter prompts from loading into wrong tab r=#ai-frontend-reviewers
  • @ai-frontend-reviewers-rotation accepted a prior diff
  • @Mardak accepted a prior diff