@@ -13,6 +13,8 @@ import type { Comment, CommentLifecycleStatus, MergeReadiness, Severity, ReviewE
1313type ViewMode = 'diff' | 'list'
1414
1515const BLOCKING_SEVERITIES = new Set < Severity > ( [ 'Error' , 'Warning' ] )
16+ const LOW_FEEDBACK_COVERAGE_THRESHOLD = 0.5
17+ const MIN_FEEDBACK_COVERAGE_FINDINGS = 3
1618
1719type ReviewCommentFilters = {
1820 severityFilter : Set < Severity >
@@ -212,6 +214,11 @@ export function ReviewView() {
212214
213215 const openErrorCount = review . summary ?. open_by_severity . Error ?? 0
214216 const openWarningCount = review . summary ?. open_by_severity . Warning ?? 0
217+ const labeledFeedbackCount = comments . filter ( ( comment ) => comment . feedback === 'accept' || comment . feedback === 'reject' ) . length
218+ const feedbackCoverage = comments . length > 0 ? labeledFeedbackCount / comments . length : 1
219+ const feedbackCoveragePercent = Math . round ( feedbackCoverage * 100 )
220+ const shouldShowFeedbackCallout = comments . length >= MIN_FEEDBACK_COVERAGE_FINDINGS
221+ && feedbackCoverage < LOW_FEEDBACK_COVERAGE_THRESHOLD
215222
216223 return (
217224 < div className = "flex h-full" >
@@ -352,6 +359,30 @@ export function ReviewView() {
352359 </ div >
353360 ) }
354361
362+ { shouldShowFeedbackCallout && (
363+ < div className = "px-3 py-3 border-b border-accent/20 bg-accent/5" >
364+ < div className = "flex items-start gap-3" >
365+ < div className = "mt-0.5 w-7 h-7 rounded-full bg-accent/10 flex items-center justify-center shrink-0" >
366+ < MessageSquare size = { 14 } className = "text-accent" />
367+ </ div >
368+ < div className = "min-w-0 flex-1" >
369+ < div className = "text-[10px] font-semibold text-accent tracking-[0.08em] font-code uppercase" >
370+ Train the reviewer
371+ </ div >
372+ < p className = "mt-1 text-[12px] text-text-primary leading-relaxed" >
373+ { labeledFeedbackCount === 0
374+ ? 'No thumbs recorded yet. Label findings below to train the reviewer.'
375+ : `You've labeled ${ labeledFeedbackCount } of ${ comments . length } findings. Add a few more thumbs so future reviews learn what to keep or suppress.` }
376+ </ p >
377+ </ div >
378+ < div className = "shrink-0 text-right" >
379+ < div className = "text-[13px] font-semibold font-code text-accent" > { feedbackCoveragePercent } %</ div >
380+ < div className = "text-[10px] text-text-muted" > coverage</ div >
381+ </ div >
382+ </ div >
383+ </ div >
384+ ) }
385+
355386 { /* Toolbar */ }
356387 < div className = "px-3 py-2 border-b border-border bg-surface flex items-center gap-2" >
357388 { /* View mode toggle */ }
0 commit comments