Landings for Stack Containing D290761

Successfully landed

Landing requested on , by ogonzalez@mozilla.com.

Landing Job: 34069

Revisions: D290761 diff 1240286

Last update:

Result: 64e3234760d2e0d8d68cc4c3bf713a32cb7cf256 on firefox-autoland@autoland (git)

Links: Treeherder

Successfully landed

Landing requested on , by elee@mozilla.com.

Landing Job: 33904

Revisions: D290761 diff 1239707

Last update:

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

Links: Treeherder

Failed to land

Landing requested on , by ogonzalez@mozilla.com.

Landing Job: 33603

Revisions: D290761 diff 1238126

While applying revision D290761 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/modules/AIWindowTabStatesManager.sys.mjs @ 03f494dad321c38f7a134dafabed6d79a577b2a0
  • diff a/browser/components/aiwindow/ui/modules/AIWindowTabStatesManager.sys.mjs b/browser/components/aiwindow/ui/modules/AIWindowTabStatesManager.sys.mjs	(rejected hunks)
    @@ -709,23 +709,38 @@
    ...
    
    diff a/browser/components/aiwindow/ui/modules/AIWindowTabStatesManager.sys.mjs b/browser/components/aiwindow/ui/modules/AIWindowTabStatesManager.sys.mjs	(rejected hunks)
    @@ -709,23 +709,38 @@
             const tab = this.#window.gBrowser.getTabForBrowser(browser);
             let tabState = this.#tabStates.get(tab);
     
             lazy.AIWindowUI.updateStarterPrompts(this.#window);
     
    -        if (!tabState || !tabState?.state?.conversationId) {
    +        if (!tabState || !tabState.state?.conversationId) {
               return;
             }
     
    +        // If the new URL is going away from fullpage mode
             const isAiWindowUrl = locationURI.spec === lazy.AIWINDOW_URL;
    -        const isSidebarOpen = lazy.AIWindowUI.isSidebarOpen(this.#window);
    -        const isFullPageMode = tabState.state.mode === "fullpage";
    -        const shouldKeepSidebarOpen = tabState.state.keepSidebarOpen ?? true;
     
             if (!isAiWindowUrl) {
               lazy.SmartWindowTelemetry.recordUriLoad();
    +
    +          // The user has navigated away from the fullpage mode, record that
    +          // this event has happened, at which point we should start to
    +          // track/use whether the user has closed/opened the sidebar. If
    +          // The user has not navigated away from the fullpage mode then the
    +          // sidebar should always default to staying open. This property
    +          // should only ever be set here, and should only ever be set to true.
    +          tabState = this.#tabStates.get(tab, { hasNavigated: true });
             }
     
    +        const isSidebarOpen = lazy.AIWindowUI.isSidebarOpen(this.#window);
    +        const isFullPageMode = tabState.state.mode === "fullpage";
    +
    +        // keepSidebarOpen should only take effect if the user has already
    +        // navigated away from fullpage window once.
    +        const shouldKeepSidebarOpen =
    +          (tabState.state.hasNavigated && tabState.state.keepSidebarOpen) ??
    +          true;
    +
             if (isFullPageMode && isAiWindowUrl && isSidebarOpen) {
               lazy.AIWindowUI.closeSidebar(this.#window);
             } else if (
               isFullPageMode &&
               !isAiWindowUrl &&
    
    in addition, Git reported this error: while searching for:
            const tab = this.#window.gBrowser.getTabForBrowser(browser);
            let tabState = this.#tabStates.get(tab);
    
            lazy.AIWindowUI.updateStarterPrompts(this.#window);
    
            if (!tabState || !tabState?.state?.conversationId) {
              return;
            }
    
            const isAiWindowUrl = locationURI.spec === lazy.AIWINDOW_URL;
            const isSidebarOpen = lazy.AIWindowUI.isSidebarOpen(this.#window);
            const isFullPageMode = tabState.state.mode === "fullpage";
            const shouldKeepSidebarOpen = tabState.state.keepSidebarOpen ?? true;
    
            if (!isAiWindowUrl) {
              lazy.SmartWindowTelemetry.recordUriLoad();
            }
    
            if (isFullPageMode && isAiWindowUrl && isSidebarOpen) {
              lazy.AIWindowUI.closeSidebar(this.#window);
            } else if (
              isFullPageMode &&
              !isAiWindowUrl &&
    
    

Last update:

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

Checking patch browser/components/aiwindow/ui/test/browser/browser_smartwindow_tab_switching.js...
Checking patch browser/components/aiwindow/ui/modules/AIWindowTabStatesManager.sys.mjs...
error: while searching for:
        const tab = this.#window.gBrowser.getTabForBrowser(browser);
        let tabState = this.#tabStates.get(tab);

        lazy.AIWindowUI.updateStarterPrompts(this.#window);

        if (!tabState || !tabState?.state?.conversationId) {
          return;
        }

        const isAiWindowUrl = locationURI.spec === lazy.AIWINDOW_URL;
        const isSidebarOpen = lazy.AIWindowUI.isSidebarOpen(this.#window);
        const isFullPageMode = tabState.state.mode === "fullpage";
        const shouldKeepSidebarOpen = tabState.state.keepSidebarOpen ?? true;

        if (!isAiWindowUrl) {
          lazy.SmartWindowTelemetry.recordUriLoad();
        }

        if (isFullPageMode && isAiWindowUrl && isSidebarOpen) {
          lazy.AIWindowUI.closeSidebar(this.#window);
        } else if (
          isFullPageMode &&
          !isAiWindowUrl &&

error: patch failed: browser/components/aiwindow/ui/modules/AIWindowTabStatesManager.sys.mjs:709
Applied patch browser/components/aiwindow/ui/test/browser/browser_smartwindow_tab_switching.js cleanly.
Applying patch browser/components/aiwindow/ui/modules/AIWindowTabStatesManager.sys.mjs with 1 reject...
Rejected hunk #1.

Uplifts

Uplift assessments for bug 2024781

Assessment #1807

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

User impact: Sidebar discoverability is vital for initial release of Smart Window, it is intended that it defaults to open when navigating to a site form full page mode. This patch fixes an issue where the... Risk: Low

Show all answers
User impact if declined/Reason for urgency Sidebar discoverability is vital for initial release of Smart Window, it is intended that it defaults to open when navigating to a site form full page mode. This patch fixes an issue where the Smart Window sidebar doesn't default to open in scenarios where the sidebar was opened in an initial tab and then a second tab is opened (fullpage mode) and then the user navigates (should default to opening sidebar). Additionally, this patch carries a change that will fix another uplift request for Bug 2026191
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 site in initial tab (sidebar should open) 3. Open a second tab 4. Navigate to another site in the second tab (sidebar should open for this tab as well)
Risk associated with taking this patch Low
Explanation of risk level Changes for this should only affect the sidebar state management in Smart Window.
String changes made/needed? None
Is Android affected? No
Train Stack tip Status
firefox-beta D292024 Created by Lando View job

Stack containing revision D290761

Land Bug Status Revision Reviewers
2024781
Blocked
Revision is closed.
Closed
D290761: Bug 2024781 - sidebar should default to open on all tabs going from fullpage mode to sidebar mode r=#ai-frontend-reviewers
  • @ai-frontend-reviewers-rotation accepted a prior diff
  • @echa accepted a prior diff