From d7fa1587065e106b5d8179f76d0e95b2eacd0b70 Mon Sep 17 00:00:00 2001 From: "nekomimi.pet" Date: Sat, 1 Aug 2026 14:54:21 -0400 Subject: [PATCH] fix repository record keys --- src/lib/api/repos.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lib/api/repos.ts b/src/lib/api/repos.ts index fd60acf..f546b03 100644 --- a/src/lib/api/repos.ts +++ b/src/lib/api/repos.ts @@ -311,16 +311,14 @@ export const listRepoRecords = async (owner: string | ResolvedActor): Promise listRepoRecordsFromAppview(owner), () => listRepoRecordsFromPds(owner), ); - if (records.length > 0) { - return records; - } - // Bobbin/Hydrant can return a successful empty list while the user's PDS has - // repo records. Treat an empty appview list as inconclusive and ask the PDS - // before showing an empty profile. + // The appview can retain an old repo URI after a rename while keeping the + // current record value and CID. Re-read the owner's PDS when possible so the + // record key (which is the canonical repo name for modern records) stays in + // sync with the links we render. try { const pdsRecords = await listRepoRecordsFromPds(owner); - return pdsRecords.length > 0 ? pdsRecords : records; + return pdsRecords.length > 0 || records.length === 0 ? pdsRecords : records; } catch { return records; } -- 2.51.2