From 4e63f7631a75d3ccf8808c803b73a9bb1a7d3ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 7 Jun 2026 09:13:44 +0200 Subject: [PATCH] fix(journal): show remote followers in follower/following lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit countFollowers counts every accepted follow row, but listFollowers inner-joined users on follower_id — so a federated follower (NULL follower_id, follower_actor_iri set) bumped the count while never appearing in the list. Observed live: profile said '1 follower', list below was empty. listFollowing had the same latent bug for outbound trails-to-trails follows. Both lists now left-join users + remote_actors: local entries link to the local profile as before; remote entries display cached actor data (IRI parsing as fallback) and link out to the remote profile. Integration test pins count/list consistency for a remote follower. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../journal/app/components/CollectionPage.tsx | 8 +- .../lib/federation-inbox.integration.test.ts | 17 ++++ apps/journal/app/lib/follow.server.ts | 99 ++++++++++++++++--- 3 files changed, 109 insertions(+), 15 deletions(-) diff --git a/apps/journal/app/components/CollectionPage.tsx b/apps/journal/app/components/CollectionPage.tsx index 08c8bab..2632b44 100644 --- a/apps/journal/app/components/CollectionPage.tsx +++ b/apps/journal/app/components/CollectionPage.tsx @@ -4,6 +4,9 @@ interface Entry { username: string; displayName: string | null; domain: string; + /** Local path (`/users/x`) or, for federated entries, the remote profile URL. */ + profileUrl: string; + remote: boolean; } interface Props { @@ -42,9 +45,10 @@ export function CollectionPage({ kind, user, entries, page, total }: Props) { ) : (