@@ -6,8 +6,11 @@ import StatusIndicator from "./StatusIndicator";
66import { state } from "../App" ;
77
88// Small, focused components following "dereference values late" principle
9- const ExpandIcon = observer ( ( { rowId } : { rowId : string } ) => {
10- const isExpanded = state . isRowExpanded ( rowId ) ;
9+ const ExpandIcon = observer ( ( { rolloutId } : { rolloutId ?: string } ) => {
10+ if ( ! rolloutId ) {
11+ throw new Error ( "Rollout ID is required" ) ;
12+ }
13+ const isExpanded = state . isRowExpanded ( rolloutId ) ;
1114 return (
1215 < div className = "w-4 h-4 flex items-center justify-center" >
1316 < svg
@@ -47,9 +50,18 @@ const RowStatus = observer(
4750 )
4851) ;
4952
50- const RowId = observer ( ( { rowId } : { rowId : string } ) => (
51- < span className = "font-mono text-gray-900 whitespace-nowrap" > { rowId } </ span >
52- ) ) ;
53+ const RolloutId = observer (
54+ ( { rolloutId : rolloutId } : { rolloutId ?: string } ) => {
55+ if ( ! rolloutId ) {
56+ return null ;
57+ }
58+ return (
59+ < span className = "font-mono text-gray-900 whitespace-nowrap" >
60+ { rolloutId }
61+ </ span >
62+ ) ;
63+ }
64+ ) ;
5365
5466const RowModel = observer ( ( { model } : { model : string | undefined } ) => (
5567 < span className = "text-gray-900 truncate block" > { model || "N/A" } </ span >
@@ -116,6 +128,18 @@ const InputMetadataSection = observer(
116128 )
117129) ;
118130
131+ const IdSection = observer ( ( { data } : { data : EvaluationRowType } ) => (
132+ < MetadataSection
133+ title = "IDs"
134+ data = { {
135+ rollout_id : data . rollout_id ,
136+ cohort_id : data . cohort_id ,
137+ invocation_id : data . invocation_id ,
138+ run_id : data . run_id ,
139+ } }
140+ />
141+ ) ) ;
142+
119143const ToolsSection = observer (
120144 ( { data } : { data : EvaluationRowType [ "tools" ] } ) => (
121145 < MetadataSection title = "Tools" data = { data } />
@@ -130,6 +154,7 @@ const ChatInterfaceSection = observer(
130154
131155const ExpandedContent = observer (
132156 ( {
157+ row,
133158 messages,
134159 eval_metadata,
135160 evaluation_result,
@@ -138,6 +163,7 @@ const ExpandedContent = observer(
138163 input_metadata,
139164 tools,
140165 } : {
166+ row : EvaluationRowType ;
141167 messages : EvaluationRowType [ "messages" ] ;
142168 eval_metadata : EvaluationRowType [ "eval_metadata" ] ;
143169 evaluation_result : EvaluationRowType [ "evaluation_result" ] ;
@@ -157,6 +183,7 @@ const ExpandedContent = observer(
157183 < div className = "w-[500px] flex-shrink-0 space-y-3" >
158184 < EvalMetadataSection data = { eval_metadata } />
159185 < EvaluationResultSection data = { evaluation_result } />
186+ < IdSection data = { row } />
160187 < GroundTruthSection data = { ground_truth } />
161188 < UsageStatsSection data = { usage } />
162189 < InputMetadataSection data = { input_metadata } />
@@ -169,10 +196,10 @@ const ExpandedContent = observer(
169196
170197export const EvaluationRow = observer (
171198 ( { row } : { row : EvaluationRowType ; index : number } ) => {
172- const rowId = row . input_metadata . row_id ;
173- const isExpanded = state . isRowExpanded ( rowId ) ;
199+ const rolloutId = row . rollout_id ;
200+ const isExpanded = state . isRowExpanded ( rolloutId ) ;
174201
175- const toggleExpanded = ( ) => state . toggleRowExpansion ( rowId ) ;
202+ const toggleExpanded = ( ) => state . toggleRowExpansion ( rolloutId ) ;
176203
177204 return (
178205 < >
@@ -183,7 +210,7 @@ export const EvaluationRow = observer(
183210 >
184211 { /* Expand/Collapse Icon */ }
185212 < td className = "px-3 py-3 w-8" >
186- < ExpandIcon rowId = { rowId } />
213+ < ExpandIcon rolloutId = { rolloutId } />
187214 </ td >
188215
189216 { /* Name */ }
@@ -199,9 +226,9 @@ export const EvaluationRow = observer(
199226 />
200227 </ td >
201228
202- { /* Row ID */ }
229+ { /* Rollout ID */ }
203230 < td className = "px-3 py-3 text-xs" >
204- < RowId rowId = { row . input_metadata . row_id } />
231+ < RolloutId rolloutId = { row . rollout_id } />
205232 </ td >
206233
207234 { /* Model */ }
@@ -225,6 +252,7 @@ export const EvaluationRow = observer(
225252 < tr >
226253 < td colSpan = { 8 } className = "p-0" >
227254 < ExpandedContent
255+ row = { row }
228256 messages = { row . messages }
229257 eval_metadata = { row . eval_metadata }
230258 evaluation_result = { row . evaluation_result }
0 commit comments