@@ -25,15 +25,9 @@ interface ReviewerTotal {
2525 reviewer_name : string
2626 active_seconds : number
2727 wall_seconds : number
28- sessions_count : number
28+ reviews_count : number
2929}
3030
31- const filters = [
32- { key : '' , label : 'All' } ,
33- { key : 'open' , label : 'Open (in-progress)' } ,
34- { key : 'closed' , label : 'Closed' } ,
35- ]
36-
3731function decisionBadge ( decision : string | null ) {
3832 if ( ! decision ) return < Badge variant = "warning" > in progress</ Badge >
3933 switch ( decision ) {
@@ -76,7 +70,7 @@ function Leaderboard({
7670 < TableHead > Reviewer</ TableHead >
7771 < TableHead > Active</ TableHead >
7872 < TableHead > Wall</ TableHead >
79- < TableHead className = "text-right" > Sessions </ TableHead >
73+ < TableHead className = "text-right" > Reviews </ TableHead >
8074 </ TableRow >
8175 </ TableHeader >
8276 < TableBody >
@@ -102,7 +96,7 @@ function Leaderboard({
10296 < TableCell className = { cn ( 'font-mono text-sm' , sortKey === 'wall_seconds' && 'font-semibold' ) } >
10397 { formatSeconds ( t . wall_seconds ) }
10498 </ TableCell >
105- < TableCell className = "text-right font-mono text-xs" > { t . sessions_count } </ TableCell >
99+ < TableCell className = "text-right font-mono text-xs" > { t . reviews_count } </ TableCell >
106100 </ TableRow >
107101 ) ) }
108102 </ TableBody >
@@ -120,7 +114,7 @@ export default function ReviewAuditsIndex({
120114} : {
121115 sessions : SessionRow [ ]
122116 pagy : PagyProps
123- filters : { reviewer_id : string ; project_id : string ; status : string }
117+ filters : { reviewer_id : string ; project_id : string }
124118 totals : ReviewerTotal [ ]
125119} ) {
126120 function applyFilter ( key : string , value : string ) {
@@ -135,65 +129,51 @@ export default function ReviewAuditsIndex({
135129 Review Audits
136130 </ h1 >
137131 < p className = "text-sm text-muted-foreground mt-1" >
138- Every review session ever opened — reviewer, project, active seconds, and a full audit trail of what happened. Superadmin only.
132+ Every completed review — reviewer, project, active seconds, and a full audit trail of what happened. Superadmin only.
139133 </ p >
140134 </ div >
141135
142136 { totals . length === 0 ? (
143137 < Card >
144- < CardContent className = "p-6 text-sm text-muted-foreground text-center" > No closed sessions yet.</ CardContent >
138+ < CardContent className = "p-6 text-sm text-muted-foreground text-center" > No completed reviews yet.</ CardContent >
145139 </ Card >
146140 ) : (
147141 < div className = "grid grid-cols-1 md:grid-cols-2 gap-4" >
148142 < Leaderboard
149143 title = "Active time leaderboard"
150- description = "Sum of heartbeat-measured active time across all sessions . The basis for reviewer payouts."
144+ description = "Sum of heartbeat-measured active time across completed reviews . The basis for reviewer payouts."
151145 totals = { totals }
152146 sortKey = "active_seconds"
153147 onPickReviewer = { ( id ) => applyFilter ( 'reviewer_id' , String ( id ) ) }
154148 />
155149 < Leaderboard
156150 title = "Wall-clock leaderboard"
157- description = "Sum of started_at→ended_at durations across all sessions . Includes idle/AFK time. Use the gap vs active to spot inefficient reviewers."
151+ description = "Sum of started_at→ended_at durations across completed reviews . Includes idle/AFK time. Use the gap vs active to spot inefficient reviewers."
158152 totals = { totals }
159153 sortKey = "wall_seconds"
160154 onPickReviewer = { ( id ) => applyFilter ( 'reviewer_id' , String ( id ) ) }
161155 />
162156 </ div >
163157 ) }
164158
165- < div className = "flex gap-2 flex-wrap items-center" >
166- { filters . map ( ( opt ) => (
167- < button
168- key = { opt . key }
169- onClick = { ( ) => applyFilter ( 'status' , opt . key ) }
170- className = { cn (
171- 'px-3 py-1.5 text-xs font-medium rounded-md border transition-colors cursor-pointer' ,
172- f . status === opt . key
173- ? 'bg-primary text-primary-foreground border-primary'
174- : 'border-border bg-background text-muted-foreground hover:bg-accent hover:text-foreground' ,
175- ) }
176- >
177- { opt . label }
178- </ button >
179- ) ) }
180- { ( f . reviewer_id || f . project_id ) && (
159+ { ( f . reviewer_id || f . project_id ) && (
160+ < div className = "flex gap-2 flex-wrap items-center" >
181161 < button
182162 onClick = { ( ) => router . get ( '/admin/review_audits' ) }
183163 className = "text-xs text-muted-foreground hover:text-foreground cursor-pointer underline"
184164 >
185165 clear filters
186166 </ button >
187- ) }
188- </ div >
167+ </ div >
168+ ) }
189169
190170 < Card >
191171 < CardHeader >
192- < CardTitle > Sessions </ CardTitle >
172+ < CardTitle > Completed reviews </ CardTitle >
193173 </ CardHeader >
194174 < CardContent className = "space-y-4" >
195175 { sessions . length === 0 ? (
196- < p className = "text-sm text-muted-foreground py-10 text-center" > No sessions match.</ p >
176+ < p className = "text-sm text-muted-foreground py-10 text-center" > No completed reviews match.</ p >
197177 ) : (
198178 < Table >
199179 < TableHeader >
0 commit comments