@@ -2293,51 +2293,73 @@ export function ExperimentTrialsTable({
22932293 </ TooltipContent >
22942294 </ Tooltip >
22952295 </ div >
2296- { showAnalysis && task . current_version != null && (
2297- < span className = "inline-flex shrink-0 items-center rounded-[3px] bg-[color:var(--paper-bg-2)] px-1 py-px font-mono text-[9.5px] leading-none font-medium text-[color:var(--paper-ink-3)]" >
2298- v{ task . current_version }
2299- </ span >
2300- ) }
2301- { ! readOnly && ( ( ) => {
2296+ { ( ( ) => {
2297+ const showVersion =
2298+ showAnalysis && task . current_version != null ;
23022299 // Sum the trials actually rendered in this row's
23032300 // matrix (visible agent columns) so the badge
23042301 // tracks the grid when agent columns are hidden.
23052302 // Gathered/shared-task trials count: the badge
23062303 // prices the row being shown, matching the Cost
23072304 // tile.
2308- const c = sumTaskTrialCost ( orderedTrials ) ;
2305+ const cost = readOnly
2306+ ? null
2307+ : sumTaskTrialCost ( orderedTrials ) ;
23092308 // Agent cost only. QA spend is deliberately not
23102309 // annotated per row -- the row is already dense,
23112310 // and QA totals live on the experiment's Cost
23122311 // tile and on each task's own page.
2313- if (
2314- c . pricedCount === 0 ||
2315- ! hasDisplayableCostUsd ( c . costUsd )
2316- )
2317- return null ;
2318- const marks = costEstimateMarks (
2319- c . hasEstimated ,
2320- c . hasNative ,
2321- ) ;
2312+ const showCost =
2313+ cost != null &&
2314+ cost . pricedCount > 0 &&
2315+ hasDisplayableCostUsd ( cost . costUsd ) ;
2316+
2317+ if ( ! showVersion && ! showCost ) return null ;
2318+
2319+ const marks = showCost
2320+ ? costEstimateMarks (
2321+ cost . hasEstimated ,
2322+ cost . hasNative ,
2323+ )
2324+ : null ;
2325+ const costTone =
2326+ showCost && cost . hasEstimated
2327+ ? "text-amber-700 dark:text-amber-400"
2328+ : "text-[color:var(--paper-ink-3)]" ;
2329+
23222330 return (
2323- < Tooltip >
2324- < TooltipTrigger asChild >
2325- < span className = "inline-flex shrink-0 items-center font-mono text-[10px] leading-none font-medium tabular-nums text-[color:var(--paper-ink-3)]" >
2326- { marks . prefix }
2327- { formatCostUsd ( c . costUsd ) }
2328- { marks . suffix }
2331+ < div className = "flex shrink-0 flex-col items-end gap-0.5 leading-none" >
2332+ { showVersion && (
2333+ < span className = "inline-flex items-center rounded-[3px] bg-[color:var(--paper-bg-2)] px-1 py-px font-mono text-[9.5px] leading-none font-medium text-[color:var(--paper-ink-3)]" >
2334+ v{ task . current_version }
23292335 </ span >
2330- </ TooltipTrigger >
2331- < TooltipContent >
2332- Total cost across { c . pricedCount } priced
2333- trial{ c . pricedCount === 1 ? "" : "s" }
2334- { c . hasEstimated && c . hasNative
2335- ? " · * mixes native + token-estimated pricing"
2336- : c . hasEstimated
2337- ? " · ~ token-estimated pricing"
2338- : "" }
2339- </ TooltipContent >
2340- </ Tooltip >
2336+ ) }
2337+ { showCost &&
2338+ cost != null &&
2339+ marks != null && (
2340+ < Tooltip >
2341+ < TooltipTrigger asChild >
2342+ < span
2343+ className = { `inline-flex items-center font-mono text-[9px] leading-none font-medium tabular-nums ${ costTone } ` }
2344+ >
2345+ { marks . prefix }
2346+ { formatCostUsd ( cost . costUsd ) }
2347+ { marks . suffix }
2348+ </ span >
2349+ </ TooltipTrigger >
2350+ < TooltipContent >
2351+ Total cost across { cost . pricedCount } { " " }
2352+ priced trial
2353+ { cost . pricedCount === 1 ? "" : "s" }
2354+ { cost . hasEstimated && cost . hasNative
2355+ ? " · * mixes native + token-estimated pricing"
2356+ : cost . hasEstimated
2357+ ? " · ~ token-estimated pricing"
2358+ : "" }
2359+ </ TooltipContent >
2360+ </ Tooltip >
2361+ ) }
2362+ </ div >
23412363 ) ;
23422364 } ) ( ) }
23432365 { /* Jump from the experiment to this task's own
0 commit comments