Skip to content

Commit 3c2394a

Browse files
committed
fix(inference): tighten the revenue chart header
Shorten cached pricing labels in the plot subtitle and move the desktop chart action group upward to reduce wrapping. 中文:缩短 plot subtitle 中的缓存价格标签,并将桌面端图表操作按钮组上移,减少标题区域换行。
1 parent 9dda14d commit 3c2394a

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎packages/app/cypress/e2e/inference-chart.cy.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,7 @@ describe('Inference Chart', () => {
119119
cy.get('[data-testid="chart-figure"]')
120120
.first()
121121
.find('[data-testid="token-revenue-subtitle-prices"]')
122-
.should(
123-
'have.text',
124-
'Uncached input $1.122/M tok · Cached input $0.08/M tok · Output $3.366/M tok',
125-
)
122+
.should('have.text', 'Uncached $1.122/M tok · Cached $0.08/M tok · Output $3.366/M tok')
126123
.then(($prices) => {
127124
const subtitle = $prices.parent().text();
128125
expect(subtitle.indexOf($prices.text())).to.be.lessThan(subtitle.indexOf('Updated:'));
@@ -192,7 +189,7 @@ describe('Inference Chart', () => {
192189
.find('[data-testid="token-revenue-subtitle-prices"]')
193190
.should(
194191
'have.text',
195-
'未缓存输入 $1.122/百万 token · 缓存输入 $0.08/百万 token · 输出 $3.366/百万 token',
192+
'未缓存 $1.122/百万 token · 缓存 $0.08/百万 token · 输出 $3.366/百万 token',
196193
)
197194
.then(($prices) => {
198195
const subtitle = $prices.parent().text();

‎packages/app/src/components/inference/ui/ChartDisplay.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const STRINGS = {
113113
revenuePrices: (input: string, cached: string | null, output: string) =>
114114
cached === null
115115
? `Input $${input}/M tok · Output $${output}/M tok`
116-
: `Uncached input $${input}/M tok · Cached input $${cached}/M tok · Output $${output}/M tok`,
116+
: `Uncached $${input}/M tok · Cached $${cached}/M tok · Output $${output}/M tok`,
117117
updated: 'Updated:',
118118
e2eNormIntvtyDisclaimer:
119119
'E2E Normalized Interactivity requires persisted per-request traces, so unofficial-run overlays are unavailable for this experimental view.',
@@ -135,7 +135,7 @@ const STRINGS = {
135135
revenuePrices: (input: string, cached: string | null, output: string) =>
136136
cached === null
137137
? `输入 $${input}/百万 token · 输出 $${output}/百万 token`
138-
: `未缓存输入 $${input}/百万 token · 缓存输入 $${cached}/百万 token · 输出 $${output}/百万 token`,
138+
: `未缓存 $${input}/百万 token · 缓存 $${cached}/百万 token · 输出 $${output}/百万 token`,
139139
updated: '更新时间:',
140140
e2eNormIntvtyDisclaimer:
141141
'端到端归一化交互性需要持久化的逐请求 trace 数据,因此该实验性视图不支持非官方运行覆盖。',
@@ -845,6 +845,7 @@ export default function ChartDisplay({ embedded = false }: { embedded?: boolean
845845
<figure data-testid="chart-figure" className="relative rounded-lg">
846846
<ChartButtons
847847
chartId={`chart-${graphIndex}`}
848+
className="md:top-4"
848849
analyticsPrefix={
849850
isTimelineMode
850851
? 'gpu_timeseries'

0 commit comments

Comments
 (0)