From 0ecf928249a8b03bcd5eb9b5c5057e9d3885b6e3 Mon Sep 17 00:00:00 2001 From: Domagoj Kriskovic Date: Tue, 14 Jul 2026 10:57:24 +0200 Subject: [PATCH] Zotero sync: error handling & error UX (#35340) * feat(zotero-sync): implement persistent sync state management and user notifications * fix tests * fix(sync): add accessOk flag to sync status recording GitOrigin-RevId: 2da17038ad21691e7b184bb1494cf97fff8234f9 --- services/web/frontend/extracted-translations.json | 1 + services/web/frontend/js/utils/meta.ts | 8 ++++++++ services/web/locales/en.json | 1 + 3 files changed, 10 insertions(+) diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 564474cd65..b82381aa03 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -2584,6 +2584,7 @@ "zotero_reference_loading_error_expired": "", "zotero_reference_loading_error_forbidden": "", "zotero_sync_description": "", + "zotero_sync_lost_access": "", "zotero_sync_multiple_collections": "", "zotero_sync_no_collection": "", "zotero_sync_success": "", diff --git a/services/web/frontend/js/utils/meta.ts b/services/web/frontend/js/utils/meta.ts index bfe14e656f..3231bb59e9 100644 --- a/services/web/frontend/js/utils/meta.ts +++ b/services/web/frontend/js/utils/meta.ts @@ -279,6 +279,14 @@ export interface Meta { | undefined 'ol-recurlyApiKey': string 'ol-recurlySubdomain': string + 'ol-refSyncState': { + synced: boolean + accessOk: boolean + lastSyncProblem: + | 'zotero_no_collection' + | 'zotero_multiple_collections' + | null + } 'ol-ro-mirror-on-client-no-local-storage': boolean 'ol-samlError': SAMLError | undefined 'ol-script-log': ScriptLogType diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 36f73eb4ed..32de070bf9 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -3255,6 +3255,7 @@ "zotero_reference_loading_error_expired": "Zotero token expired, please re-link your account", "zotero_reference_loading_error_forbidden": "Could not load references from Zotero, please re-link your account and try again", "zotero_sync_description": "With the Zotero integration you can import your references from Zotero into your __appName__ projects.", + "zotero_sync_lost_access": "We’ve lost access to your Zotero library. <0>Reconnect your account to keep syncing your references.", "zotero_sync_multiple_collections": "We found more than one collection called “Overleaf” in your Zotero library. Sync requires exactly one.", "zotero_sync_no_collection": "We couldn’t find a collection called “Overleaf” in your Zotero library.", "zotero_sync_success": "Synced __count__ reference from Zotero",