fix(web): always show run size chip in run header

The size chip was gated on billing.total_usd_micros, so it only
appeared after a run reached a terminal state. summary.size is
always present, so render the chip unconditionally and only append
the billed amount to the tooltip when available.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-05-25 13:16:11 -04:00
parent 57d7d868c1
commit 7d4aa474fc
No known key found for this signature in database

View file

@ -562,8 +562,11 @@ export default function RunDetail({ params }: { params: { id: string } }) {
</span>
);
const totalUsdMicros = summary.billing?.total_usd_micros;
const sizeChip = totalUsdMicros != null && (
<Tooltip label={`Size ${summary.size} · ${formatUsdMicros(totalUsdMicros)} billed`}>
const sizeTooltip = totalUsdMicros != null
? `Size ${summary.size} · ${formatUsdMicros(totalUsdMicros)} billed`
: `Size ${summary.size}`;
const sizeChip = (
<Tooltip label={sizeTooltip}>
<span className="rounded bg-overlay px-1.5 py-0.5 font-mono text-xs font-bold text-fg-muted tabular-nums">
{summary.size}
</span>