From 432bb7a64afbb2f638c6b77ea397e75e290d5d3d Mon Sep 17 00:00:00 2001 From: Ricardo Date: Fri, 20 Feb 2026 08:32:51 +0100 Subject: [PATCH] fix: include federated accounts in progress bar calculation When Accept(Follow) arrives, source transitions from refollow:sent to federation. Without counting federated in the total, those accounts drop out of both numerator and denominator, making the progress bar stay flat or go backwards. --- lib/batch-refollow.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/batch-refollow.js b/lib/batch-refollow.js index 2d88028..8a8e73a 100644 --- a/lib/batch-refollow.js +++ b/lib/batch-refollow.js @@ -122,8 +122,10 @@ export async function getBatchRefollowStatus(collections) { collections.ap_following.countDocuments({ source: "federation" }), ]); - const total = remaining + sent + failed; - const completed = sent + failed; + // Include federated in totals — accounts transition from refollow:sent + // to federation when Accept arrives, so they must stay in the math + const total = remaining + sent + failed + federated; + const completed = sent + failed + federated; const progressPercent = total > 0 ? Math.round((completed / total) * 100) : 100; diff --git a/package.json b/package.json index 174870c..c0143bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rmdes/indiekit-endpoint-activitypub", - "version": "1.0.12", + "version": "1.0.13", "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.", "keywords": [ "indiekit",