From 02837b9a4b94a2e0a925561924ccc43b597e2bab Mon Sep 17 00:00:00 2001 From: npeter83 Date: Thu, 9 Jul 2026 15:34:28 +0200 Subject: [PATCH 1/2] fix(plex): optimistic toggle + 'importing' indicator for watch-sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The watch-sync switch only flipped once the (multi-second) import request returned, so a click read as 'nothing happened' and invited repeat clicks. Reflect the toggle's target optimistically while the mutation is in flight and show an 'Importing your Plex watch history…' spinner line, so it's obvious the switch responded and is working. --- frontend/src/components/SettingsPanel.tsx | 42 +++++++++++++--------- frontend/src/i18n/locales/de/settings.json | 3 +- frontend/src/i18n/locales/en/settings.json | 3 +- frontend/src/i18n/locales/hu/settings.json | 3 +- 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/SettingsPanel.tsx b/frontend/src/components/SettingsPanel.tsx index 5556a0a..986da46 100644 --- a/frontend/src/components/SettingsPanel.tsx +++ b/frontend/src/components/SettingsPanel.tsx @@ -461,6 +461,10 @@ function PlexWatchSync() { }, }); + const busy = toggle.isPending || reimport.isPending; + // Reflect the toggle's target immediately (optimistic) so the switch responds on click rather than + // only flipping once the multi-second import returns — otherwise it reads as "nothing happened". + const shown = toggle.isPending ? Boolean(toggle.variables) : enabled; const last = link.data?.last_watch_sync_at ? new Date(link.data.last_watch_sync_at).toLocaleString(i18n.language) : null; @@ -470,25 +474,31 @@ function PlexWatchSync() {

{t("settings.plexSync.intro")}

!toggle.isPending && toggle.mutate(v)} + checked={shown} + disabled={busy} + onChange={(v) => !busy && toggle.mutate(v)} /> - {enabled && ( -
-

- {last ? t("settings.plexSync.lastSync", { when: last }) : t("settings.plexSync.never")} -

- + {busy ? ( +
+ + {t("settings.plexSync.importing")}
+ ) : ( + enabled && ( +
+

+ {last ? t("settings.plexSync.lastSync", { when: last }) : t("settings.plexSync.never")} +

+ +
+ ) )} ); diff --git a/frontend/src/i18n/locales/de/settings.json b/frontend/src/i18n/locales/de/settings.json index 51dfb58..c441032 100644 --- a/frontend/src/i18n/locales/de/settings.json +++ b/frontend/src/i18n/locales/de/settings.json @@ -13,7 +13,8 @@ "importNow": "Jetzt aus Plex importieren", "imported": "Aus Plex importiert: {{watched}} gesehen, {{in_progress}} laufend.", "lastSync": "Letzter Import: {{when}}", - "never": "Noch nicht importiert" + "never": "Noch nicht importiert", + "importing": "Plex-Wiedergabeverlauf wird importiert…" }, "save": { "unsaved": "Nicht gespeicherte Änderungen", diff --git a/frontend/src/i18n/locales/en/settings.json b/frontend/src/i18n/locales/en/settings.json index 8d79214..cd9e2d2 100644 --- a/frontend/src/i18n/locales/en/settings.json +++ b/frontend/src/i18n/locales/en/settings.json @@ -13,7 +13,8 @@ "importNow": "Import from Plex now", "imported": "Imported from Plex: {{watched}} watched, {{in_progress}} in progress.", "lastSync": "Last import: {{when}}", - "never": "Not imported yet" + "never": "Not imported yet", + "importing": "Importing your Plex watch history…" }, "save": { "unsaved": "Unsaved changes", diff --git a/frontend/src/i18n/locales/hu/settings.json b/frontend/src/i18n/locales/hu/settings.json index 6d987cc..c8dea12 100644 --- a/frontend/src/i18n/locales/hu/settings.json +++ b/frontend/src/i18n/locales/hu/settings.json @@ -13,7 +13,8 @@ "importNow": "Importálás a Plexből most", "imported": "Importálva a Plexből: {{watched}} megnézve, {{in_progress}} folyamatban.", "lastSync": "Utolsó import: {{when}}", - "never": "Még nincs importálva" + "never": "Még nincs importálva", + "importing": "Plex-előzmény importálása…" }, "save": { "unsaved": "Nem mentett változások", From 57f521191eb83907db57c9a366f5a1636dd77fff Mon Sep 17 00:00:00 2001 From: npeter83 Date: Thu, 9 Jul 2026 15:34:52 +0200 Subject: [PATCH 2/2] =?UTF-8?q?chore(release):=200.34.2=20=E2=80=94=20watc?= =?UTF-8?q?h-sync=20toggle=20UX=20polish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- frontend/src/lib/releaseNotes.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 449c00d..4d17807 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.34.1 \ No newline at end of file +0.34.2 \ No newline at end of file diff --git a/frontend/src/lib/releaseNotes.ts b/frontend/src/lib/releaseNotes.ts index 0717f66..80b40b1 100644 --- a/frontend/src/lib/releaseNotes.ts +++ b/frontend/src/lib/releaseNotes.ts @@ -14,6 +14,14 @@ export interface ReleaseEntry { } export const RELEASE_NOTES: ReleaseEntry[] = [ + { + version: "0.34.2", + date: "2026-07-09", + summary: "Polish: the Plex watch-sync switch now responds instantly.", + fixes: [ + "The Plex watch-sync switch now flips the moment you click it and shows an \"Importing…\" indicator while it works, instead of appearing to do nothing until the import finished.", + ], + }, { version: "0.34.1", date: "2026-07-09",