feat(admin-ui): fit the Models catalog table without horizontal scroll

The table had 11 columns and scrolled at 1280px, hiding p50, p95 and error rate. It now shows compact price, one token column and a short error header. Context window stays in the model chip hover, and the :free flag moves into the price cell.
This commit is contained in:
2026-11-08 02:27:10 +00:00
parent 429edb873d
commit 1ec8aacee7
4 changed files with 98 additions and 84 deletions
+6
View File
@@ -216,6 +216,12 @@ export function formatModelCostHover(inputUsd: number, outputUsd: number): strin
return `in ${formatUsdPerMTok(inputUsd)} / out ${formatUsdPerMTok(outputUsd)} per MTok`
}
/** formatModelPriceShort is the table-cell form of formatModelCostHover: "$1.00 / $2.00" (input / output per MTok). */
export function formatModelPriceShort(inputUsd: number, outputUsd: number): string {
if (inputUsd === 0 && outputUsd === 0) return 'free'
return `${formatUsdPerMTok(inputUsd)} / ${formatUsdPerMTok(outputUsd)}`
}
/**
* formatLatencyMs renders a millisecond average (admin.go's
* adminLatencyView.avgTtfbMs/avgDurationMs — feat: latency panel) as a