Skip to content

Commit 61f15fd

Browse files
Set Pro and Team sync device allowances (#7415)
* Set sync device allowances by plan Include three devices with Pro and five per Team member. Enforce capacity atomically, preserve existing connections after a downgrade, and show server-provided device counts. * Refresh sync device limit message catalogs Replace the fixed five-device messages with plan-aware sync limit messages. * Use plan-aware limits in the desktop sync indicator Keep the blocked sync status consistent with each plan allowance and refresh its message catalogs.
1 parent 0a5e725 commit 61f15fd

239 files changed

Lines changed: 1737 additions & 1510 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/desktop/src/auth/cloudsync.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2186,7 +2186,7 @@ describe("CloudSync auth lifecycle", () => {
21862186
expect(configureCloudsyncToken).not.toHaveBeenCalled();
21872187
expect(suspendCloudsync).toHaveBeenCalledTimes(1);
21882188
expect(sonnerToast.error).toHaveBeenCalledWith(
2189-
expect.stringContaining("limited to 5 devices"),
2189+
expect.stringContaining("sync device limit is reached"),
21902190
expect.objectContaining({ id: "cloudsync-device-limit" }),
21912191
);
21922192
expect(getCloudsyncCredentialBlock()).toBe("device_limit");

apps/desktop/src/auth/cloudsync.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ async function activateCloudsync(
926926
await suspendCloudsyncAfterCredentialRejection(activeGeneration);
927927
if (deviceLimit) {
928928
sonnerToast.error(
929-
t`Cloud sync is limited to 5 devices. Replace or remove another device to sync here.`,
929+
t`Your plan’s sync device limit is reached. Replace or remove another device to sync here.`,
930930
{ id: DEVICE_LIMIT_TOAST_ID },
931931
);
932932
}
@@ -1129,7 +1129,7 @@ async function activateCloudsync(
11291129
}
11301130
if (credentialErrorCode === DEVICE_LIMIT_ERROR_CODE) {
11311131
sonnerToast.error(
1132-
t`Cloud sync is limited to 5 devices. Remove another device to sync here.`,
1132+
t`Your plan’s sync device limit is reached. Remove another device to sync here.`,
11331133
{ id: DEVICE_LIMIT_TOAST_ID },
11341134
);
11351135
console.warn(

apps/desktop/src/i18n/locales/af/messages.po

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,14 +1189,6 @@ msgstr ""
11891189
msgid "Cloud sync identity mismatch"
11901190
msgstr ""
11911191

1192-
#: src/auth/cloudsync.ts
1193-
msgid "Cloud sync is limited to 5 devices. Remove another device to sync here."
1194-
msgstr ""
1195-
1196-
#: src/auth/cloudsync.ts
1197-
msgid "Cloud sync is limited to 5 devices. Replace or remove another device to sync here."
1198-
msgstr ""
1199-
12001192
#: src/main/sync-status.tsx
12011193
msgid "Cloud sync resumes after this meeting finishes processing"
12021194
msgstr ""
@@ -5145,10 +5137,6 @@ msgstr ""
51455137
msgid "Thinking..."
51465138
msgstr ""
51475139

5148-
#: src/main/sync-status.tsx
5149-
msgid "This account already syncs on 5 devices. Remove another device to sync here."
5150-
msgstr ""
5151-
51525140
#: src/resource-sharing/library.tsx
51535141
msgid "This adds a copy you can edit without changing the shared item."
51545142
msgstr ""
@@ -5754,6 +5742,15 @@ msgstr ""
57545742
msgid "Your notes remain available locally. Try again in a moment."
57555743
msgstr ""
57565744

5745+
#: src/auth/cloudsync.ts
5746+
#: src/main/sync-status.tsx
5747+
msgid "Your plan’s sync device limit is reached. Remove another device to sync here."
5748+
msgstr ""
5749+
5750+
#: src/auth/cloudsync.ts
5751+
msgid "Your plan’s sync device limit is reached. Replace or remove another device to sync here."
5752+
msgstr ""
5753+
57575754
#: src/billing/trial-payment-reminder-dialog.tsx
57585755
msgid "Your Pro trial ends in {daysRemaining} days"
57595756
msgstr ""

apps/desktop/src/i18n/locales/af/messages.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/desktop/src/i18n/locales/am/messages.po

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,14 +1189,6 @@ msgstr ""
11891189
msgid "Cloud sync identity mismatch"
11901190
msgstr ""
11911191

1192-
#: src/auth/cloudsync.ts
1193-
msgid "Cloud sync is limited to 5 devices. Remove another device to sync here."
1194-
msgstr ""
1195-
1196-
#: src/auth/cloudsync.ts
1197-
msgid "Cloud sync is limited to 5 devices. Replace or remove another device to sync here."
1198-
msgstr ""
1199-
12001192
#: src/main/sync-status.tsx
12011193
msgid "Cloud sync resumes after this meeting finishes processing"
12021194
msgstr ""
@@ -5145,10 +5137,6 @@ msgstr ""
51455137
msgid "Thinking..."
51465138
msgstr ""
51475139

5148-
#: src/main/sync-status.tsx
5149-
msgid "This account already syncs on 5 devices. Remove another device to sync here."
5150-
msgstr ""
5151-
51525140
#: src/resource-sharing/library.tsx
51535141
msgid "This adds a copy you can edit without changing the shared item."
51545142
msgstr ""
@@ -5754,6 +5742,15 @@ msgstr ""
57545742
msgid "Your notes remain available locally. Try again in a moment."
57555743
msgstr ""
57565744

5745+
#: src/auth/cloudsync.ts
5746+
#: src/main/sync-status.tsx
5747+
msgid "Your plan’s sync device limit is reached. Remove another device to sync here."
5748+
msgstr ""
5749+
5750+
#: src/auth/cloudsync.ts
5751+
msgid "Your plan’s sync device limit is reached. Replace or remove another device to sync here."
5752+
msgstr ""
5753+
57575754
#: src/billing/trial-payment-reminder-dialog.tsx
57585755
msgid "Your Pro trial ends in {daysRemaining} days"
57595756
msgstr ""

apps/desktop/src/i18n/locales/am/messages.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/desktop/src/i18n/locales/ar/messages.po

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,14 +1189,6 @@ msgstr ""
11891189
msgid "Cloud sync identity mismatch"
11901190
msgstr ""
11911191

1192-
#: src/auth/cloudsync.ts
1193-
msgid "Cloud sync is limited to 5 devices. Remove another device to sync here."
1194-
msgstr ""
1195-
1196-
#: src/auth/cloudsync.ts
1197-
msgid "Cloud sync is limited to 5 devices. Replace or remove another device to sync here."
1198-
msgstr ""
1199-
12001192
#: src/main/sync-status.tsx
12011193
msgid "Cloud sync resumes after this meeting finishes processing"
12021194
msgstr ""
@@ -5145,10 +5137,6 @@ msgstr ""
51455137
msgid "Thinking..."
51465138
msgstr ""
51475139

5148-
#: src/main/sync-status.tsx
5149-
msgid "This account already syncs on 5 devices. Remove another device to sync here."
5150-
msgstr ""
5151-
51525140
#: src/resource-sharing/library.tsx
51535141
msgid "This adds a copy you can edit without changing the shared item."
51545142
msgstr ""
@@ -5754,6 +5742,15 @@ msgstr ""
57545742
msgid "Your notes remain available locally. Try again in a moment."
57555743
msgstr ""
57565744

5745+
#: src/auth/cloudsync.ts
5746+
#: src/main/sync-status.tsx
5747+
msgid "Your plan’s sync device limit is reached. Remove another device to sync here."
5748+
msgstr ""
5749+
5750+
#: src/auth/cloudsync.ts
5751+
msgid "Your plan’s sync device limit is reached. Replace or remove another device to sync here."
5752+
msgstr ""
5753+
57575754
#: src/billing/trial-payment-reminder-dialog.tsx
57585755
msgid "Your Pro trial ends in {daysRemaining} days"
57595756
msgstr ""

apps/desktop/src/i18n/locales/ar/messages.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/desktop/src/i18n/locales/as/messages.po

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,14 +1189,6 @@ msgstr ""
11891189
msgid "Cloud sync identity mismatch"
11901190
msgstr ""
11911191

1192-
#: src/auth/cloudsync.ts
1193-
msgid "Cloud sync is limited to 5 devices. Remove another device to sync here."
1194-
msgstr ""
1195-
1196-
#: src/auth/cloudsync.ts
1197-
msgid "Cloud sync is limited to 5 devices. Replace or remove another device to sync here."
1198-
msgstr ""
1199-
12001192
#: src/main/sync-status.tsx
12011193
msgid "Cloud sync resumes after this meeting finishes processing"
12021194
msgstr ""
@@ -5145,10 +5137,6 @@ msgstr ""
51455137
msgid "Thinking..."
51465138
msgstr ""
51475139

5148-
#: src/main/sync-status.tsx
5149-
msgid "This account already syncs on 5 devices. Remove another device to sync here."
5150-
msgstr ""
5151-
51525140
#: src/resource-sharing/library.tsx
51535141
msgid "This adds a copy you can edit without changing the shared item."
51545142
msgstr ""
@@ -5754,6 +5742,15 @@ msgstr ""
57545742
msgid "Your notes remain available locally. Try again in a moment."
57555743
msgstr ""
57565744

5745+
#: src/auth/cloudsync.ts
5746+
#: src/main/sync-status.tsx
5747+
msgid "Your plan’s sync device limit is reached. Remove another device to sync here."
5748+
msgstr ""
5749+
5750+
#: src/auth/cloudsync.ts
5751+
msgid "Your plan’s sync device limit is reached. Replace or remove another device to sync here."
5752+
msgstr ""
5753+
57575754
#: src/billing/trial-payment-reminder-dialog.tsx
57585755
msgid "Your Pro trial ends in {daysRemaining} days"
57595756
msgstr ""

apps/desktop/src/i18n/locales/as/messages.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)