@@ -21,6 +21,7 @@ import { ConfidenceBadge } from "@/components/wiki/confidence-badge";
2121import { EmptyState } from "@/components/shared/empty-state" ;
2222import { formatRelativeTime , formatNumber } from "@/lib/utils/format" ;
2323import { scoreToStatus } from "@/lib/utils/confidence" ;
24+ import { DeleteRepoButton } from "@/components/repos/delete-repo-button" ;
2425
2526export const metadata : Metadata = { title : "Dashboard" } ;
2627
@@ -124,48 +125,51 @@ export default async function DashboardPage() {
124125 ) : (
125126 < ul className = "divide-y divide-[var(--color-border-default)]" >
126127 { repoList . map ( ( repo ) => (
127- < li key = { repo . id } >
128- < Link
129- href = { `/repos/${ repo . id } ` }
130- className = "flex items-start gap-3 px-6 py-3.5 transition-colors hover:bg-[var(--color-bg-elevated)] group"
131- >
132- < div className = "mt-0.5 h-2 w-2 rounded-full bg-[var(--color-accent-primary)] shrink-0" />
133- < div className = "flex-1 min-w-0" >
134- < div className = "flex items-center gap-2" >
135- < p className = "text-sm font-medium text-[var(--color-text-primary)] truncate group-hover:text-[var(--color-accent-primary)] transition-colors" >
136- { repo . name }
137- </ p >
138- </ div >
139- < div className = "flex items-center gap-2 mt-0.5" >
140- < p className = "text-xs text-[var(--color-text-tertiary)] font-mono truncate" title = { repo . local_path } >
141- { repo . local_path }
142- </ p >
143- </ div >
144- < div className = "flex items-center gap-2 mt-1 flex-wrap" >
145- { repo . head_commit && (
146- < span className = "text-xs font-mono text-[var(--color-text-tertiary)]" >
147- { repo . head_commit . slice ( 0 , 7 ) }
128+ < li key = { repo . id } className = "group" >
129+ < div className = "flex items-start gap-3 px-6 py-3.5 transition-colors hover:bg-[var(--color-bg-elevated)]" >
130+ < Link
131+ href = { `/repos/${ repo . id } ` }
132+ className = "flex items-start gap-3 flex-1 min-w-0"
133+ >
134+ < div className = "mt-0.5 h-2 w-2 rounded-full bg-[var(--color-accent-primary)] shrink-0" />
135+ < div className = "flex-1 min-w-0" >
136+ < div className = "flex items-center gap-2" >
137+ < p className = "text-sm font-medium text-[var(--color-text-primary)] truncate group-hover:text-[var(--color-accent-primary)] transition-colors" >
138+ { repo . name }
139+ </ p >
140+ </ div >
141+ < div className = "flex items-center gap-2 mt-0.5" >
142+ < p className = "text-xs text-[var(--color-text-tertiary)] font-mono truncate" title = { repo . local_path } >
143+ { repo . local_path }
144+ </ p >
145+ </ div >
146+ < div className = "flex items-center gap-2 mt-1 flex-wrap" >
147+ { repo . head_commit && (
148+ < span className = "text-xs font-mono text-[var(--color-text-tertiary)]" >
149+ { repo . head_commit . slice ( 0 , 7 ) }
150+ </ span >
151+ ) }
152+ < span className = "text-xs text-[var(--color-text-tertiary)]" >
153+ Updated { formatRelativeTime ( repo . updated_at ) }
148154 </ span >
149- ) }
150- < span className = "text-xs text-[var(--color-text-tertiary)]" >
151- Updated { formatRelativeTime ( repo . updated_at ) }
152- </ span >
153- { gitMap . has ( repo . id ) && ( ( ) => {
154- const g = gitMap . get ( repo . id ) ! ;
155- return (
156- < >
157- { g . hotspot_count > 0 && (
158- < Badge variant = "outdated" > { g . hotspot_count } hotspot{ g . hotspot_count !== 1 ? "s" : "" } </ Badge >
159- ) }
160- { g . stable_count > 0 && (
161- < Badge variant = "fresh" > { g . stable_count } stable</ Badge >
162- ) }
163- </ >
164- ) ;
165- } ) ( ) }
155+ { gitMap . has ( repo . id ) && ( ( ) => {
156+ const g = gitMap . get ( repo . id ) ! ;
157+ return (
158+ < >
159+ { g . hotspot_count > 0 && (
160+ < Badge variant = "outdated" > { g . hotspot_count } hotspot{ g . hotspot_count !== 1 ? "s" : "" } </ Badge >
161+ ) }
162+ { g . stable_count > 0 && (
163+ < Badge variant = "fresh" > { g . stable_count } stable</ Badge >
164+ ) }
165+ </ >
166+ ) ;
167+ } ) ( ) }
168+ </ div >
166169 </ div >
167- </ div >
168- </ Link >
170+ </ Link >
171+ < DeleteRepoButton repoId = { repo . id } repoName = { repo . name } />
172+ </ div >
169173 </ li >
170174 ) ) }
171175 </ ul >
0 commit comments