This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

web: key repo cards by repoKey (did ?? rkey ?? name)

Signed-off-by: dawn <dawn@tangled.org>

author
dawn
date (Aug 1, 2026, 2:23 AM +0300) commit fcebfe1d parent d89ba19e change-id mymtnwtq
+12 -6
+2 -2
web/src/lib/components/profile/tabs/OverviewTab.svelte
··· 2 2 import RepoCard from "$lib/components/repo/RepoCard.svelte"; 3 3 import Section from "$lib/components/ui/Section.svelte"; 4 4 import ActivityStub from "../ActivityStub.svelte"; 5 - import type { RepoCardData } from "../types"; 5 + import { repoKey, type RepoCardData } from "../types"; 6 6 7 7 interface Props { 8 8 pinned: RepoCardData[]; ··· 18 18 empty={pinned.length === 0} 19 19 emptyMessage="No pinned repositories." 20 20 > 21 - {#each pinned as repo (`${repo.repoDid}/${repo.name}`)} 21 + {#each pinned as repo (repoKey(repo))} 22 22 <RepoCard {repo} starButton={false} showOwner={false} /> 23 23 {/each} 24 24 </Section>
+2 -2
web/src/lib/components/profile/tabs/RepoListTab.svelte
··· 3 3 import { resolve } from "$app/paths"; 4 4 import RepoCard from "$lib/components/repo/RepoCard.svelte"; 5 5 import Section from "$lib/components/ui/Section.svelte"; 6 - import type { RepoCardData } from "../types"; 6 + import { repoKey, type RepoCardData } from "../types"; 7 7 import Search from "$icon/search"; 8 8 import X from "$icon/x"; 9 9 ··· 43 43 </form> 44 44 </div> 45 45 {/snippet} 46 - {#each repos as repo (`${repo.repoDid}/${repo.name}`)} 46 + {#each repos as repo (repoKey(repo))} 47 47 <RepoCard {repo} showOwner={false} /> 48 48 {/each} 49 49 </Section>
+5
web/src/lib/components/profile/types.ts
··· 10 10 } 11 11 12 12 export interface RepoCardData { 13 + rkey?: string; 13 14 name: string; 14 15 repoDid: string; 15 16 ownerHandle: string; 16 17 description?: string; 18 + knot?: string; 17 19 createdAt: string; 18 20 language?: string; 19 21 stars?: number; ··· 22 24 pulls?: number; 23 25 viewerStarRkey?: string | null; 24 26 } 27 + 28 + // legacy repos have no repoDid 29 + export const repoKey = (repo: RepoCardData): string => repo.repoDid || repo.rkey || repo.name; 25 30 26 31 export interface StringCardData { 27 32 rkey: string;
+3 -2
web/src/lib/components/repo/RepoHeader.svelte
··· 23 23 const signedIn = $derived(Boolean(auth.currentDid)); 24 24 const base = $derived(`/${repo.ownerHandle}/${repo.name}`); 25 25 const trimScheme = (url: string) => url.replace(/^https?:\/\//, "").replace(/\/$/, ""); 26 + const topics = $derived([...new Set(repo.topics ?? [])]); 26 27 </script> 27 28 28 29 {#snippet repoActions(className: string)} ··· 117 118 </span> 118 119 {/if} 119 120 120 - {#if repo.topics?.length} 121 + {#if topics.length} 121 122 <div class="flex flex-wrap items-center gap-1"> 122 - {#each repo.topics as topic (topic)} 123 + {#each topics as topic (topic)} 123 124 <Tag color="gray">{topic}</Tag> 124 125 {/each} 125 126 </div>