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