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.
This commit is contained in:
Ricardo
2026-02-20 08:32:51 +01:00
parent 473624c709
commit 432bb7a64a
2 changed files with 5 additions and 3 deletions

View File

@@ -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;

View File

@@ -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",