diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 1026474bb1bc026987be01a8c18fa0927cb911bc..60294e0587147d86ace8e6d6985d8c6eae8248b6 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -34,6 +34,7 @@ ChromeUtils.defineESModuleGetters(this, {
     "resource://gre/modules/ContextualIdentityService.sys.mjs",
   CustomizableUI:
     "moz-src:///browser/components/customizableui/CustomizableUI.sys.mjs",
+  ZenCustomizableUI: "resource:///modules/ZenCustomizableUI.sys.mjs",
   DevToolsSocketStatus:
     "resource://devtools/shared/security/DevToolsSocketStatus.sys.mjs",
   DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
@@ -816,7 +817,12 @@ function UpdateBackForwardCommands(aWebNavigation) {
 
   var backDisabled = backCommand.hasAttribute("disabled");
   var forwardDisabled = forwardCommand.hasAttribute("disabled");
-  if (backDisabled == aWebNavigation.canGoBack) {
+  var canGoBack = aWebNavigation.canGoBack;
+  if (!canGoBack) {
+    canGoBack = gZenCommonActions.shouldCloseTabOnBack();
+  }
+  
+  if (backDisabled == canGoBack) {
     if (backDisabled) {
       backCommand.removeAttribute("disabled");
     } else {
@@ -3719,7 +3725,7 @@ function warnAboutClosingWindow() {
 
   if (!isPBWindow && !toolbar.visible) {
     return gBrowser.warnAboutClosingTabs(
-      gBrowser.openTabs.length,
+      gBrowser.visibleTabs.filter(t => t.getAttribute("pending")!=="true").length,
       gBrowser.closingTabsEnum.ALL
     );
   }
@@ -3759,7 +3765,7 @@ function warnAboutClosingWindow() {
     return (
       isPBWindow ||
       gBrowser.warnAboutClosingTabs(
-        gBrowser.openTabs.length,
+        gBrowser.visibleTabs.filter(t => t.getAttribute("pending")!=="true").length,
         gBrowser.closingTabsEnum.ALL
       )
     );
@@ -3784,7 +3790,7 @@ function warnAboutClosingWindow() {
     AppConstants.platform != "macosx" ||
     isPBWindow ||
     gBrowser.warnAboutClosingTabs(
-      gBrowser.openTabs.length,
+      gBrowser.visibleTabs.filter(t => t.getAttribute("pending")!=="true").length,
       gBrowser.closingTabsEnum.ALL
     )
   );
@@ -4744,6 +4750,16 @@ var ConfirmationHint = {
     }
 
     document.l10n.setAttributes(this._message, messageId, l10nArgs);
+    if (window.gZenUIManager?.showToast) {
+      return window.gZenUIManager.showToast(messageId, {
+        hideCheckmark,
+        descriptionId,
+        l10nArgs,
+        showDescription,
+        position,
+        event,
+      });
+    }
     if (descriptionId) {
       document.l10n.setAttributes(this._description, descriptionId);
       this._description.hidden = false;
