From 536fe327ad59aa5df9a5d649752fd2a4f4486a64 Mon Sep 17 00:00:00 2001 From: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com> Date: Fri, 17 May 2024 14:04:08 -0400 Subject: [PATCH 1/4] [AC-2514] Added copy for SM trial organizations subscription page (#9012) * Added copy for SM trial organizations to contact customer support * Only show copy if on sm-standalone discount --- .../organization-subscription-cloud.component.html | 8 ++++++++ apps/web/src/locales/en/messages.json | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html index 5a71e353d7..e050253fc6 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html @@ -142,6 +142,14 @@

{{ "manageSubscription" | i18n }}

+

+ {{ "smStandaloneTrialSeatCountUpdateMessageFragment1" | i18n }} + {{ "passwordManager" | i18n }} + {{ "smStandaloneTrialSeatCountUpdateMessageFragment2" | i18n }} + {{ "contactSupportShort" | i18n }}. + +

{{ subscriptionDesc }}

Date: Fri, 17 May 2024 14:14:46 -0400 Subject: [PATCH 2/4] Only showing PM subscription adjustment form if the user is a PM user (#9011) --- ...nization-subscription-cloud.component.html | 60 +++++++++++-------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html index e050253fc6..25ac3a7a15 100644 --- a/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html +++ b/apps/web/src/app/billing/organizations/organization-subscription-cloud.component.html @@ -153,7 +153,11 @@

{{ subscriptionDesc }}

{{ "passwordManager" | i18n }}

@@ -176,32 +180,36 @@ > {{ "removeSponsorship" | i18n }} -

{{ "storage" | i18n }}

-

- {{ "subscriptionStorage" | i18n: sub.maxStorageGb || 0 : sub.storageName || "0 MB" }} -

- - -
-
- - + +

{{ "storage" | i18n }}

+

+ {{ "subscriptionStorage" | i18n: sub.maxStorageGb || 0 : sub.storageName || "0 MB" }} +

+ + +
+
+ + +
-
+

{{ "secretsManager" | i18n }}

From 7d29b3be13974e0bb620c121119fe23f065889ad Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 17 May 2024 14:47:21 -0400 Subject: [PATCH 3/4] Wait for account to switch before proceeding (#9229) --- apps/browser/src/background/main.background.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index e77203f83e..ae5f5bf589 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -1214,7 +1214,22 @@ export default class MainBackground { ); // can be removed once password generation history is migrated to state providers await this.stateService.clearDecryptedData(currentlyActiveAccount); + // HACK to ensure account is switched before proceeding + const switchPromise = firstValueFrom( + this.accountService.activeAccount$.pipe( + filter((account) => (account?.id ?? null) === (userId ?? null)), + timeout({ + first: 1_000, + with: () => { + throw new Error( + "The account switch process did not complete in a reasonable amount of time.", + ); + }, + }), + ), + ); await this.accountService.switchAccount(userId); + await switchPromise; // Clear sequentialized caches clearCaches(); From 82d98b8ff1895038b884c16f3e4aee3f894c71ce Mon Sep 17 00:00:00 2001 From: Jonathan Prusik Date: Fri, 17 May 2024 15:00:37 -0400 Subject: [PATCH 4/4] defer badge and menu state updates (#9223) --- apps/browser/src/background/runtime.background.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/background/runtime.background.ts b/apps/browser/src/background/runtime.background.ts index 1db32659d2..5473664e3b 100644 --- a/apps/browser/src/background/runtime.background.ts +++ b/apps/browser/src/background/runtime.background.ts @@ -196,8 +196,6 @@ export default class RuntimeBackground { } await this.notificationsService.updateConnection(msg.command === "loggedIn"); - await this.main.refreshBadge(); - await this.main.refreshMenu(false); this.systemService.cancelProcessReload(); if (item) { @@ -209,6 +207,13 @@ export default class RuntimeBackground { item, ); } + + // @TODO these need to happen last to avoid blocking `tabSendMessageData` above + // The underlying cause exists within `cipherService.getAllDecrypted` via + // `getAllDecryptedForUrl` and is anticipated to be refactored + await this.main.refreshBadge(); + await this.main.refreshMenu(false); + break; } case "addToLockedVaultPendingNotifications":