improvement(sync): reflect deep backfill as active in the header status

The header status only considered recent-sync pending, so it read "all synced"
while the scheduler was still backfilling full history — directly contradicting
the adjacent "N without full history" notice. Add an active "fetching history"
state (spinner) shown when recent sync is done but deep backfill is still
pending, so "all synced" appears only when nothing is pending at all. The admin
pause button now also shows during deep backfill (it's pausable work). Trilingual.
This commit is contained in:
npeter83 2026-06-15 04:30:27 +02:00
parent 12fe21d693
commit 99b963dbe6
4 changed files with 14 additions and 3 deletions

View file

@ -57,6 +57,13 @@ export default function SyncStatus({
<Loader2 className="w-3.5 h-3.5 animate-spin" /> <Loader2 className="w-3.5 h-3.5 animate-spin" />
{t("header.sync.syncing", { count: syncing })} {t("header.sync.syncing", { count: syncing })}
</span> </span>
) : notFull > 0 ? (
// Recent uploads are in, but the scheduler is still backfilling full history —
// so "all synced" would be misleading. Reflect the deep work as active.
<span className="flex items-center gap-1">
<Loader2 className="w-3.5 h-3.5 animate-spin" />
{t("header.sync.backfillingHistory")}
</span>
) : ( ) : (
<span>{t("header.sync.allSynced")}</span> <span>{t("header.sync.allSynced")}</span>
)} )}
@ -74,9 +81,10 @@ export default function SyncStatus({
</Tooltip> </Tooltip>
</> </>
)} )}
{/* Pause only makes sense when there's work to pause; Resume must always show {/* Pause only makes sense when there's work to pause (recent OR deep backfill);
while paused so it can be lifted. Hidden entirely when idle and not paused. */} Resume must always show while paused so it can be lifted. Hidden entirely when
{isAdmin && (data.paused || syncing > 0) && ( idle and not paused. */}
{isAdmin && (data.paused || syncing > 0 || notFull > 0) && (
<button <button
onClick={() => toggle.mutate()} onClick={() => toggle.mutate()}
disabled={toggle.isPending} disabled={toggle.isPending}

View file

@ -25,6 +25,7 @@
"countTooltip": "Videos aus deinen Abos im Vergleich zur Gesamtzahl im gemeinsamen Katalog, den die Abos aller Nutzer gefüllt haben.", "countTooltip": "Videos aus deinen Abos im Vergleich zur Gesamtzahl im gemeinsamen Katalog, den die Abos aller Nutzer gefüllt haben.",
"paused": "pausiert", "paused": "pausiert",
"syncing": "{{count}} werden synchronisiert", "syncing": "{{count}} werden synchronisiert",
"backfillingHistory": "Verlauf wird geladen",
"allSynced": "alles synchronisiert", "allSynced": "alles synchronisiert",
"withoutFullHistory": "{{count}} ohne vollständigen Verlauf", "withoutFullHistory": "{{count}} ohne vollständigen Verlauf",
"fullHistoryTooltip": "Einige deiner Kanäle haben nur ihre neuesten Uploads. Klicke, um die Kanalverwaltung (auf diese gefiltert) zu öffnen und ihren vollständigen Katalog anzufordern.", "fullHistoryTooltip": "Einige deiner Kanäle haben nur ihre neuesten Uploads. Klicke, um die Kanalverwaltung (auf diese gefiltert) zu öffnen und ihren vollständigen Katalog anzufordern.",

View file

@ -25,6 +25,7 @@
"countTooltip": "Videos from your subscriptions, against the total in the shared catalog that every user's subscriptions have pulled in.", "countTooltip": "Videos from your subscriptions, against the total in the shared catalog that every user's subscriptions have pulled in.",
"paused": "paused", "paused": "paused",
"syncing": "{{count}} syncing", "syncing": "{{count}} syncing",
"backfillingHistory": "fetching history",
"allSynced": "all synced", "allSynced": "all synced",
"withoutFullHistory": "{{count}} without full history", "withoutFullHistory": "{{count}} without full history",
"fullHistoryTooltip": "Some of your channels only have their recent uploads. Click to open the channel manager (filtered to these) and request their full back-catalog.", "fullHistoryTooltip": "Some of your channels only have their recent uploads. Click to open the channel manager (filtered to these) and request their full back-catalog.",

View file

@ -25,6 +25,7 @@
"countTooltip": "A feliratkozásaidból származó videók száma a megosztott katalógus teljes számához képest, amelyet az összes felhasználó feliratkozásai gyűjtöttek össze.", "countTooltip": "A feliratkozásaidból származó videók száma a megosztott katalógus teljes számához képest, amelyet az összes felhasználó feliratkozásai gyűjtöttek össze.",
"paused": "szüneteltetve", "paused": "szüneteltetve",
"syncing": "{{count}} szinkronizálás alatt", "syncing": "{{count}} szinkronizálás alatt",
"backfillingHistory": "előzmény letöltése",
"allSynced": "minden szinkronban", "allSynced": "minden szinkronban",
"withoutFullHistory": "{{count}} teljes előzmény nélkül", "withoutFullHistory": "{{count}} teljes előzmény nélkül",
"fullHistoryTooltip": "Néhány csatornádnak csak a legutóbbi feltöltései vannak meg. Kattints a csatornakezelő megnyitásához (ezekre szűrve), és kérd le a teljes archívumukat.", "fullHistoryTooltip": "Néhány csatornádnak csak a legutóbbi feltöltései vannak meg. Kattints a csatornakezelő megnyitásához (ezekre szűrve), és kérd le a teljes archívumukat.",