From 4c7c8a19c537d10ad47669ec80ccb977e7db6aa9 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 25 Mar 2026 18:51:19 +0200 Subject: [PATCH] fix(standalone/setup): progress bar jumps back to zero before finishing sync --- apps/client/src/setup.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx index 45f9b6572c..b03fc66ffa 100644 --- a/apps/client/src/setup.tsx +++ b/apps/client/src/setup.tsx @@ -141,9 +141,13 @@ function SyncInProgress({ device }: { device: "server" | "desktop" }) { const currentIndex = steps.findIndex((s) => s.key === step); - const progress = stats.totalPullCount - ? Math.round(((stats.totalPullCount - stats.outstandingPullCount) / stats.totalPullCount) * 100) - : 0; + const syncingDone = currentIndex > steps.findIndex((s) => s.key === "syncing"); + let progress = 0; + if (syncingDone) { + progress = 100; + } else if (stats.totalPullCount) { + progress = Math.round(((stats.totalPullCount - stats.outstandingPullCount) / stats.totalPullCount) * 100); + } return ( - + {progress}% )}