Repository navigation
[PowerX] declutter the PowerX tab: chart above the fold, single control layer, shorter copy / 精简 PowerX 页面:图表置顶、单层控件、精简文案 - #1480
Merged
Conversation
…trol layer, shorter copy The PowerX tab opened on 39 controls and no data: four question tiles, a question line and a how-to-read line, an "Advanced settings" drawer that re-expressed Count / Show as / Split by as Boundary / Display / Compare, and three full-width control fieldsets pushed the chart card to y=925 at 1440x900. The same boundary was also named three ways on one screen. - Render the four questions as one compact segmented tab row (still a role=tablist with the same test ids and analytics); the hint moves to the button title. Drop the per-tab question and how-to-read lines. - Remove the Advanced settings drawer. Scope and Power statistic, the only controls it added, render under the tab toggles on the Power draw tab (Scope alone on per-token Energy) through a new `fields` prop on MeasuredMetricControls. URL params and API behaviour are unchanged. - On PowerX, put Benchmark Config, Chart Config and Compare history on one row and drop the Scenario / Precision select when it has a single locked option; fix the mobile "changed" count that counted the hidden Y-axis metric. - Copy: header description keeps its first sentence; chip-compare and drill-down subtitles cut to one short line; the power model revision footnote moves into the breakdown chart tooltip. - One vocabulary: `POWER_COUNT_LABELS` in lib/power/power-basis.ts feeds the Count toggle, and on the PowerX surface the legend Boundary rows, line-end labels, tooltip series line and table Series column say "GPU only / Whole system" instead of the registry names. CSV columns, API values and URL params keep the registry names. - Chart card top at 1440x900: 925 -> 780 (390x844: 1324 -> 1196). 中文:精简 PowerX 页面:四个问题改为一行紧凑的分段标签(保留 tablist 语义、 测试 id 与埋点,提示文字移入 title),删除每个标签页下的问题行与阅读说明行; 移除“高级设置”抽屉,仅把统计范围与功耗统计量放回标签切换下方(URL 参数与 API 行为不变);PowerX 上基准测试配置、图表配置与历史对比并排一行,只有一个选项 的场景/精度选择器不再显示;页头描述只保留第一句,芯片对比与下钻副标题缩短, 功耗模型版本脚注移入图表提示框;统一术语,PowerX 图例、曲线标签、提示框与表格 均使用“仅 GPU / 整体系统”。1440x900 下图表卡片顶部由 925px 提前到 780px。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…the legend rail Experimental re-sequencing of the PowerX tab, between the current control stack and the chart-only mock: every feature stays reachable, nothing is deleted, and no URL param or API value changes. - New `components/inference/powerx/`: `PowerXFrame` (section header, the four views as compact tabs with one tooltip hint each, Chart/Table and export on the right of the strip, one caption row with the model dropdown, scenario and precision toggles only when there is a choice, and the compact run chip with the changelog), `PowerXLegendControls` (Count, Per, Show as in the legend rail), `PowerXMoreViews` (collapsed expander with Scope, Power statistic, Compare boundaries, Split by and an Open power over time shortcut), `PowerXCurveSection`, `PowerXProvenance`, and the pure `powerx-views.ts` view/metric mapping that replaces `PowerXTabs.tsx`. - `ChartDisplay` renders through the frame on the PowerX surface only (embeds and minimal chrome keep the shared layout); it opens on energy per output token. `ChartControls`, the question tabs and the inline toggle rows no longer render there; model, scenario, precision, x-axis, chip config and date range still flow through InferenceContext and the URL, so share links, `?unofficialrun=` overlays, /zh and the views API are unchanged. - Where the power goes: the chip comparison is the visual; clicking a bar opens that chip's drill-down inline under it (`PowerAnalysisPanels` `layout="inline"`, compact `PowerBreakdownPanel` with a Collapse button, one shared stack legend); the boundary line chart sits in a collapsed "Compare on the curve" section. An empty selection now says so instead of leaving a gap. - Provenance strip under the chart (measured points, validated windows, power model revision, PUE) is the summary of the collapsed "How we measure" details; a pinned point's "View power trace" still opens the Over time view focused on that trace. - `ChartLegend` gains `controls`, `footer` and `mobileLabel` slots; `ScatterGraph` passes them through plus `plotHeight`. On phones the rail folds into a "Chips & options" row under the plot and the plot is capped at 55 % of the viewport; touch-action pan-y stays via D3Chart. - Tests: `powerx-views.test.ts` (view switching, Count/Per/Show as metric mapping, provenance text) and `PowerXLayout.test.tsx` (tab order and selection, legend controls per view, Split by reason, provenance strip, caption row, frame order, zh strings). Cypress specs updated for the More views expander and the energy default. Docs and the skills reference describe the v2 layout. 中文:PowerX v2 布局(实验性):图表优先,四个视图改为紧凑标签页(每 Token 能耗、功耗、功耗去向、随时间变化),图表/表格切换与导出按钮位于标签栏右侧; 标题下只保留一行说明(模型下拉、有选择时才显示的场景与精度切换、紧凑的运行 日期与变更日志)。统计范围、计量单位、显示方式移入图例栏,统计范围、功耗统计 量、对比功耗边界、拆分方式与“打开功耗随时间变化”收在折叠的“更多视图”中。 “功耗去向”以芯片对比为主视图,点击横条内联展开该芯片的下钻图,功耗边界曲线 为折叠区块。图表下方新增一行数据来源说明,点击展开“测量方法”。手机端图例折叠 为“芯片与选项”一行,图表高度上限为视口 55%。URL 参数与 API 行为不变,所有 功能仍可到达;新增单元测试并更新 Cypress 用例与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
…asis labels
Implements the four PowerX P0 items from the data-center / power-team
feedback on the existing v2 layout, on the PowerX surface only. No URL
parameter is renamed; the new boundary rides on `i_metric` like the others.
P0-1 IT-only power basis
- `lib/power/power-basis.ts`: fifth basis `it-modeled` ("All in Measured
IT (no PUE)") = `modeledSystemPower.deploymentItWatts ÷ gpuCount`, the
breakdown stack minus its facility part, from the same estimate the
facility figure uses (no new formula); `utilityModeledWatts =
itModeledWatts × PUE` at every point. New fields `itModeledWatts` /
`itModeledJPerOutputToken`, metric keys `y_itModeledWatts` /
`y_itModeledJPerOutputToken`, measured-metric configs, All in Measured
table rules and CSV, chart power envelope, compare variants (boundaries =
GPU only, IT, Facility; `all` = five lines), tooltips, legend/line labels.
- Count toggle is GPU only | IT (no PUE) | Facility (| All on Energy);
`POWER_COUNT_LABELS` names the facility boundary "Facility" so the
legend, pills, table series column and CSV share one vocabulary.
- `PowerXReadout` under the caption: IT W/GPU, GPUs per MW (1e6 ÷ IT W),
Facility W/GPU at PUE and measured GPU W for the hovered or pinned point
(ScatterGraph feeds an active-point context), else the point nearest
80 tok/s/user.
- Where the power goes stacks IT only by default; `PowerXFacilitySwitch`
(context state, default off) appends the PUE part;
`breakdownSeriesAtBoundary` derives the IT series for the chip
comparison, the drill-down and their tooltips; "Storage and out-of-rack
network are not modeled." sits under the bars.
P0-2 Measured-vs-TDP headroom
- ScatterGraph `powerx-headroom` layer (PowerX + % of TDP only): shades
between each chip's P90 draw (dotted) and 100 % TDP in the chip color.
- `lib/power/headroom.ts` + `PowerXHeadroomTable`: avg W, P90 W, % TDP
(P90) and headroom = 1 − P90/TDP at 25 / 50 / 100 / 300 tok/s/user via
`interpolateMetricAtInteractivity` (no extrapolation → "—"), one example
callout computed from the data, CSV download.
- Views API: `GET /api/v1/views/inference?headroom=true` returns the same
rows (`headroom.rows`), documented in OpenAPI, options defaults and the
skills reference.
P0-3 Load-swing statistics and export
- `lib/power/load-swing-stats.ts` (pure, unit-tested on a synthetic
trace): peak, min, idle floor (P5 before the window), window mean, P5 /
P95, max Δ1s / Δ5s, ramp up / down per second, volatility (std ÷ mean),
NVL72 rack scaling (× 72, upper bound); telemetry gaps are counted and
never bridged.
- New published route `GET /api/v1/gpu-metrics-point/stats?id=N
[&format=json|csv][&scale=gpu|nvl72]` serves the stats (or the 1 s
trace as CSV) from the same stored buckets with the same function.
- `PowerLoadSwings` above the Over time chart on PowerX: per-trace stats
row with % TDP for the Δ columns, "× 72 per NVL72 rack" switch with the
correlation caveat, per-point CSV / JSON downloads from the route; fixed
caveat line "1 s DCGM samples · single node · inference only ·
sub-second swings not captured" under the chart.
P0-4 Labels
- `PowerBasisPill` (GPU / IT / Facility) on readouts, table headers,
breakdown totals and the tooltip power-model block, explained once in
How we measure, which also gains the three-meanings-of-utilization note.
- Collapsed "What is PowerX?" line under the page description (en + zh).
Not built: P0-5 "Copy chart for Slack" (mock-only placeholder).
Tests: power-basis (IT identity), headroom, load-swing stats, stats route,
inference view headroom panel, power-breakdown IT boundary, powerx-views,
PowerXLayout (Count labels, readout, What is, basis key, facility switch),
power-compare / measured-metric-config expectations, Cypress component
spec labels; API route catalog digests and skills integrity refreshed.
中文:实现 PowerX P0 的四项功能(仅限 PowerX 页面,不改 URL 参数名):
(1) 新增 IT(不含 PUE)功耗口径 `it-modeled`,取自同一系统功耗模型的
deploymentItWatts ÷ GPU 数,即功耗构成堆叠去掉数据中心开销的部分;统计范围
改为“仅 GPU | IT(不含 PUE)| 数据中心”,标题行下方新增读数行(每 GPU IT
功耗、每 MW 可支持 GPU 数、按 PUE 计的数据中心功耗),“功耗去向”默认只堆叠
IT,新增“计入数据中心开销”开关。(2) 功耗按 TDP 占比显示时填充 P90 到
100% 的余量,并新增按交互性(25/50/100/300 tok/s/user)插值的余量表与
CSV 导出;views API 新增 `headroom=true`。(3) 新增负载波动统计(峰值、最小
值、空闲底线、均值、P5/P95、最大 1 s/5 s 变化、上升/下降速率、波动率,可按
NVL72 机架 ×72 换算)、新的只读接口 `/api/v1/gpu-metrics-point/stats`
(JSON 统计或 1 秒曲线 CSV)与下载按钮,图表下方固定注明“1 秒 DCGM 采样 ·
单节点 · 仅推理 · 不包含亚秒级波动”。(4) 所有功耗数值带 GPU / IT / 数据中心
标签,“测量方法”中统一解释并补充“利用率”的三种含义,页面描述下新增可折叠
的“什么是 PowerX?”。未实现 P0-5 的“复制图表到 Slack”(仅为 mock 占位)。
附带单元测试、API 文档、路由摘要与 skills 文档更新。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
…verlay bugs Copy - "How we measure" keeps three sentences: each point is one benchmark configuration; GPU power is measured every second and averaged over the validated serving window, other components are modeled; AgentX estimates are not calibrated against measured system power (AgentX only). The separate summary sentence, the three-tag key, the utilization paragraph, the basis assumptions and the All-in-Measured note are gone from the PowerX disclosure (the non-PowerX caption keeps its own notes). - Each GPU / IT / Facility pill explains its tag in its `title` only: "GPU board power, measured by DCGM", "GPU + modeled server, no PUE", "IT x PUE". - "What is PowerX?" is dropped; the description reads "Measured GPU power and energy per token for every benchmark point, with a modeled IT and facility breakdown." Layout (same chrome as /inference) - PowerX renders through the shared ChartDisplay frame: section header Card, the four views as a tab strip under the description, the Benchmark Config fieldset (Model / Scenario / Precision selectors), Chart Config (X-Axis Metric beside Count, Per or Show as, and the collapsed More views row) in place of the Y-axis pick, Compare history, the run date / run / changelog row; the Chart/Table toggle and export menu sit above the chart card, right-aligned; the chart card keeps the h2 caption, Updated / Source line, the readout as outline badges (the TCO badge row style), the plain Quick Filters legend and the footer notes, which now end with the provenance line + How we measure. - PowerXFrame, PowerXCaptionRow, PowerXWhatIs and the legend-rail controls are removed; headroom and load-swing tables use the validated-window summary table style; the Where view keeps its caption at the top of the card. Overlay bugs - % of TDP headroom: the y-axis reaches 100 % so the band ends at the TDP line instead of the plot edge; the SVG key text that sat over the top points is now a sentence in the table note. - Unofficial-run overlays get their own headroom band in the run color (`overlayRunColor`, filtered by `activeOverlayHwTypes`) and their own rows in the headroom table (run-colored dot, run tag, `source` CSV column); they were silently merged into the official chip before. - Chart tooltips clamp below the sticky site header instead of under it. - "More views" no longer wraps its label on phones. Tests: PowerXLayout, headroom (overlay rows), ScatterGraph PowerX overlay bands (new file), scatter-points tooltip clamp; the powerx-compare e2e asserts the new method sentence; docs updated. 中文:精简 PowerX 的测量说明文案(仅保留三句,标签含义移入 pill 的 title,删除“什么是 PowerX?”),让 PowerX 页面沿用 /inference 的布局与 组件(区块头、Benchmark Config / Chart Config / Compare history 字段集、 图表上方的 Chart/Table 与导出工具栏、相同的图表卡片与图例),并修复 重叠问题:TDP 余量阴影延伸到 100% 线且图内文字移到表格说明;非官方运行 overlay 拥有自己的余量阴影与表格行(按运行配色);图表提示框不再被 置顶站点页眉遮挡;手机端“更多视图”标签不再换行。补充/更新单元测试、 e2e 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
…daries on Power draw Where the power goes - The compared chip's drill-down (the "across load" stacked bars / stacked area panel) is open inline under its bar from the first render, not only after a click. The compared chip is the one whose point sits nearest the slider interactivity; moving the slider to another chip moves the panel with it. Clicking a bar or picking a chip in the panel's Hardware select pins it to that chip until the slider moves on; Collapse (or clicking the open bar) hides it for the rest of the session, and clicking a bar opens it again. Session state only, no URL parameter. - The compact panel keeps the "<chip> across load" title with its one-line subtitle, the Hardware select (now shown in compact mode too), the Stacked bars | Stacked area toggle (`i_pbview`), the TDP and All in Provisioned reference lines and the PNG / CSV buttons; the stack legend above the bars stays the only legend. A chip picked in the Hardware select that has no bar near the slider renders its panel after the list. - The collapsed "Compare on the curve" section (`PowerXCurveSection`) is removed from the Where view; the view's own compare mode is the new `i_pcompare=breakdown`, which overlays no series on the chart. Power draw - Count gains "All", as Energy per token already had: it sets `i_pcompare=boundaries` and draws GPU only (solid), IT no PUE (dashed) and Facility (dash-dot) per chip on the one scatter, with the existing Boundary legend section; X-Axis Metric and Show as apply as on any Power draw chart (% of TDP stays GPU-only). `powerXViewFor` keeps a boundary overlay on the metric's own view instead of sending it to Where. - The "Compare boundaries: All five" control under More views stays as the rated-lines variant, relabelled "Rated boundaries: Off | TDP + provisioned" (`selectPowerXRated`): on sets `all`, off returns to the measured three. It is offered only where the rated series exist, J per output token (`powerXRatedAvailable`); W per chip has no rated series, so All already draws every boundary there. Unofficial-run overlays are untouched (the chip comparison keeps its run-colored sources; the Power draw overlay path expands the same boundaries). Tests: new PowerAnalysisPanels jsdom test (default-expanded compared chip, slider follow, collapse persists, pin, Hardware select and Stacked bars | Stacked area in compact mode), powerx-views (breakdown mode, Count: All on Power draw, rated toggle), PowerXLayout (Count labels and states). Docs and the inferencex-api skill reference updated. 中文:“功耗去向”视图默认即在所对比芯片(最接近滑块交互性的芯片)的横条下方内联 展开“随负载变化”的堆叠柱状图 / 堆叠面积图面板,并随滑块切换芯片;点击横条或在 面板的硬件选择器中选择芯片会固定到该芯片,“收起”后在本次会话中保持收起,再次 点击横条可重新展开(仅会话状态,不写入 URL)。紧凑面板保留标题与一行副标题、 硬件选择器、“堆叠柱状图 | 堆叠面积图”切换(`i_pbview`)、TDP 与整体预配参考线 以及 PNG / CSV 按钮;横条上方的图例是唯一图例。移除“在曲线上对比”折叠区块,该 视图改用 `i_pcompare=breakdown`。“功耗”视图的“统计范围”新增“全部”(与“每 Token 能耗”一致):设置 `i_pcompare=boundaries`,在同一散点图上按芯片绘制仅 GPU (实线)、IT(虚线)与数据中心(点划线),沿用现有“功耗边界”图例;横轴指标与 显示方式控件照常生效。“更多视图”中的对比功耗边界控件改为“额定边界:关闭 | TDP + 整体预配”,仅在存在额定序列(每输出 token 能耗)时可用。非官方运行 overlay 行为不变。补充 PowerAnalysisPanels 单元测试并更新 powerx-views、PowerXLayout 测试、文档与 inferencex-api skill 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
…fig out like /inference - Footer: remove the "N measured points · validated windows · power model rev · PUE" line (`powerXProvenanceText`, `PowerXProvenance`); the collapsed "How we measure" details stays as a plain muted link (`PowerXMethod`) with the same method sentences. - Chart Config: remove the "More views" expander (`PowerXMoreViews`) and the "Open power over time" shortcut. Scope, Power statistic and Rated boundaries are plain labelled controls beside X-Axis Metric, Count and Per / Show as, each shown only on the views where it applies; Split by stays in the Where the power goes card. - Update unit tests, Cypress specs, docs/powerx-permanent-view.md, the skills dashboard-views reference and integrity.json. 中文:移除 PowerX 页脚的来源信息行(实测数据点数、验证窗口、功耗模型版本、PUE), 仅保留折叠的“测量方法”链接;移除图表配置中的“更多视图”折叠区和“打开功耗随时间变化” 按钮,统计范围、功耗统计量与额定边界改为与 /inference 相同布局的普通控件,仅在适用 的视图上显示;拆分方式仍位于“功耗去向”卡片。同步更新单元测试、Cypress 用例、文档与 skills 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
…ted with GPU only The PowerX Count, Per or Show as, Scope, Power statistic and Rated boundaries controls sat in one flex-wrap box inside the second Chart Config column, so X-Axis Metric stood alone on the left while the rest stacked tall on the right. They now render as `contents`, so each one is a cell of the same grid /inference uses: the X-Axis Metric column stays 11rem (18rem on agentic traces) and the rest of the row splits in two. Row one is X-Axis Metric and Count (two cells, equal segments); row two is Per or Show as, then Scope and Power statistic or Rated boundaries, flowing left to right with no empty cells. Every control fills its cell, toggles wrap instead of overflowing, and each label carries the same (i) help as X-Axis Metric. Below sm every control is a row inside the "More chart controls" fold, whose changed count now includes the PowerX controls (`powerXChangedCount`). The Chinese Count label becomes 统计口径 so it no longer shares a name with Scope (统计范围). Rated boundaries is now Off | All-in provisioned and draws exactly two lines per chip: measured GPU power (solid) and the all-in provisioned bound (dashed), with no IT, Facility or GPU-level TDP line, so the chart stays readable. It has its own compare value, `i_pcompare=provisioned` (`PROVISIONED_COMPARE_BASES`), and the Boundary legend lists just those two; the five-line `all` stays reachable from share links only. Docs and the inferencex-skills reference follow. 中文:PowerX 的统计口径、计量单位/显示为、统计范围、功耗统计量与额定边界 控件原先挤在图表配置第二列的一个 flex-wrap 容器中,导致 X 轴指标独占左列、 其余控件在右列纵向堆叠。现改为 `contents` 渲染,使每个控件成为 /inference 同一网格的单元格:X 轴指标列保持 11rem(智能体场景 18rem),其余宽度平分为 两列。第一行为 X 轴指标与统计口径(占两格、等宽分段),第二行为计量单位或 显示为、统计范围、功耗统计量或额定边界,自左向右排布、无空格。各控件填满 单元格,分段切换换行而不溢出,标签带有与 X 轴指标相同的 (i) 说明。sm 以下 每个控件独占一行,位于“更多图表设置”折叠区内,其“已更改”计数现包含 PowerX 控件(`powerXChangedCount`)。中文“统计口径”取代原“统计范围”,避免与 Scope (统计范围)同名。 额定边界改为“关闭 | 整体预配”,每芯片仅绘制两条线:GPU 实测功耗(实线)与 整体预配功耗(虚线),不再绘制 IT、数据中心或 GPU 级 TDP 线,以降低认知负担。 它使用独立的对比值 `i_pcompare=provisioned`(`PROVISIONED_COMPARE_BASES`), 图例“功耗边界”仅列出这两项;五条线的 `all` 仅能通过分享链接访问。文档与 inferencex-skills 参考同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
Remove the collapsed "How we measure" details (`PowerXMethod`) from the PowerX chart footer, its en/zh strings, its unit tests and the Cypress assertion on it. The shared /inference footer notes stay as they are; the GPU / IT / Facility tag meaning now lives only in each pill's `title`. Docs and the inferencex-skills dashboard-views reference no longer point at the note; the skills integrity manifest is regenerated. 中文:移除 PowerX 图表页脚中折叠的“测量方法”说明(`PowerXMethod`)及其中英文文案、 单元测试和 Cypress 断言。/inference 共用的页脚说明保持不变;GPU / IT / 数据中心 标签的含义仅保留在各标签自身的 `title` 提示框中。文档与 inferencex-skills 的 dashboard-views 参考不再指向该说明,并重新生成 skills integrity 清单。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
PowerX no longer shows the "Shift+Scroll to zoom • Drag to pan • Double-click to reset • Click a point to pin tooltip" line (nor its touch variant) under its charts: ScatterGraph and PowerTimeline pass an empty `instructions` when `usePowerXSurface()` is true; the breakdown panels already did. The "Completed requests across all resident points" ISL/OSL footer is gated off on PowerX too, and ChartDisplay skips the resident-sequence-lengths query there. /inference, embeds and the `minimalChrome` path are unchanged. Tests: ScatterGraph.powerx-chrome.test.tsx covers the hint on /inference, PowerX and minimal chrome; powerx-compare.cy.ts adds an official-only agentic PowerX case asserting no hint, no ISL/OSL footer and no sketch request; powerx-timeline.cy.ts asserts no hint under the timeline. 中文:PowerX 页面不再在图表下方显示「按住 Shift 滚动以缩放 · 拖动以平移 · 双击以重置 · 点击数据点固定提示框」交互提示(含触屏版本),ScatterGraph 与 PowerTimeline 在 usePowerXSurface() 为真时传入空 instructions;同时隐藏 「当前所有数据点的已完成请求」ISL/OSL 页脚,并在 PowerX 上跳过 resident-sequence-lengths 查询。/inference、嵌入页与 minimalChrome 行为不变。 新增单元测试与 Cypress 用例覆盖上述三种 PowerX 视图。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
… area default Where the power goes, per Oren's review of #1480: - The across-load drill-down opens on the stacked area view; `i_pbview=bars` still selects the stacked bars and the toggle stays. - "Server parts" is split into the pinned power model's real component classes. The breakdown now carries, in stack order, gpu (measured), measuredCpu (Grace socket telemetry, CPU + LPDDR), cpu, memory, nic (NIC cards + system-side optics), nvswitch (NVSwitch ASICs and the NVL72 switch tray incl. its embedded EPYC), storage, other (PCIe switches, retimers, shelf controllers), fans, psuLoss (AC/DC + DC/DC conversion loss), network and facility. `systemPowerLeafCategory` maps leaf names to parts and the test pins the full leaf table across every supported system; a renamed upstream component lands in `other` and fails it. AMD chassis have no nvswitch, B300 has no other, NVL72 rows with measured sockets have no cpu/memory. The parts still sum to All in Measured W/GPU (IT + facility). - One colour per part, shared by every chip, so a single SKU's layers are tellable apart: `--power-part-*` tokens next to the `--overlay-run-*` palette in globals.css with light, dark and minecraft values. Measured layers are solid, modeled layers keep the hatch over a lighter fill of their own colour, facility is the lightest hatch; the chip's vendor colour stays on its legend dot, the area's top edge and total dots. Legend swatches, tooltip rows and the chip-compare segments use the same swatches. - API: `powerBreakdowns[].categories` and `wattsPerGpu` carry the new keys; OpenAPI schema, route-catalog digest, skills reference (+ integrity) and the PowerX docs updated; CSV export has one column per part. 中文:PowerX「功耗去向」视图改为默认显示堆叠面积图(`i_pbview=bars` 仍可切回堆叠柱状图); 「服务器部件」按功耗模型的真实组件拆分为 CPU、内存、网卡、NVSwitch、存储、PCIe 及其他、 风扇、电源损耗、网络分摊与机房开销,各部分之和仍等于 All in Measured W/GPU,并以测试 固定了全部系统的叶子组件到分类的映射;每个分类使用站点统一的独立颜色(globals.css 中 的 `--power-part-*` token,含浅色/深色主题),实测层为实色、建模层保留斜线,芯片厂商色 仅用于图例圆点与总功耗轮廓;API 响应、OpenAPI、路由目录摘要、skills 参考与文档同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
…bels Where the power goes, after Wenyao's review of the per-part palette in #1480: - One hue per chip again. Every layer is a lightness step of the chip's own colour: `powerLayerOpacity(index, count)` runs linearly from 0.92 at the measured GPU base to 0.14 at the top over the parts that series actually has, so a 9-, 10- or 12-deep stack keeps evenly spaced, tellable steps, and a 1 px chip-colour stroke at 0.6 separates neighbours. The `--power-part-*` tokens, `powerCategoryColor`, the hatch patterns, `HATCH_ANGLE` and `cssHatchAngle` are gone; "Modeled" survives as a dashed swatch outline and the tooltip's basis column. - Interaction tells the bands apart. Hovering a band, its legend row or its edge label raises it to full opacity with a 1.5 px stroke and fades the rest to 0.25, with a small name + W/GPU label at the pointer (interpolated at the hovered x on the area, the column value on bars); clicking a legend row pins it (`aria-pressed`), a second click, Escape or a click on the plot unpins, a tap on a band pins on touch. The highlighted row is bold in the per-column tooltip. The state is shared between the chip comparison's legend, its bar segments and the open drill-down (`usePowerLayerHighlight`), so hovering "NICs" lights NICs on every chip. `powerx_breakdown_layer_highlighted`. - The area view labels every band at its right edge (name + W at the last point) in the right margin with a leader to the band centre; `placeEndLabels` pushes collisions apart at 12 px in stack order and the margin widens to the longest label. Below `sm` the labels are skipped so the plot keeps its width. - Legend rows are swatch + name in stack order; Measured/Modeled live in the swatch title. Comparison segments use the same ramp on each chip's colour. - Unofficial-run series get the same ramp from `overlayRunColor(runIndex)`: `buildPowerBreakdownsWithOverlays` keeps each run as its own `hwKey|precision|run<N>` series with the run tag, dashboard only (the API keeps `buildPowerBreakdowns`). - Kept from e727923: the twelve component categories, the API/skills contract, stacked area by default, the bars toggle, the per-column tooltip and CSV. - Tests: ramp monotone and distinct at 12 and 9 deep, band interpolation, end-label placement, overlay series; a jsdom harness that runs the panel's D3 layers covers legend hover/pin/Escape, plot hover, edge labels, margin, overlay colour and the chip-compare legend highlight. 中文:PowerX「功耗去向」堆叠图回到单一色相:每一层都是该芯片自身颜色的明度梯度 (`powerLayerOpacity` 按该系列实际存在的部件数从 0.92 线性降到 0.14,层间以 1 px 芯片色描边分隔),移除 `--power-part-*` 配色与斜线填充;「建模」改由图例色块的虚线边框和 提示框中的「建模」列表示。各层靠交互区分:悬停图层、图例项或右侧标签时该层提亮、其余层 淡化并显示名称与该 x 处的 W/GPU,点击图例固定高亮(`aria-pressed`),再次点击、Escape 或点击绘图区取消,触屏点按图层即固定;高亮状态在芯片对比图例、对比柱段与展开的下钻图之间 共享。堆叠面积图在右侧按堆叠顺序为每层标注名称与末点功耗,重叠时按 12 px 逐个推开并自动 加宽右边距,窄于 `sm` 时不显示。非官方 run 的系列以 `overlayRunColor` 使用同样的梯度。 保留 e727923 的十二个部件分类、API/skills 契约、默认堆叠面积图、柱状切换、提示框与 CSV 导出,并补充单元测试。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
Where the power goes, after Wenyao's review of the single-hue stack in #1480 ("this is not that clear"): stop drawing eleven parts in one stacked area and split the view into overview plus detail. - Overview: the drill-down's area and bars, and each chip-compare bar, collapse to three bands in stack order: Measured GPU (`gpu` + `measuredCpu`), Modeled server (`cpu`, `memory`, `nic`, `nvswitch`, `storage`, `other`, `fans`, `psuLoss`, `network`) and Facility overhead (`facility`, only when the facility is counted). `powerBandOpacity` gives each band a fixed step of the chip colour (0.92 / 0.53 / 0.14, the generic `powerLayerOpacity` called with 3), so the modeled band reads the same with or without the facility. The 1 px edges, the heavier top edge, the three right-edge labels with their watts at the last point, the hover/pin highlight and the per-column tooltip stay; the tooltip keeps every part under its band's bold subtotal. The legend shows the three bands; measured vs modeled stays as the dashed swatch outline and the tooltip word. A chip-compare modeled segment's `title` lists its parts and watts. - Detail: `PowerPartsList` sits right of the plot from `lg` (the plot keeps two thirds) and under it below. Its header is the compared point (`B200 (vLLM) FP4 · c16 · 88 tok/s/user`); one row per non-empty part of that chip, heaviest first, the facility row last under a rule: short name, a bar on a faint track in the band's step (dashed left edge when modeled), the watts, the share of IT (the facility row: of the facility total) and a 72×18 sparkline of that part across the chip's points on its own 0..max scale with the compared point dotted. The row `title` reads Measured, Modeled · fixed or Modeled · moves with load (`POWER_PART_BEHAVIOUR`, cross-checked against the model in tests). The list follows the slider and the Hardware select exactly as the plot's dashed outline does; off the comparison's range it reads the nearest point (`nearestBreakdownPoint`). - Shared highlight: `PowerLayerHighlight` is now `{ band, category, pinned }` and `usePowerLayerHighlight` takes a target, `bandTarget(band)` from the plot, legends and chip bars or `partTarget(category)` from a list row, so a hovered row raises its band everywhere and the row lights (`powerPart Emphasis`: highlighted, a sibling of a plot-hovered band, or plain). Click pins, Escape unpins. `powerx_breakdown_part_hovered` / `_pinned` on the rows; `powerx_breakdown_layer_highlighted` keeps the band events. - Overlay runs get the same bands, list and sparklines in `overlayRunColor(runIndex)`. - Removed with the collapse: the twelve-step ramp, `stackPowerBreakdown`, per-part legend rows and end labels, `data-category` on the drawn layers (now `data-band`). `SYSTEM_POWER_CATEGORIES` and the API are untouched. - Tests: bands, stacking, part rows (sort, shares, history), sparkline geometry, behaviour table vs the model, nearest point; the jsdom harness covers the three bands, legend, tooltip structure, edge labels, plot hover, list hover/pin/Escape, overlay colour and the chip-compare link; `PowerPartsList.test.tsx` covers the list alone in en and zh. Cypress component assertions updated for bands and the list. - Docs: `docs/powerx-permanent-view.md` and the skills dashboard-views reference (integrity regenerated). 中文:PowerX「功耗去向」下钻图不再把十一个部件画在同一张堆叠面积图里,而是拆成 「总览 + 明细」:面积图、柱状图和芯片对比横条都合并为三段(实测 GPU、建模服务器、 机房开销,仅在计入机房开销时显示),每段为芯片颜色的固定明度梯度,保留 1 px 分隔线、 右侧三条带末点功耗的标签、悬停/固定高亮和逐列提示框(提示框在各段加粗小计下仍列出 全部部件);明细由图旁新增的部件列表承担(`lg` 以上在图右侧,以下在图下方):表头为 对比点,每行一个非空部件,按功耗降序、机房开销置于末行,含名称、按功耗比例的小条、 瓦数、占 IT 比例和该部件随负载变化的迷你面积图(各自 0..最大值刻度,对比点打点), 行 `title` 标注实测 / 建模·固定 / 建模·随负载变化;悬停某行会在图中提亮其所属分段, 点击固定、Escape 取消;列表随滑块和硬件选择同步。非官方 run 以 `overlayRunColor` 使用相同的三段与列表。移除十二级梯度和逐部件图例;`SYSTEM_POWER_CATEGORIES` 与 API 不变。补充单元测试、Cypress 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
…arts list The breakdown plot, the comparison bars and the legends go back to the treatment the panel had before the component-level and single-hue passes: six layers in stack order (Measured GPU, Measured Grace CPU, Server parts, Fans + PSU loss, Network share, Facility overhead), each a fixed opacity step of the chip colour (0.9 / 0.72 / 0.5 / 0.34 / 0.2, hatch tint 0.18) like the Profit Estimator's stacked bars, every modeled layer hatched at its own stripe angle (45 / 45 / 45 / 135 / 0 / 90 deg) like its loss segment, measured layers solid. The twelve API parts stay; the layers are a mapping over them (`POWER_BANDS` / `POWER_BAND_CATEGORIES`: server = cpu + memory + nic + nvswitch + storage + other, fansPsu = fans + psuLoss), so the API, CSV and skills contract from the component-level pass are untouched. Kept from the later passes: stacked area by default (`i_pbview`), the bars toggle, the per-column tooltip with bold layer subtotals (a layer that folds several parts lists them beneath), the parts list beside the plot with hover/pin through `usePowerLayerHighlight` (a hovered layer keeps its step and hatch, its edge thickens, the others fade to 0.25), overlay runs in `overlayRunColor`, and the download button. Dropped: the right-edge layer labels and the three-band opacity ramp. Tests cover the mapping, the opacity and hatch tables, the pattern defs, the legend order and swatches, the tooltip rows, the highlight states, the chip-compare segments and the overlay path; the Cypress component spec checks the five legend rows, the patterns and the absence of edge labels. Docs and the skills reference describe the six hatched layers; the route catalog digest for `utils/power-breakdown.ts` is refreshed (presentation only, no API change). 中文:恢复 PowerX 功耗构成图原有的六层斜线填充样式,并保留图旁的部件列表。 六层按堆叠顺序为实测 GPU、实测 Grace CPU、服务器部件、风扇 + 电源损耗、网络分摊、 机房开销,每层为芯片颜色的固定透明度阶梯,建模层按各自角度画斜线,实测层为纯色。 API 的十二个部件不变,六层只是其映射;保留默认堆叠面积图、提示框分层小计、 部件列表的悬停/固定联动、非官方运行叠加与下载按钮;去掉右侧边缘标签与三段透明度渐变。 相应更新了单元测试、Cypress 组件测试、文档与 skills 参考,并刷新了路由目录摘要。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
edwingao28
marked this pull request as ready for review
October 27, 2026 07:44
Bugbot is paused — your team has an unpaid invoiceBugbot is paused because your team has an unpaid invoice. Pay it from the billing page in the Cursor dashboard and Bugbot resumes automatically. (requestId: d081b3d2-d4a9-4a97-90d4-b729b3049841) |
edwingao28
added a commit
that referenced
this pull request
Oct 27, 2026
… view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 (#1478) * [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 * [PowerX] declutter the PowerX tab: chart above the fold, single control layer, shorter copy / 精简 PowerX 页面:图表置顶、单层控件、精简文案 (#1480) * feat(powerx): declutter the PowerX tab: chart above the fold, one control layer, shorter copy The PowerX tab opened on 39 controls and no data: four question tiles, a question line and a how-to-read line, an "Advanced settings" drawer that re-expressed Count / Show as / Split by as Boundary / Display / Compare, and three full-width control fieldsets pushed the chart card to y=925 at 1440x900. The same boundary was also named three ways on one screen. - Render the four questions as one compact segmented tab row (still a role=tablist with the same test ids and analytics); the hint moves to the button title. Drop the per-tab question and how-to-read lines. - Remove the Advanced settings drawer. Scope and Power statistic, the only controls it added, render under the tab toggles on the Power draw tab (Scope alone on per-token Energy) through a new `fields` prop on MeasuredMetricControls. URL params and API behaviour are unchanged. - On PowerX, put Benchmark Config, Chart Config and Compare history on one row and drop the Scenario / Precision select when it has a single locked option; fix the mobile "changed" count that counted the hidden Y-axis metric. - Copy: header description keeps its first sentence; chip-compare and drill-down subtitles cut to one short line; the power model revision footnote moves into the breakdown chart tooltip. - One vocabulary: `POWER_COUNT_LABELS` in lib/power/power-basis.ts feeds the Count toggle, and on the PowerX surface the legend Boundary rows, line-end labels, tooltip series line and table Series column say "GPU only / Whole system" instead of the registry names. CSV columns, API values and URL params keep the registry names. - Chart card top at 1440x900: 925 -> 780 (390x844: 1324 -> 1196). 中文:精简 PowerX 页面:四个问题改为一行紧凑的分段标签(保留 tablist 语义、 测试 id 与埋点,提示文字移入 title),删除每个标签页下的问题行与阅读说明行; 移除“高级设置”抽屉,仅把统计范围与功耗统计量放回标签切换下方(URL 参数与 API 行为不变);PowerX 上基准测试配置、图表配置与历史对比并排一行,只有一个选项 的场景/精度选择器不再显示;页头描述只保留第一句,芯片对比与下钻副标题缩短, 功耗模型版本脚注移入图表提示框;统一术语,PowerX 图例、曲线标签、提示框与表格 均使用“仅 GPU / 整体系统”。1440x900 下图表卡片顶部由 925px 提前到 780px。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): v2 layout: chart first, four views as tabs, options in the legend rail Experimental re-sequencing of the PowerX tab, between the current control stack and the chart-only mock: every feature stays reachable, nothing is deleted, and no URL param or API value changes. - New `components/inference/powerx/`: `PowerXFrame` (section header, the four views as compact tabs with one tooltip hint each, Chart/Table and export on the right of the strip, one caption row with the model dropdown, scenario and precision toggles only when there is a choice, and the compact run chip with the changelog), `PowerXLegendControls` (Count, Per, Show as in the legend rail), `PowerXMoreViews` (collapsed expander with Scope, Power statistic, Compare boundaries, Split by and an Open power over time shortcut), `PowerXCurveSection`, `PowerXProvenance`, and the pure `powerx-views.ts` view/metric mapping that replaces `PowerXTabs.tsx`. - `ChartDisplay` renders through the frame on the PowerX surface only (embeds and minimal chrome keep the shared layout); it opens on energy per output token. `ChartControls`, the question tabs and the inline toggle rows no longer render there; model, scenario, precision, x-axis, chip config and date range still flow through InferenceContext and the URL, so share links, `?unofficialrun=` overlays, /zh and the views API are unchanged. - Where the power goes: the chip comparison is the visual; clicking a bar opens that chip's drill-down inline under it (`PowerAnalysisPanels` `layout="inline"`, compact `PowerBreakdownPanel` with a Collapse button, one shared stack legend); the boundary line chart sits in a collapsed "Compare on the curve" section. An empty selection now says so instead of leaving a gap. - Provenance strip under the chart (measured points, validated windows, power model revision, PUE) is the summary of the collapsed "How we measure" details; a pinned point's "View power trace" still opens the Over time view focused on that trace. - `ChartLegend` gains `controls`, `footer` and `mobileLabel` slots; `ScatterGraph` passes them through plus `plotHeight`. On phones the rail folds into a "Chips & options" row under the plot and the plot is capped at 55 % of the viewport; touch-action pan-y stays via D3Chart. - Tests: `powerx-views.test.ts` (view switching, Count/Per/Show as metric mapping, provenance text) and `PowerXLayout.test.tsx` (tab order and selection, legend controls per view, Split by reason, provenance strip, caption row, frame order, zh strings). Cypress specs updated for the More views expander and the energy default. Docs and the skills reference describe the v2 layout. 中文:PowerX v2 布局(实验性):图表优先,四个视图改为紧凑标签页(每 Token 能耗、功耗、功耗去向、随时间变化),图表/表格切换与导出按钮位于标签栏右侧; 标题下只保留一行说明(模型下拉、有选择时才显示的场景与精度切换、紧凑的运行 日期与变更日志)。统计范围、计量单位、显示方式移入图例栏,统计范围、功耗统计 量、对比功耗边界、拆分方式与“打开功耗随时间变化”收在折叠的“更多视图”中。 “功耗去向”以芯片对比为主视图,点击横条内联展开该芯片的下钻图,功耗边界曲线 为折叠区块。图表下方新增一行数据来源说明,点击展开“测量方法”。手机端图例折叠 为“芯片与选项”一行,图表高度上限为视口 55%。URL 参数与 API 行为不变,所有 功能仍可到达;新增单元测试并更新 Cypress 用例与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): P0: IT-only basis, TDP headroom, load-swing stats and basis labels Implements the four PowerX P0 items from the data-center / power-team feedback on the existing v2 layout, on the PowerX surface only. No URL parameter is renamed; the new boundary rides on `i_metric` like the others. P0-1 IT-only power basis - `lib/power/power-basis.ts`: fifth basis `it-modeled` ("All in Measured IT (no PUE)") = `modeledSystemPower.deploymentItWatts ÷ gpuCount`, the breakdown stack minus its facility part, from the same estimate the facility figure uses (no new formula); `utilityModeledWatts = itModeledWatts × PUE` at every point. New fields `itModeledWatts` / `itModeledJPerOutputToken`, metric keys `y_itModeledWatts` / `y_itModeledJPerOutputToken`, measured-metric configs, All in Measured table rules and CSV, chart power envelope, compare variants (boundaries = GPU only, IT, Facility; `all` = five lines), tooltips, legend/line labels. - Count toggle is GPU only | IT (no PUE) | Facility (| All on Energy); `POWER_COUNT_LABELS` names the facility boundary "Facility" so the legend, pills, table series column and CSV share one vocabulary. - `PowerXReadout` under the caption: IT W/GPU, GPUs per MW (1e6 ÷ IT W), Facility W/GPU at PUE and measured GPU W for the hovered or pinned point (ScatterGraph feeds an active-point context), else the point nearest 80 tok/s/user. - Where the power goes stacks IT only by default; `PowerXFacilitySwitch` (context state, default off) appends the PUE part; `breakdownSeriesAtBoundary` derives the IT series for the chip comparison, the drill-down and their tooltips; "Storage and out-of-rack network are not modeled." sits under the bars. P0-2 Measured-vs-TDP headroom - ScatterGraph `powerx-headroom` layer (PowerX + % of TDP only): shades between each chip's P90 draw (dotted) and 100 % TDP in the chip color. - `lib/power/headroom.ts` + `PowerXHeadroomTable`: avg W, P90 W, % TDP (P90) and headroom = 1 − P90/TDP at 25 / 50 / 100 / 300 tok/s/user via `interpolateMetricAtInteractivity` (no extrapolation → "—"), one example callout computed from the data, CSV download. - Views API: `GET /api/v1/views/inference?headroom=true` returns the same rows (`headroom.rows`), documented in OpenAPI, options defaults and the skills reference. P0-3 Load-swing statistics and export - `lib/power/load-swing-stats.ts` (pure, unit-tested on a synthetic trace): peak, min, idle floor (P5 before the window), window mean, P5 / P95, max Δ1s / Δ5s, ramp up / down per second, volatility (std ÷ mean), NVL72 rack scaling (× 72, upper bound); telemetry gaps are counted and never bridged. - New published route `GET /api/v1/gpu-metrics-point/stats?id=N [&format=json|csv][&scale=gpu|nvl72]` serves the stats (or the 1 s trace as CSV) from the same stored buckets with the same function. - `PowerLoadSwings` above the Over time chart on PowerX: per-trace stats row with % TDP for the Δ columns, "× 72 per NVL72 rack" switch with the correlation caveat, per-point CSV / JSON downloads from the route; fixed caveat line "1 s DCGM samples · single node · inference only · sub-second swings not captured" under the chart. P0-4 Labels - `PowerBasisPill` (GPU / IT / Facility) on readouts, table headers, breakdown totals and the tooltip power-model block, explained once in How we measure, which also gains the three-meanings-of-utilization note. - Collapsed "What is PowerX?" line under the page description (en + zh). Not built: P0-5 "Copy chart for Slack" (mock-only placeholder). Tests: power-basis (IT identity), headroom, load-swing stats, stats route, inference view headroom panel, power-breakdown IT boundary, powerx-views, PowerXLayout (Count labels, readout, What is, basis key, facility switch), power-compare / measured-metric-config expectations, Cypress component spec labels; API route catalog digests and skills integrity refreshed. 中文:实现 PowerX P0 的四项功能(仅限 PowerX 页面,不改 URL 参数名): (1) 新增 IT(不含 PUE)功耗口径 `it-modeled`,取自同一系统功耗模型的 deploymentItWatts ÷ GPU 数,即功耗构成堆叠去掉数据中心开销的部分;统计范围 改为“仅 GPU | IT(不含 PUE)| 数据中心”,标题行下方新增读数行(每 GPU IT 功耗、每 MW 可支持 GPU 数、按 PUE 计的数据中心功耗),“功耗去向”默认只堆叠 IT,新增“计入数据中心开销”开关。(2) 功耗按 TDP 占比显示时填充 P90 到 100% 的余量,并新增按交互性(25/50/100/300 tok/s/user)插值的余量表与 CSV 导出;views API 新增 `headroom=true`。(3) 新增负载波动统计(峰值、最小 值、空闲底线、均值、P5/P95、最大 1 s/5 s 变化、上升/下降速率、波动率,可按 NVL72 机架 ×72 换算)、新的只读接口 `/api/v1/gpu-metrics-point/stats` (JSON 统计或 1 秒曲线 CSV)与下载按钮,图表下方固定注明“1 秒 DCGM 采样 · 单节点 · 仅推理 · 不包含亚秒级波动”。(4) 所有功耗数值带 GPU / IT / 数据中心 标签,“测量方法”中统一解释并补充“利用率”的三种含义,页面描述下新增可折叠 的“什么是 PowerX?”。未实现 P0-5 的“复制图表到 Slack”(仅为 mock 占位)。 附带单元测试、API 文档、路由摘要与 skills 文档更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): cut the method copy, match the /inference layout, fix overlay bugs Copy - "How we measure" keeps three sentences: each point is one benchmark configuration; GPU power is measured every second and averaged over the validated serving window, other components are modeled; AgentX estimates are not calibrated against measured system power (AgentX only). The separate summary sentence, the three-tag key, the utilization paragraph, the basis assumptions and the All-in-Measured note are gone from the PowerX disclosure (the non-PowerX caption keeps its own notes). - Each GPU / IT / Facility pill explains its tag in its `title` only: "GPU board power, measured by DCGM", "GPU + modeled server, no PUE", "IT x PUE". - "What is PowerX?" is dropped; the description reads "Measured GPU power and energy per token for every benchmark point, with a modeled IT and facility breakdown." Layout (same chrome as /inference) - PowerX renders through the shared ChartDisplay frame: section header Card, the four views as a tab strip under the description, the Benchmark Config fieldset (Model / Scenario / Precision selectors), Chart Config (X-Axis Metric beside Count, Per or Show as, and the collapsed More views row) in place of the Y-axis pick, Compare history, the run date / run / changelog row; the Chart/Table toggle and export menu sit above the chart card, right-aligned; the chart card keeps the h2 caption, Updated / Source line, the readout as outline badges (the TCO badge row style), the plain Quick Filters legend and the footer notes, which now end with the provenance line + How we measure. - PowerXFrame, PowerXCaptionRow, PowerXWhatIs and the legend-rail controls are removed; headroom and load-swing tables use the validated-window summary table style; the Where view keeps its caption at the top of the card. Overlay bugs - % of TDP headroom: the y-axis reaches 100 % so the band ends at the TDP line instead of the plot edge; the SVG key text that sat over the top points is now a sentence in the table note. - Unofficial-run overlays get their own headroom band in the run color (`overlayRunColor`, filtered by `activeOverlayHwTypes`) and their own rows in the headroom table (run-colored dot, run tag, `source` CSV column); they were silently merged into the official chip before. - Chart tooltips clamp below the sticky site header instead of under it. - "More views" no longer wraps its label on phones. Tests: PowerXLayout, headroom (overlay rows), ScatterGraph PowerX overlay bands (new file), scatter-points tooltip clamp; the powerx-compare e2e asserts the new method sentence; docs updated. 中文:精简 PowerX 的测量说明文案(仅保留三句,标签含义移入 pill 的 title,删除“什么是 PowerX?”),让 PowerX 页面沿用 /inference 的布局与 组件(区块头、Benchmark Config / Chart Config / Compare history 字段集、 图表上方的 Chart/Table 与导出工具栏、相同的图表卡片与图例),并修复 重叠问题:TDP 余量阴影延伸到 100% 线且图内文字移到表格说明;非官方运行 overlay 拥有自己的余量阴影与表格行(按运行配色);图表提示框不再被 置顶站点页眉遮挡;手机端“更多视图”标签不再换行。补充/更新单元测试、 e2e 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): keep the across-load stacks open on Where, compare boundaries on Power draw Where the power goes - The compared chip's drill-down (the "across load" stacked bars / stacked area panel) is open inline under its bar from the first render, not only after a click. The compared chip is the one whose point sits nearest the slider interactivity; moving the slider to another chip moves the panel with it. Clicking a bar or picking a chip in the panel's Hardware select pins it to that chip until the slider moves on; Collapse (or clicking the open bar) hides it for the rest of the session, and clicking a bar opens it again. Session state only, no URL parameter. - The compact panel keeps the "<chip> across load" title with its one-line subtitle, the Hardware select (now shown in compact mode too), the Stacked bars | Stacked area toggle (`i_pbview`), the TDP and All in Provisioned reference lines and the PNG / CSV buttons; the stack legend above the bars stays the only legend. A chip picked in the Hardware select that has no bar near the slider renders its panel after the list. - The collapsed "Compare on the curve" section (`PowerXCurveSection`) is removed from the Where view; the view's own compare mode is the new `i_pcompare=breakdown`, which overlays no series on the chart. Power draw - Count gains "All", as Energy per token already had: it sets `i_pcompare=boundaries` and draws GPU only (solid), IT no PUE (dashed) and Facility (dash-dot) per chip on the one scatter, with the existing Boundary legend section; X-Axis Metric and Show as apply as on any Power draw chart (% of TDP stays GPU-only). `powerXViewFor` keeps a boundary overlay on the metric's own view instead of sending it to Where. - The "Compare boundaries: All five" control under More views stays as the rated-lines variant, relabelled "Rated boundaries: Off | TDP + provisioned" (`selectPowerXRated`): on sets `all`, off returns to the measured three. It is offered only where the rated series exist, J per output token (`powerXRatedAvailable`); W per chip has no rated series, so All already draws every boundary there. Unofficial-run overlays are untouched (the chip comparison keeps its run-colored sources; the Power draw overlay path expands the same boundaries). Tests: new PowerAnalysisPanels jsdom test (default-expanded compared chip, slider follow, collapse persists, pin, Hardware select and Stacked bars | Stacked area in compact mode), powerx-views (breakdown mode, Count: All on Power draw, rated toggle), PowerXLayout (Count labels and states). Docs and the inferencex-api skill reference updated. 中文:“功耗去向”视图默认即在所对比芯片(最接近滑块交互性的芯片)的横条下方内联 展开“随负载变化”的堆叠柱状图 / 堆叠面积图面板,并随滑块切换芯片;点击横条或在 面板的硬件选择器中选择芯片会固定到该芯片,“收起”后在本次会话中保持收起,再次 点击横条可重新展开(仅会话状态,不写入 URL)。紧凑面板保留标题与一行副标题、 硬件选择器、“堆叠柱状图 | 堆叠面积图”切换(`i_pbview`)、TDP 与整体预配参考线 以及 PNG / CSV 按钮;横条上方的图例是唯一图例。移除“在曲线上对比”折叠区块,该 视图改用 `i_pcompare=breakdown`。“功耗”视图的“统计范围”新增“全部”(与“每 Token 能耗”一致):设置 `i_pcompare=boundaries`,在同一散点图上按芯片绘制仅 GPU (实线)、IT(虚线)与数据中心(点划线),沿用现有“功耗边界”图例;横轴指标与 显示方式控件照常生效。“更多视图”中的对比功耗边界控件改为“额定边界:关闭 | TDP + 整体预配”,仅在存在额定序列(每输出 token 能耗)时可用。非官方运行 overlay 行为不变。补充 PowerAnalysisPanels 单元测试并更新 powerx-views、PowerXLayout 测试、文档与 inferencex-api skill 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): drop the provenance strip and More views, lay Chart Config out like /inference - Footer: remove the "N measured points · validated windows · power model rev · PUE" line (`powerXProvenanceText`, `PowerXProvenance`); the collapsed "How we measure" details stays as a plain muted link (`PowerXMethod`) with the same method sentences. - Chart Config: remove the "More views" expander (`PowerXMoreViews`) and the "Open power over time" shortcut. Scope, Power statistic and Rated boundaries are plain labelled controls beside X-Axis Metric, Count and Per / Show as, each shown only on the views where it applies; Split by stays in the Where the power goes card. - Update unit tests, Cypress specs, docs/powerx-permanent-view.md, the skills dashboard-views reference and integrity.json. 中文:移除 PowerX 页脚的来源信息行(实测数据点数、验证窗口、功耗模型版本、PUE), 仅保留折叠的“测量方法”链接;移除图表配置中的“更多视图”折叠区和“打开功耗随时间变化” 按钮,统计范围、功耗统计量与额定边界改为与 /inference 相同布局的普通控件,仅在适用 的视图上显示;拆分方式仍位于“功耗去向”卡片。同步更新单元测试、Cypress 用例、文档与 skills 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * fix(powerx): lay the Chart Config out in the /inference grid, pair rated with GPU only The PowerX Count, Per or Show as, Scope, Power statistic and Rated boundaries controls sat in one flex-wrap box inside the second Chart Config column, so X-Axis Metric stood alone on the left while the rest stacked tall on the right. They now render as `contents`, so each one is a cell of the same grid /inference uses: the X-Axis Metric column stays 11rem (18rem on agentic traces) and the rest of the row splits in two. Row one is X-Axis Metric and Count (two cells, equal segments); row two is Per or Show as, then Scope and Power statistic or Rated boundaries, flowing left to right with no empty cells. Every control fills its cell, toggles wrap instead of overflowing, and each label carries the same (i) help as X-Axis Metric. Below sm every control is a row inside the "More chart controls" fold, whose changed count now includes the PowerX controls (`powerXChangedCount`). The Chinese Count label becomes 统计口径 so it no longer shares a name with Scope (统计范围). Rated boundaries is now Off | All-in provisioned and draws exactly two lines per chip: measured GPU power (solid) and the all-in provisioned bound (dashed), with no IT, Facility or GPU-level TDP line, so the chart stays readable. It has its own compare value, `i_pcompare=provisioned` (`PROVISIONED_COMPARE_BASES`), and the Boundary legend lists just those two; the five-line `all` stays reachable from share links only. Docs and the inferencex-skills reference follow. 中文:PowerX 的统计口径、计量单位/显示为、统计范围、功耗统计量与额定边界 控件原先挤在图表配置第二列的一个 flex-wrap 容器中,导致 X 轴指标独占左列、 其余控件在右列纵向堆叠。现改为 `contents` 渲染,使每个控件成为 /inference 同一网格的单元格:X 轴指标列保持 11rem(智能体场景 18rem),其余宽度平分为 两列。第一行为 X 轴指标与统计口径(占两格、等宽分段),第二行为计量单位或 显示为、统计范围、功耗统计量或额定边界,自左向右排布、无空格。各控件填满 单元格,分段切换换行而不溢出,标签带有与 X 轴指标相同的 (i) 说明。sm 以下 每个控件独占一行,位于“更多图表设置”折叠区内,其“已更改”计数现包含 PowerX 控件(`powerXChangedCount`)。中文“统计口径”取代原“统计范围”,避免与 Scope (统计范围)同名。 额定边界改为“关闭 | 整体预配”,每芯片仅绘制两条线:GPU 实测功耗(实线)与 整体预配功耗(虚线),不再绘制 IT、数据中心或 GPU 级 TDP 线,以降低认知负担。 它使用独立的对比值 `i_pcompare=provisioned`(`PROVISIONED_COMPARE_BASES`), 图例“功耗边界”仅列出这两项;五条线的 `all` 仅能通过分享链接访问。文档与 inferencex-skills 参考同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the How we measure footer note Remove the collapsed "How we measure" details (`PowerXMethod`) from the PowerX chart footer, its en/zh strings, its unit tests and the Cypress assertion on it. The shared /inference footer notes stay as they are; the GPU / IT / Facility tag meaning now lives only in each pill's `title`. Docs and the inferencex-skills dashboard-views reference no longer point at the note; the skills integrity manifest is regenerated. 中文:移除 PowerX 图表页脚中折叠的“测量方法”说明(`PowerXMethod`)及其中英文文案、 单元测试和 Cypress 断言。/inference 共用的页脚说明保持不变;GPU / IT / 数据中心 标签的含义仅保留在各标签自身的 `title` 提示框中。文档与 inferencex-skills 的 dashboard-views 参考不再指向该说明,并重新生成 skills integrity 清单。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the chart hint and ISL/OSL footer lines PowerX no longer shows the "Shift+Scroll to zoom • Drag to pan • Double-click to reset • Click a point to pin tooltip" line (nor its touch variant) under its charts: ScatterGraph and PowerTimeline pass an empty `instructions` when `usePowerXSurface()` is true; the breakdown panels already did. The "Completed requests across all resident points" ISL/OSL footer is gated off on PowerX too, and ChartDisplay skips the resident-sequence-lengths query there. /inference, embeds and the `minimalChrome` path are unchanged. Tests: ScatterGraph.powerx-chrome.test.tsx covers the hint on /inference, PowerX and minimal chrome; powerx-compare.cy.ts adds an official-only agentic PowerX case asserting no hint, no ISL/OSL footer and no sketch request; powerx-timeline.cy.ts asserts no hint under the timeline. 中文:PowerX 页面不再在图表下方显示「按住 Shift 滚动以缩放 · 拖动以平移 · 双击以重置 · 点击数据点固定提示框」交互提示(含触屏版本),ScatterGraph 与 PowerTimeline 在 usePowerXSurface() 为真时传入空 instructions;同时隐藏 「当前所有数据点的已完成请求」ISL/OSL 页脚,并在 PowerX 上跳过 resident-sequence-lengths 查询。/inference、嵌入页与 minimalChrome 行为不变。 新增单元测试与 Cypress 用例覆盖上述三种 PowerX 视图。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): component-level power breakdown with per-layer colours, area default Where the power goes, per Oren's review of #1480: - The across-load drill-down opens on the stacked area view; `i_pbview=bars` still selects the stacked bars and the toggle stays. - "Server parts" is split into the pinned power model's real component classes. The breakdown now carries, in stack order, gpu (measured), measuredCpu (Grace socket telemetry, CPU + LPDDR), cpu, memory, nic (NIC cards + system-side optics), nvswitch (NVSwitch ASICs and the NVL72 switch tray incl. its embedded EPYC), storage, other (PCIe switches, retimers, shelf controllers), fans, psuLoss (AC/DC + DC/DC conversion loss), network and facility. `systemPowerLeafCategory` maps leaf names to parts and the test pins the full leaf table across every supported system; a renamed upstream component lands in `other` and fails it. AMD chassis have no nvswitch, B300 has no other, NVL72 rows with measured sockets have no cpu/memory. The parts still sum to All in Measured W/GPU (IT + facility). - One colour per part, shared by every chip, so a single SKU's layers are tellable apart: `--power-part-*` tokens next to the `--overlay-run-*` palette in globals.css with light, dark and minecraft values. Measured layers are solid, modeled layers keep the hatch over a lighter fill of their own colour, facility is the lightest hatch; the chip's vendor colour stays on its legend dot, the area's top edge and total dots. Legend swatches, tooltip rows and the chip-compare segments use the same swatches. - API: `powerBreakdowns[].categories` and `wattsPerGpu` carry the new keys; OpenAPI schema, route-catalog digest, skills reference (+ integrity) and the PowerX docs updated; CSV export has one column per part. 中文:PowerX「功耗去向」视图改为默认显示堆叠面积图(`i_pbview=bars` 仍可切回堆叠柱状图); 「服务器部件」按功耗模型的真实组件拆分为 CPU、内存、网卡、NVSwitch、存储、PCIe 及其他、 风扇、电源损耗、网络分摊与机房开销,各部分之和仍等于 All in Measured W/GPU,并以测试 固定了全部系统的叶子组件到分类的映射;每个分类使用站点统一的独立颜色(globals.css 中 的 `--power-part-*` token,含浅色/深色主题),实测层为实色、建模层保留斜线,芯片厂商色 仅用于图例圆点与总功耗轮廓;API 响应、OpenAPI、路由目录摘要、skills 参考与文档同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): single-hue breakdown with hover-to-identify and edge labels Where the power goes, after Wenyao's review of the per-part palette in #1480: - One hue per chip again. Every layer is a lightness step of the chip's own colour: `powerLayerOpacity(index, count)` runs linearly from 0.92 at the measured GPU base to 0.14 at the top over the parts that series actually has, so a 9-, 10- or 12-deep stack keeps evenly spaced, tellable steps, and a 1 px chip-colour stroke at 0.6 separates neighbours. The `--power-part-*` tokens, `powerCategoryColor`, the hatch patterns, `HATCH_ANGLE` and `cssHatchAngle` are gone; "Modeled" survives as a dashed swatch outline and the tooltip's basis column. - Interaction tells the bands apart. Hovering a band, its legend row or its edge label raises it to full opacity with a 1.5 px stroke and fades the rest to 0.25, with a small name + W/GPU label at the pointer (interpolated at the hovered x on the area, the column value on bars); clicking a legend row pins it (`aria-pressed`), a second click, Escape or a click on the plot unpins, a tap on a band pins on touch. The highlighted row is bold in the per-column tooltip. The state is shared between the chip comparison's legend, its bar segments and the open drill-down (`usePowerLayerHighlight`), so hovering "NICs" lights NICs on every chip. `powerx_breakdown_layer_highlighted`. - The area view labels every band at its right edge (name + W at the last point) in the right margin with a leader to the band centre; `placeEndLabels` pushes collisions apart at 12 px in stack order and the margin widens to the longest label. Below `sm` the labels are skipped so the plot keeps its width. - Legend rows are swatch + name in stack order; Measured/Modeled live in the swatch title. Comparison segments use the same ramp on each chip's colour. - Unofficial-run series get the same ramp from `overlayRunColor(runIndex)`: `buildPowerBreakdownsWithOverlays` keeps each run as its own `hwKey|precision|run<N>` series with the run tag, dashboard only (the API keeps `buildPowerBreakdowns`). - Kept from e727923: the twelve component categories, the API/skills contract, stacked area by default, the bars toggle, the per-column tooltip and CSV. - Tests: ramp monotone and distinct at 12 and 9 deep, band interpolation, end-label placement, overlay series; a jsdom harness that runs the panel's D3 layers covers legend hover/pin/Escape, plot hover, edge labels, margin, overlay colour and the chip-compare legend highlight. 中文:PowerX「功耗去向」堆叠图回到单一色相:每一层都是该芯片自身颜色的明度梯度 (`powerLayerOpacity` 按该系列实际存在的部件数从 0.92 线性降到 0.14,层间以 1 px 芯片色描边分隔),移除 `--power-part-*` 配色与斜线填充;「建模」改由图例色块的虚线边框和 提示框中的「建模」列表示。各层靠交互区分:悬停图层、图例项或右侧标签时该层提亮、其余层 淡化并显示名称与该 x 处的 W/GPU,点击图例固定高亮(`aria-pressed`),再次点击、Escape 或点击绘图区取消,触屏点按图层即固定;高亮状态在芯片对比图例、对比柱段与展开的下钻图之间 共享。堆叠面积图在右侧按堆叠顺序为每层标注名称与末点功耗,重叠时按 12 px 逐个推开并自动 加宽右边距,窄于 `sm` 时不显示。非官方 run 的系列以 `overlayRunColor` 使用同样的梯度。 保留 e727923 的十二个部件分类、API/skills 契约、默认堆叠面积图、柱状切换、提示框与 CSV 导出,并补充单元测试。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): three-band breakdown overview with a parts list Where the power goes, after Wenyao's review of the single-hue stack in #1480 ("this is not that clear"): stop drawing eleven parts in one stacked area and split the view into overview plus detail. - Overview: the drill-down's area and bars, and each chip-compare bar, collapse to three bands in stack order: Measured GPU (`gpu` + `measuredCpu`), Modeled server (`cpu`, `memory`, `nic`, `nvswitch`, `storage`, `other`, `fans`, `psuLoss`, `network`) and Facility overhead (`facility`, only when the facility is counted). `powerBandOpacity` gives each band a fixed step of the chip colour (0.92 / 0.53 / 0.14, the generic `powerLayerOpacity` called with 3), so the modeled band reads the same with or without the facility. The 1 px edges, the heavier top edge, the three right-edge labels with their watts at the last point, the hover/pin highlight and the per-column tooltip stay; the tooltip keeps every part under its band's bold subtotal. The legend shows the three bands; measured vs modeled stays as the dashed swatch outline and the tooltip word. A chip-compare modeled segment's `title` lists its parts and watts. - Detail: `PowerPartsList` sits right of the plot from `lg` (the plot keeps two thirds) and under it below. Its header is the compared point (`B200 (vLLM) FP4 · c16 · 88 tok/s/user`); one row per non-empty part of that chip, heaviest first, the facility row last under a rule: short name, a bar on a faint track in the band's step (dashed left edge when modeled), the watts, the share of IT (the facility row: of the facility total) and a 72×18 sparkline of that part across the chip's points on its own 0..max scale with the compared point dotted. The row `title` reads Measured, Modeled · fixed or Modeled · moves with load (`POWER_PART_BEHAVIOUR`, cross-checked against the model in tests). The list follows the slider and the Hardware select exactly as the plot's dashed outline does; off the comparison's range it reads the nearest point (`nearestBreakdownPoint`). - Shared highlight: `PowerLayerHighlight` is now `{ band, category, pinned }` and `usePowerLayerHighlight` takes a target, `bandTarget(band)` from the plot, legends and chip bars or `partTarget(category)` from a list row, so a hovered row raises its band everywhere and the row lights (`powerPart Emphasis`: highlighted, a sibling of a plot-hovered band, or plain). Click pins, Escape unpins. `powerx_breakdown_part_hovered` / `_pinned` on the rows; `powerx_breakdown_layer_highlighted` keeps the band events. - Overlay runs get the same bands, list and sparklines in `overlayRunColor(runIndex)`. - Removed with the collapse: the twelve-step ramp, `stackPowerBreakdown`, per-part legend rows and end labels, `data-category` on the drawn layers (now `data-band`). `SYSTEM_POWER_CATEGORIES` and the API are untouched. - Tests: bands, stacking, part rows (sort, shares, history), sparkline geometry, behaviour table vs the model, nearest point; the jsdom harness covers the three bands, legend, tooltip structure, edge labels, plot hover, list hover/pin/Escape, overlay colour and the chip-compare link; `PowerPartsList.test.tsx` covers the list alone in en and zh. Cypress component assertions updated for bands and the list. - Docs: `docs/powerx-permanent-view.md` and the skills dashboard-views reference (integrity regenerated). 中文:PowerX「功耗去向」下钻图不再把十一个部件画在同一张堆叠面积图里,而是拆成 「总览 + 明细」:面积图、柱状图和芯片对比横条都合并为三段(实测 GPU、建模服务器、 机房开销,仅在计入机房开销时显示),每段为芯片颜色的固定明度梯度,保留 1 px 分隔线、 右侧三条带末点功耗的标签、悬停/固定高亮和逐列提示框(提示框在各段加粗小计下仍列出 全部部件);明细由图旁新增的部件列表承担(`lg` 以上在图右侧,以下在图下方):表头为 对比点,每行一个非空部件,按功耗降序、机房开销置于末行,含名称、按功耗比例的小条、 瓦数、占 IT 比例和该部件随负载变化的迷你面积图(各自 0..最大值刻度,对比点打点), 行 `title` 标注实测 / 建模·固定 / 建模·随负载变化;悬停某行会在图中提亮其所属分段, 点击固定、Escape 取消;列表随滑块和硬件选择同步。非官方 run 以 `overlayRunColor` 使用相同的三段与列表。移除十二级梯度和逐部件图例;`SYSTEM_POWER_CATEGORIES` 与 API 不变。补充单元测试、Cypress 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): restore the six-layer hatched breakdown, keep the parts list The breakdown plot, the comparison bars and the legends go back to the treatment the panel had before the component-level and single-hue passes: six layers in stack order (Measured GPU, Measured Grace CPU, Server parts, Fans + PSU loss, Network share, Facility overhead), each a fixed opacity step of the chip colour (0.9 / 0.72 / 0.5 / 0.34 / 0.2, hatch tint 0.18) like the Profit Estimator's stacked bars, every modeled layer hatched at its own stripe angle (45 / 45 / 45 / 135 / 0 / 90 deg) like its loss segment, measured layers solid. The twelve API parts stay; the layers are a mapping over them (`POWER_BANDS` / `POWER_BAND_CATEGORIES`: server = cpu + memory + nic + nvswitch + storage + other, fansPsu = fans + psuLoss), so the API, CSV and skills contract from the component-level pass are untouched. Kept from the later passes: stacked area by default (`i_pbview`), the bars toggle, the per-column tooltip with bold layer subtotals (a layer that folds several parts lists them beneath), the parts list beside the plot with hover/pin through `usePowerLayerHighlight` (a hovered layer keeps its step and hatch, its edge thickens, the others fade to 0.25), overlay runs in `overlayRunColor`, and the download button. Dropped: the right-edge layer labels and the three-band opacity ramp. Tests cover the mapping, the opacity and hatch tables, the pattern defs, the legend order and swatches, the tooltip rows, the highlight states, the chip-compare segments and the overlay path; the Cypress component spec checks the five legend rows, the patterns and the absence of edge labels. Docs and the skills reference describe the six hatched layers; the route catalog digest for `utils/power-breakdown.ts` is refreshed (presentation only, no API change). 中文:恢复 PowerX 功耗构成图原有的六层斜线填充样式,并保留图旁的部件列表。 六层按堆叠顺序为实测 GPU、实测 Grace CPU、服务器部件、风扇 + 电源损耗、网络分摊、 机房开销,每层为芯片颜色的固定透明度阶梯,建模层按各自角度画斜线,实测层为纯色。 API 的十二个部件不变,六层只是其映射;保留默认堆叠面积图、提示框分层小计、 部件列表的悬停/固定联动、非官方运行叠加与下载按钮;去掉右侧边缘标签与三段透明度渐变。 相应更新了单元测试、Cypress 组件测试、文档与 skills 参考,并刷新了路由目录摘要。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
edwingao28
added a commit
that referenced
this pull request
Oct 27, 2026
…ad bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列 (#1477) * [Feature] link PowerX chart hover to chip compare and space across-load bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列 * [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 (#1478) * [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 * [PowerX] declutter the PowerX tab: chart above the fold, single control layer, shorter copy / 精简 PowerX 页面:图表置顶、单层控件、精简文案 (#1480) * feat(powerx): declutter the PowerX tab: chart above the fold, one control layer, shorter copy The PowerX tab opened on 39 controls and no data: four question tiles, a question line and a how-to-read line, an "Advanced settings" drawer that re-expressed Count / Show as / Split by as Boundary / Display / Compare, and three full-width control fieldsets pushed the chart card to y=925 at 1440x900. The same boundary was also named three ways on one screen. - Render the four questions as one compact segmented tab row (still a role=tablist with the same test ids and analytics); the hint moves to the button title. Drop the per-tab question and how-to-read lines. - Remove the Advanced settings drawer. Scope and Power statistic, the only controls it added, render under the tab toggles on the Power draw tab (Scope alone on per-token Energy) through a new `fields` prop on MeasuredMetricControls. URL params and API behaviour are unchanged. - On PowerX, put Benchmark Config, Chart Config and Compare history on one row and drop the Scenario / Precision select when it has a single locked option; fix the mobile "changed" count that counted the hidden Y-axis metric. - Copy: header description keeps its first sentence; chip-compare and drill-down subtitles cut to one short line; the power model revision footnote moves into the breakdown chart tooltip. - One vocabulary: `POWER_COUNT_LABELS` in lib/power/power-basis.ts feeds the Count toggle, and on the PowerX surface the legend Boundary rows, line-end labels, tooltip series line and table Series column say "GPU only / Whole system" instead of the registry names. CSV columns, API values and URL params keep the registry names. - Chart card top at 1440x900: 925 -> 780 (390x844: 1324 -> 1196). 中文:精简 PowerX 页面:四个问题改为一行紧凑的分段标签(保留 tablist 语义、 测试 id 与埋点,提示文字移入 title),删除每个标签页下的问题行与阅读说明行; 移除“高级设置”抽屉,仅把统计范围与功耗统计量放回标签切换下方(URL 参数与 API 行为不变);PowerX 上基准测试配置、图表配置与历史对比并排一行,只有一个选项 的场景/精度选择器不再显示;页头描述只保留第一句,芯片对比与下钻副标题缩短, 功耗模型版本脚注移入图表提示框;统一术语,PowerX 图例、曲线标签、提示框与表格 均使用“仅 GPU / 整体系统”。1440x900 下图表卡片顶部由 925px 提前到 780px。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): v2 layout: chart first, four views as tabs, options in the legend rail Experimental re-sequencing of the PowerX tab, between the current control stack and the chart-only mock: every feature stays reachable, nothing is deleted, and no URL param or API value changes. - New `components/inference/powerx/`: `PowerXFrame` (section header, the four views as compact tabs with one tooltip hint each, Chart/Table and export on the right of the strip, one caption row with the model dropdown, scenario and precision toggles only when there is a choice, and the compact run chip with the changelog), `PowerXLegendControls` (Count, Per, Show as in the legend rail), `PowerXMoreViews` (collapsed expander with Scope, Power statistic, Compare boundaries, Split by and an Open power over time shortcut), `PowerXCurveSection`, `PowerXProvenance`, and the pure `powerx-views.ts` view/metric mapping that replaces `PowerXTabs.tsx`. - `ChartDisplay` renders through the frame on the PowerX surface only (embeds and minimal chrome keep the shared layout); it opens on energy per output token. `ChartControls`, the question tabs and the inline toggle rows no longer render there; model, scenario, precision, x-axis, chip config and date range still flow through InferenceContext and the URL, so share links, `?unofficialrun=` overlays, /zh and the views API are unchanged. - Where the power goes: the chip comparison is the visual; clicking a bar opens that chip's drill-down inline under it (`PowerAnalysisPanels` `layout="inline"`, compact `PowerBreakdownPanel` with a Collapse button, one shared stack legend); the boundary line chart sits in a collapsed "Compare on the curve" section. An empty selection now says so instead of leaving a gap. - Provenance strip under the chart (measured points, validated windows, power model revision, PUE) is the summary of the collapsed "How we measure" details; a pinned point's "View power trace" still opens the Over time view focused on that trace. - `ChartLegend` gains `controls`, `footer` and `mobileLabel` slots; `ScatterGraph` passes them through plus `plotHeight`. On phones the rail folds into a "Chips & options" row under the plot and the plot is capped at 55 % of the viewport; touch-action pan-y stays via D3Chart. - Tests: `powerx-views.test.ts` (view switching, Count/Per/Show as metric mapping, provenance text) and `PowerXLayout.test.tsx` (tab order and selection, legend controls per view, Split by reason, provenance strip, caption row, frame order, zh strings). Cypress specs updated for the More views expander and the energy default. Docs and the skills reference describe the v2 layout. 中文:PowerX v2 布局(实验性):图表优先,四个视图改为紧凑标签页(每 Token 能耗、功耗、功耗去向、随时间变化),图表/表格切换与导出按钮位于标签栏右侧; 标题下只保留一行说明(模型下拉、有选择时才显示的场景与精度切换、紧凑的运行 日期与变更日志)。统计范围、计量单位、显示方式移入图例栏,统计范围、功耗统计 量、对比功耗边界、拆分方式与“打开功耗随时间变化”收在折叠的“更多视图”中。 “功耗去向”以芯片对比为主视图,点击横条内联展开该芯片的下钻图,功耗边界曲线 为折叠区块。图表下方新增一行数据来源说明,点击展开“测量方法”。手机端图例折叠 为“芯片与选项”一行,图表高度上限为视口 55%。URL 参数与 API 行为不变,所有 功能仍可到达;新增单元测试并更新 Cypress 用例与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): P0: IT-only basis, TDP headroom, load-swing stats and basis labels Implements the four PowerX P0 items from the data-center / power-team feedback on the existing v2 layout, on the PowerX surface only. No URL parameter is renamed; the new boundary rides on `i_metric` like the others. P0-1 IT-only power basis - `lib/power/power-basis.ts`: fifth basis `it-modeled` ("All in Measured IT (no PUE)") = `modeledSystemPower.deploymentItWatts ÷ gpuCount`, the breakdown stack minus its facility part, from the same estimate the facility figure uses (no new formula); `utilityModeledWatts = itModeledWatts × PUE` at every point. New fields `itModeledWatts` / `itModeledJPerOutputToken`, metric keys `y_itModeledWatts` / `y_itModeledJPerOutputToken`, measured-metric configs, All in Measured table rules and CSV, chart power envelope, compare variants (boundaries = GPU only, IT, Facility; `all` = five lines), tooltips, legend/line labels. - Count toggle is GPU only | IT (no PUE) | Facility (| All on Energy); `POWER_COUNT_LABELS` names the facility boundary "Facility" so the legend, pills, table series column and CSV share one vocabulary. - `PowerXReadout` under the caption: IT W/GPU, GPUs per MW (1e6 ÷ IT W), Facility W/GPU at PUE and measured GPU W for the hovered or pinned point (ScatterGraph feeds an active-point context), else the point nearest 80 tok/s/user. - Where the power goes stacks IT only by default; `PowerXFacilitySwitch` (context state, default off) appends the PUE part; `breakdownSeriesAtBoundary` derives the IT series for the chip comparison, the drill-down and their tooltips; "Storage and out-of-rack network are not modeled." sits under the bars. P0-2 Measured-vs-TDP headroom - ScatterGraph `powerx-headroom` layer (PowerX + % of TDP only): shades between each chip's P90 draw (dotted) and 100 % TDP in the chip color. - `lib/power/headroom.ts` + `PowerXHeadroomTable`: avg W, P90 W, % TDP (P90) and headroom = 1 − P90/TDP at 25 / 50 / 100 / 300 tok/s/user via `interpolateMetricAtInteractivity` (no extrapolation → "—"), one example callout computed from the data, CSV download. - Views API: `GET /api/v1/views/inference?headroom=true` returns the same rows (`headroom.rows`), documented in OpenAPI, options defaults and the skills reference. P0-3 Load-swing statistics and export - `lib/power/load-swing-stats.ts` (pure, unit-tested on a synthetic trace): peak, min, idle floor (P5 before the window), window mean, P5 / P95, max Δ1s / Δ5s, ramp up / down per second, volatility (std ÷ mean), NVL72 rack scaling (× 72, upper bound); telemetry gaps are counted and never bridged. - New published route `GET /api/v1/gpu-metrics-point/stats?id=N [&format=json|csv][&scale=gpu|nvl72]` serves the stats (or the 1 s trace as CSV) from the same stored buckets with the same function. - `PowerLoadSwings` above the Over time chart on PowerX: per-trace stats row with % TDP for the Δ columns, "× 72 per NVL72 rack" switch with the correlation caveat, per-point CSV / JSON downloads from the route; fixed caveat line "1 s DCGM samples · single node · inference only · sub-second swings not captured" under the chart. P0-4 Labels - `PowerBasisPill` (GPU / IT / Facility) on readouts, table headers, breakdown totals and the tooltip power-model block, explained once in How we measure, which also gains the three-meanings-of-utilization note. - Collapsed "What is PowerX?" line under the page description (en + zh). Not built: P0-5 "Copy chart for Slack" (mock-only placeholder). Tests: power-basis (IT identity), headroom, load-swing stats, stats route, inference view headroom panel, power-breakdown IT boundary, powerx-views, PowerXLayout (Count labels, readout, What is, basis key, facility switch), power-compare / measured-metric-config expectations, Cypress component spec labels; API route catalog digests and skills integrity refreshed. 中文:实现 PowerX P0 的四项功能(仅限 PowerX 页面,不改 URL 参数名): (1) 新增 IT(不含 PUE)功耗口径 `it-modeled`,取自同一系统功耗模型的 deploymentItWatts ÷ GPU 数,即功耗构成堆叠去掉数据中心开销的部分;统计范围 改为“仅 GPU | IT(不含 PUE)| 数据中心”,标题行下方新增读数行(每 GPU IT 功耗、每 MW 可支持 GPU 数、按 PUE 计的数据中心功耗),“功耗去向”默认只堆叠 IT,新增“计入数据中心开销”开关。(2) 功耗按 TDP 占比显示时填充 P90 到 100% 的余量,并新增按交互性(25/50/100/300 tok/s/user)插值的余量表与 CSV 导出;views API 新增 `headroom=true`。(3) 新增负载波动统计(峰值、最小 值、空闲底线、均值、P5/P95、最大 1 s/5 s 变化、上升/下降速率、波动率,可按 NVL72 机架 ×72 换算)、新的只读接口 `/api/v1/gpu-metrics-point/stats` (JSON 统计或 1 秒曲线 CSV)与下载按钮,图表下方固定注明“1 秒 DCGM 采样 · 单节点 · 仅推理 · 不包含亚秒级波动”。(4) 所有功耗数值带 GPU / IT / 数据中心 标签,“测量方法”中统一解释并补充“利用率”的三种含义,页面描述下新增可折叠 的“什么是 PowerX?”。未实现 P0-5 的“复制图表到 Slack”(仅为 mock 占位)。 附带单元测试、API 文档、路由摘要与 skills 文档更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): cut the method copy, match the /inference layout, fix overlay bugs Copy - "How we measure" keeps three sentences: each point is one benchmark configuration; GPU power is measured every second and averaged over the validated serving window, other components are modeled; AgentX estimates are not calibrated against measured system power (AgentX only). The separate summary sentence, the three-tag key, the utilization paragraph, the basis assumptions and the All-in-Measured note are gone from the PowerX disclosure (the non-PowerX caption keeps its own notes). - Each GPU / IT / Facility pill explains its tag in its `title` only: "GPU board power, measured by DCGM", "GPU + modeled server, no PUE", "IT x PUE". - "What is PowerX?" is dropped; the description reads "Measured GPU power and energy per token for every benchmark point, with a modeled IT and facility breakdown." Layout (same chrome as /inference) - PowerX renders through the shared ChartDisplay frame: section header Card, the four views as a tab strip under the description, the Benchmark Config fieldset (Model / Scenario / Precision selectors), Chart Config (X-Axis Metric beside Count, Per or Show as, and the collapsed More views row) in place of the Y-axis pick, Compare history, the run date / run / changelog row; the Chart/Table toggle and export menu sit above the chart card, right-aligned; the chart card keeps the h2 caption, Updated / Source line, the readout as outline badges (the TCO badge row style), the plain Quick Filters legend and the footer notes, which now end with the provenance line + How we measure. - PowerXFrame, PowerXCaptionRow, PowerXWhatIs and the legend-rail controls are removed; headroom and load-swing tables use the validated-window summary table style; the Where view keeps its caption at the top of the card. Overlay bugs - % of TDP headroom: the y-axis reaches 100 % so the band ends at the TDP line instead of the plot edge; the SVG key text that sat over the top points is now a sentence in the table note. - Unofficial-run overlays get their own headroom band in the run color (`overlayRunColor`, filtered by `activeOverlayHwTypes`) and their own rows in the headroom table (run-colored dot, run tag, `source` CSV column); they were silently merged into the official chip before. - Chart tooltips clamp below the sticky site header instead of under it. - "More views" no longer wraps its label on phones. Tests: PowerXLayout, headroom (overlay rows), ScatterGraph PowerX overlay bands (new file), scatter-points tooltip clamp; the powerx-compare e2e asserts the new method sentence; docs updated. 中文:精简 PowerX 的测量说明文案(仅保留三句,标签含义移入 pill 的 title,删除“什么是 PowerX?”),让 PowerX 页面沿用 /inference 的布局与 组件(区块头、Benchmark Config / Chart Config / Compare history 字段集、 图表上方的 Chart/Table 与导出工具栏、相同的图表卡片与图例),并修复 重叠问题:TDP 余量阴影延伸到 100% 线且图内文字移到表格说明;非官方运行 overlay 拥有自己的余量阴影与表格行(按运行配色);图表提示框不再被 置顶站点页眉遮挡;手机端“更多视图”标签不再换行。补充/更新单元测试、 e2e 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): keep the across-load stacks open on Where, compare boundaries on Power draw Where the power goes - The compared chip's drill-down (the "across load" stacked bars / stacked area panel) is open inline under its bar from the first render, not only after a click. The compared chip is the one whose point sits nearest the slider interactivity; moving the slider to another chip moves the panel with it. Clicking a bar or picking a chip in the panel's Hardware select pins it to that chip until the slider moves on; Collapse (or clicking the open bar) hides it for the rest of the session, and clicking a bar opens it again. Session state only, no URL parameter. - The compact panel keeps the "<chip> across load" title with its one-line subtitle, the Hardware select (now shown in compact mode too), the Stacked bars | Stacked area toggle (`i_pbview`), the TDP and All in Provisioned reference lines and the PNG / CSV buttons; the stack legend above the bars stays the only legend. A chip picked in the Hardware select that has no bar near the slider renders its panel after the list. - The collapsed "Compare on the curve" section (`PowerXCurveSection`) is removed from the Where view; the view's own compare mode is the new `i_pcompare=breakdown`, which overlays no series on the chart. Power draw - Count gains "All", as Energy per token already had: it sets `i_pcompare=boundaries` and draws GPU only (solid), IT no PUE (dashed) and Facility (dash-dot) per chip on the one scatter, with the existing Boundary legend section; X-Axis Metric and Show as apply as on any Power draw chart (% of TDP stays GPU-only). `powerXViewFor` keeps a boundary overlay on the metric's own view instead of sending it to Where. - The "Compare boundaries: All five" control under More views stays as the rated-lines variant, relabelled "Rated boundaries: Off | TDP + provisioned" (`selectPowerXRated`): on sets `all`, off returns to the measured three. It is offered only where the rated series exist, J per output token (`powerXRatedAvailable`); W per chip has no rated series, so All already draws every boundary there. Unofficial-run overlays are untouched (the chip comparison keeps its run-colored sources; the Power draw overlay path expands the same boundaries). Tests: new PowerAnalysisPanels jsdom test (default-expanded compared chip, slider follow, collapse persists, pin, Hardware select and Stacked bars | Stacked area in compact mode), powerx-views (breakdown mode, Count: All on Power draw, rated toggle), PowerXLayout (Count labels and states). Docs and the inferencex-api skill reference updated. 中文:“功耗去向”视图默认即在所对比芯片(最接近滑块交互性的芯片)的横条下方内联 展开“随负载变化”的堆叠柱状图 / 堆叠面积图面板,并随滑块切换芯片;点击横条或在 面板的硬件选择器中选择芯片会固定到该芯片,“收起”后在本次会话中保持收起,再次 点击横条可重新展开(仅会话状态,不写入 URL)。紧凑面板保留标题与一行副标题、 硬件选择器、“堆叠柱状图 | 堆叠面积图”切换(`i_pbview`)、TDP 与整体预配参考线 以及 PNG / CSV 按钮;横条上方的图例是唯一图例。移除“在曲线上对比”折叠区块,该 视图改用 `i_pcompare=breakdown`。“功耗”视图的“统计范围”新增“全部”(与“每 Token 能耗”一致):设置 `i_pcompare=boundaries`,在同一散点图上按芯片绘制仅 GPU (实线)、IT(虚线)与数据中心(点划线),沿用现有“功耗边界”图例;横轴指标与 显示方式控件照常生效。“更多视图”中的对比功耗边界控件改为“额定边界:关闭 | TDP + 整体预配”,仅在存在额定序列(每输出 token 能耗)时可用。非官方运行 overlay 行为不变。补充 PowerAnalysisPanels 单元测试并更新 powerx-views、PowerXLayout 测试、文档与 inferencex-api skill 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): drop the provenance strip and More views, lay Chart Config out like /inference - Footer: remove the "N measured points · validated windows · power model rev · PUE" line (`powerXProvenanceText`, `PowerXProvenance`); the collapsed "How we measure" details stays as a plain muted link (`PowerXMethod`) with the same method sentences. - Chart Config: remove the "More views" expander (`PowerXMoreViews`) and the "Open power over time" shortcut. Scope, Power statistic and Rated boundaries are plain labelled controls beside X-Axis Metric, Count and Per / Show as, each shown only on the views where it applies; Split by stays in the Where the power goes card. - Update unit tests, Cypress specs, docs/powerx-permanent-view.md, the skills dashboard-views reference and integrity.json. 中文:移除 PowerX 页脚的来源信息行(实测数据点数、验证窗口、功耗模型版本、PUE), 仅保留折叠的“测量方法”链接;移除图表配置中的“更多视图”折叠区和“打开功耗随时间变化” 按钮,统计范围、功耗统计量与额定边界改为与 /inference 相同布局的普通控件,仅在适用 的视图上显示;拆分方式仍位于“功耗去向”卡片。同步更新单元测试、Cypress 用例、文档与 skills 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * fix(powerx): lay the Chart Config out in the /inference grid, pair rated with GPU only The PowerX Count, Per or Show as, Scope, Power statistic and Rated boundaries controls sat in one flex-wrap box inside the second Chart Config column, so X-Axis Metric stood alone on the left while the rest stacked tall on the right. They now render as `contents`, so each one is a cell of the same grid /inference uses: the X-Axis Metric column stays 11rem (18rem on agentic traces) and the rest of the row splits in two. Row one is X-Axis Metric and Count (two cells, equal segments); row two is Per or Show as, then Scope and Power statistic or Rated boundaries, flowing left to right with no empty cells. Every control fills its cell, toggles wrap instead of overflowing, and each label carries the same (i) help as X-Axis Metric. Below sm every control is a row inside the "More chart controls" fold, whose changed count now includes the PowerX controls (`powerXChangedCount`). The Chinese Count label becomes 统计口径 so it no longer shares a name with Scope (统计范围). Rated boundaries is now Off | All-in provisioned and draws exactly two lines per chip: measured GPU power (solid) and the all-in provisioned bound (dashed), with no IT, Facility or GPU-level TDP line, so the chart stays readable. It has its own compare value, `i_pcompare=provisioned` (`PROVISIONED_COMPARE_BASES`), and the Boundary legend lists just those two; the five-line `all` stays reachable from share links only. Docs and the inferencex-skills reference follow. 中文:PowerX 的统计口径、计量单位/显示为、统计范围、功耗统计量与额定边界 控件原先挤在图表配置第二列的一个 flex-wrap 容器中,导致 X 轴指标独占左列、 其余控件在右列纵向堆叠。现改为 `contents` 渲染,使每个控件成为 /inference 同一网格的单元格:X 轴指标列保持 11rem(智能体场景 18rem),其余宽度平分为 两列。第一行为 X 轴指标与统计口径(占两格、等宽分段),第二行为计量单位或 显示为、统计范围、功耗统计量或额定边界,自左向右排布、无空格。各控件填满 单元格,分段切换换行而不溢出,标签带有与 X 轴指标相同的 (i) 说明。sm 以下 每个控件独占一行,位于“更多图表设置”折叠区内,其“已更改”计数现包含 PowerX 控件(`powerXChangedCount`)。中文“统计口径”取代原“统计范围”,避免与 Scope (统计范围)同名。 额定边界改为“关闭 | 整体预配”,每芯片仅绘制两条线:GPU 实测功耗(实线)与 整体预配功耗(虚线),不再绘制 IT、数据中心或 GPU 级 TDP 线,以降低认知负担。 它使用独立的对比值 `i_pcompare=provisioned`(`PROVISIONED_COMPARE_BASES`), 图例“功耗边界”仅列出这两项;五条线的 `all` 仅能通过分享链接访问。文档与 inferencex-skills 参考同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the How we measure footer note Remove the collapsed "How we measure" details (`PowerXMethod`) from the PowerX chart footer, its en/zh strings, its unit tests and the Cypress assertion on it. The shared /inference footer notes stay as they are; the GPU / IT / Facility tag meaning now lives only in each pill's `title`. Docs and the inferencex-skills dashboard-views reference no longer point at the note; the skills integrity manifest is regenerated. 中文:移除 PowerX 图表页脚中折叠的“测量方法”说明(`PowerXMethod`)及其中英文文案、 单元测试和 Cypress 断言。/inference 共用的页脚说明保持不变;GPU / IT / 数据中心 标签的含义仅保留在各标签自身的 `title` 提示框中。文档与 inferencex-skills 的 dashboard-views 参考不再指向该说明,并重新生成 skills integrity 清单。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the chart hint and ISL/OSL footer lines PowerX no longer shows the "Shift+Scroll to zoom • Drag to pan • Double-click to reset • Click a point to pin tooltip" line (nor its touch variant) under its charts: ScatterGraph and PowerTimeline pass an empty `instructions` when `usePowerXSurface()` is true; the breakdown panels already did. The "Completed requests across all resident points" ISL/OSL footer is gated off on PowerX too, and ChartDisplay skips the resident-sequence-lengths query there. /inference, embeds and the `minimalChrome` path are unchanged. Tests: ScatterGraph.powerx-chrome.test.tsx covers the hint on /inference, PowerX and minimal chrome; powerx-compare.cy.ts adds an official-only agentic PowerX case asserting no hint, no ISL/OSL footer and no sketch request; powerx-timeline.cy.ts asserts no hint under the timeline. 中文:PowerX 页面不再在图表下方显示「按住 Shift 滚动以缩放 · 拖动以平移 · 双击以重置 · 点击数据点固定提示框」交互提示(含触屏版本),ScatterGraph 与 PowerTimeline 在 usePowerXSurface() 为真时传入空 instructions;同时隐藏 「当前所有数据点的已完成请求」ISL/OSL 页脚,并在 PowerX 上跳过 resident-sequence-lengths 查询。/inference、嵌入页与 minimalChrome 行为不变。 新增单元测试与 Cypress 用例覆盖上述三种 PowerX 视图。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): component-level power breakdown with per-layer colours, area default Where the power goes, per Oren's review of #1480: - The across-load drill-down opens on the stacked area view; `i_pbview=bars` still selects the stacked bars and the toggle stays. - "Server parts" is split into the pinned power model's real component classes. The breakdown now carries, in stack order, gpu (measured), measuredCpu (Grace socket telemetry, CPU + LPDDR), cpu, memory, nic (NIC cards + system-side optics), nvswitch (NVSwitch ASICs and the NVL72 switch tray incl. its embedded EPYC), storage, other (PCIe switches, retimers, shelf controllers), fans, psuLoss (AC/DC + DC/DC conversion loss), network and facility. `systemPowerLeafCategory` maps leaf names to parts and the test pins the full leaf table across every supported system; a renamed upstream component lands in `other` and fails it. AMD chassis have no nvswitch, B300 has no other, NVL72 rows with measured sockets have no cpu/memory. The parts still sum to All in Measured W/GPU (IT + facility). - One colour per part, shared by every chip, so a single SKU's layers are tellable apart: `--power-part-*` tokens next to the `--overlay-run-*` palette in globals.css with light, dark and minecraft values. Measured layers are solid, modeled layers keep the hatch over a lighter fill of their own colour, facility is the lightest hatch; the chip's vendor colour stays on its legend dot, the area's top edge and total dots. Legend swatches, tooltip rows and the chip-compare segments use the same swatches. - API: `powerBreakdowns[].categories` and `wattsPerGpu` carry the new keys; OpenAPI schema, route-catalog digest, skills reference (+ integrity) and the PowerX docs updated; CSV export has one column per part. 中文:PowerX「功耗去向」视图改为默认显示堆叠面积图(`i_pbview=bars` 仍可切回堆叠柱状图); 「服务器部件」按功耗模型的真实组件拆分为 CPU、内存、网卡、NVSwitch、存储、PCIe 及其他、 风扇、电源损耗、网络分摊与机房开销,各部分之和仍等于 All in Measured W/GPU,并以测试 固定了全部系统的叶子组件到分类的映射;每个分类使用站点统一的独立颜色(globals.css 中 的 `--power-part-*` token,含浅色/深色主题),实测层为实色、建模层保留斜线,芯片厂商色 仅用于图例圆点与总功耗轮廓;API 响应、OpenAPI、路由目录摘要、skills 参考与文档同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): single-hue breakdown with hover-to-identify and edge labels Where the power goes, after Wenyao's review of the per-part palette in #1480: - One hue per chip again. Every layer is a lightness step of the chip's own colour: `powerLayerOpacity(index, count)` runs linearly from 0.92 at the measured GPU base to 0.14 at the top over the parts that series actually has, so a 9-, 10- or 12-deep stack keeps evenly spaced, tellable steps, and a 1 px chip-colour stroke at 0.6 separates neighbours. The `--power-part-*` tokens, `powerCategoryColor`, the hatch patterns, `HATCH_ANGLE` and `cssHatchAngle` are gone; "Modeled" survives as a dashed swatch outline and the tooltip's basis column. - Interaction tells the bands apart. Hovering a band, its legend row or its edge label raises it to full opacity with a 1.5 px stroke and fades the rest to 0.25, with a small name + W/GPU label at the pointer (interpolated at the hovered x on the area, the column value on bars); clicking a legend row pins it (`aria-pressed`), a second click, Escape or a click on the plot unpins, a tap on a band pins on touch. The highlighted row is bold in the per-column tooltip. The state is shared between the chip comparison's legend, its bar segments and the open drill-down (`usePowerLayerHighlight`), so hovering "NICs" lights NICs on every chip. `powerx_breakdown_layer_highlighted`. - The area view labels every band at its right edge (name + W at the last point) in the right margin with a leader to the band centre; `placeEndLabels` pushes collisions apart at 12 px in stack order and the margin widens to the longest label. Below `sm` the labels are skipped so the plot keeps its width. - Legend rows are swatch + name in stack order; Measured/Modeled live in the swatch title. Comparison segments use the same ramp on each chip's colour. - Unofficial-run series get the same ramp from `overlayRunColor(runIndex)`: `buildPowerBreakdownsWithOverlays` keeps each run as its own `hwKey|precision|run<N>` series with the run tag, dashboard only (the API keeps `buildPowerBreakdowns`). - Kept from e727923: the twelve component categories, the API/skills contract, stacked area by default, the bars toggle, the per-column tooltip and CSV. - Tests: ramp monotone and distinct at 12 and 9 deep, band interpolation, end-label placement, overlay series; a jsdom harness that runs the panel's D3 layers covers legend hover/pin/Escape, plot hover, edge labels, margin, overlay colour and the chip-compare legend highlight. 中文:PowerX「功耗去向」堆叠图回到单一色相:每一层都是该芯片自身颜色的明度梯度 (`powerLayerOpacity` 按该系列实际存在的部件数从 0.92 线性降到 0.14,层间以 1 px 芯片色描边分隔),移除 `--power-part-*` 配色与斜线填充;「建模」改由图例色块的虚线边框和 提示框中的「建模」列表示。各层靠交互区分:悬停图层、图例项或右侧标签时该层提亮、其余层 淡化并显示名称与该 x 处的 W/GPU,点击图例固定高亮(`aria-pressed`),再次点击、Escape 或点击绘图区取消,触屏点按图层即固定;高亮状态在芯片对比图例、对比柱段与展开的下钻图之间 共享。堆叠面积图在右侧按堆叠顺序为每层标注名称与末点功耗,重叠时按 12 px 逐个推开并自动 加宽右边距,窄于 `sm` 时不显示。非官方 run 的系列以 `overlayRunColor` 使用同样的梯度。 保留 e727923 的十二个部件分类、API/skills 契约、默认堆叠面积图、柱状切换、提示框与 CSV 导出,并补充单元测试。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): three-band breakdown overview with a parts list Where the power goes, after Wenyao's review of the single-hue stack in #1480 ("this is not that clear"): stop drawing eleven parts in one stacked area and split the view into overview plus detail. - Overview: the drill-down's area and bars, and each chip-compare bar, collapse to three bands in stack order: Measured GPU (`gpu` + `measuredCpu`), Modeled server (`cpu`, `memory`, `nic`, `nvswitch`, `storage`, `other`, `fans`, `psuLoss`, `network`) and Facility overhead (`facility`, only when the facility is counted). `powerBandOpacity` gives each band a fixed step of the chip colour (0.92 / 0.53 / 0.14, the generic `powerLayerOpacity` called with 3), so the modeled band reads the same with or without the facility. The 1 px edges, the heavier top edge, the three right-edge labels with their watts at the last point, the hover/pin highlight and the per-column tooltip stay; the tooltip keeps every part under its band's bold subtotal. The legend shows the three bands; measured vs modeled stays as the dashed swatch outline and the tooltip word. A chip-compare modeled segment's `title` lists its parts and watts. - Detail: `PowerPartsList` sits right of the plot from `lg` (the plot keeps two thirds) and under it below. Its header is the compared point (`B200 (vLLM) FP4 · c16 · 88 tok/s/user`); one row per non-empty part of that chip, heaviest first, the facility row last under a rule: short name, a bar on a faint track in the band's step (dashed left edge when modeled), the watts, the share of IT (the facility row: of the facility total) and a 72×18 sparkline of that part across the chip's points on its own 0..max scale with the compared point dotted. The row `title` reads Measured, Modeled · fixed or Modeled · moves with load (`POWER_PART_BEHAVIOUR`, cross-checked against the model in tests). The list follows the slider and the Hardware select exactly as the plot's dashed outline does; off the comparison's range it reads the nearest point (`nearestBreakdownPoint`). - Shared highlight: `PowerLayerHighlight` is now `{ band, category, pinned }` and `usePowerLayerHighlight` takes a target, `bandTarget(band)` from the plot, legends and chip bars or `partTarget(category)` from a list row, so a hovered row raises its band everywhere and the row lights (`powerPart Emphasis`: highlighted, a sibling of a plot-hovered band, or plain). Click pins, Escape unpins. `powerx_breakdown_part_hovered` / `_pinned` on the rows; `powerx_breakdown_layer_highlighted` keeps the band events. - Overlay runs get the same bands, list and sparklines in `overlayRunColor(runIndex)`. - Removed with the collapse: the twelve-step ramp, `stackPowerBreakdown`, per-part legend rows and end labels, `data-category` on the drawn layers (now `data-band`). `SYSTEM_POWER_CATEGORIES` and the API are untouched. - Tests: bands, stacking, part rows (sort, shares, history), sparkline geometry, behaviour table vs the model, nearest point; the jsdom harness covers the three bands, legend, tooltip structure, edge labels, plot hover, list hover/pin/Escape, overlay colour and the chip-compare link; `PowerPartsList.test.tsx` covers the list alone in en and zh. Cypress component assertions updated for bands and the list. - Docs: `docs/powerx-permanent-view.md` and the skills dashboard-views reference (integrity regenerated). 中文:PowerX「功耗去向」下钻图不再把十一个部件画在同一张堆叠面积图里,而是拆成 「总览 + 明细」:面积图、柱状图和芯片对比横条都合并为三段(实测 GPU、建模服务器、 机房开销,仅在计入机房开销时显示),每段为芯片颜色的固定明度梯度,保留 1 px 分隔线、 右侧三条带末点功耗的标签、悬停/固定高亮和逐列提示框(提示框在各段加粗小计下仍列出 全部部件);明细由图旁新增的部件列表承担(`lg` 以上在图右侧,以下在图下方):表头为 对比点,每行一个非空部件,按功耗降序、机房开销置于末行,含名称、按功耗比例的小条、 瓦数、占 IT 比例和该部件随负载变化的迷你面积图(各自 0..最大值刻度,对比点打点), 行 `title` 标注实测 / 建模·固定 / 建模·随负载变化;悬停某行会在图中提亮其所属分段, 点击固定、Escape 取消;列表随滑块和硬件选择同步。非官方 run 以 `overlayRunColor` 使用相同的三段与列表。移除十二级梯度和逐部件图例;`SYSTEM_POWER_CATEGORIES` 与 API 不变。补充单元测试、Cypress 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): restore the six-layer hatched breakdown, keep the parts list The breakdown plot, the comparison bars and the legends go back to the treatment the panel had before the component-level and single-hue passes: six layers in stack order (Measured GPU, Measured Grace CPU, Server parts, Fans + PSU loss, Network share, Facility overhead), each a fixed opacity step of the chip colour (0.9 / 0.72 / 0.5 / 0.34 / 0.2, hatch tint 0.18) like the Profit Estimator's stacked bars, every modeled layer hatched at its own stripe angle (45 / 45 / 45 / 135 / 0 / 90 deg) like its loss segment, measured layers solid. The twelve API parts stay; the layers are a mapping over them (`POWER_BANDS` / `POWER_BAND_CATEGORIES`: server = cpu + memory + nic + nvswitch + storage + other, fansPsu = fans + psuLoss), so the API, CSV and skills contract from the component-level pass are untouched. Kept from the later passes: stacked area by default (`i_pbview`), the bars toggle, the per-column tooltip with bold layer subtotals (a layer that folds several parts lists them beneath), the parts list beside the plot with hover/pin through `usePowerLayerHighlight` (a hovered layer keeps its step and hatch, its edge thickens, the others fade to 0.25), overlay runs in `overlayRunColor`, and the download button. Dropped: the right-edge layer labels and the three-band opacity ramp. Tests cover the mapping, the opacity and hatch tables, the pattern defs, the legend order and swatches, the tooltip rows, the highlight states, the chip-compare segments and the overlay path; the Cypress component spec checks the five legend rows, the patterns and the absence of edge labels. Docs and the skills reference describe the six hatched layers; the route catalog digest for `utils/power-breakdown.ts` is refreshed (presentation only, no API change). 中文:恢复 PowerX 功耗构成图原有的六层斜线填充样式,并保留图旁的部件列表。 六层按堆叠顺序为实测 GPU、实测 Grace CPU、服务器部件、风扇 + 电源损耗、网络分摊、 机房开销,每层为芯片颜色的固定透明度阶梯,建模层按各自角度画斜线,实测层为纯色。 API 的十二个部件不变,六层只是其映射;保留默认堆叠面积图、提示框分层小计、 部件列表的悬停/固定联动、非官方运行叠加与下载按钮;去掉右侧边缘标签与三段透明度渐变。 相应更新了单元测试、Cypress 组件测试、文档与 skills 参考,并刷新了路由目录摘要。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
edwingao28
added a commit
that referenced
this pull request
Oct 27, 2026
* [Feature] add a PowerX dashboard tab / 新增 PowerX 仪表板标签页 * [Chore] remove the PowerX terms glossary / 移除 PowerX 术语说明 * [Feature] link PowerX chart hover to chip compare and space across-load bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列 (#1477) * [Feature] link PowerX chart hover to chip compare and space across-load bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列 * [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 (#1478) * [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 * [PowerX] declutter the PowerX tab: chart above the fold, single control layer, shorter copy / 精简 PowerX 页面:图表置顶、单层控件、精简文案 (#1480) * feat(powerx): declutter the PowerX tab: chart above the fold, one control layer, shorter copy The PowerX tab opened on 39 controls and no data: four question tiles, a question line and a how-to-read line, an "Advanced settings" drawer that re-expressed Count / Show as / Split by as Boundary / Display / Compare, and three full-width control fieldsets pushed the chart card to y=925 at 1440x900. The same boundary was also named three ways on one screen. - Render the four questions as one compact segmented tab row (still a role=tablist with the same test ids and analytics); the hint moves to the button title. Drop the per-tab question and how-to-read lines. - Remove the Advanced settings drawer. Scope and Power statistic, the only controls it added, render under the tab toggles on the Power draw tab (Scope alone on per-token Energy) through a new `fields` prop on MeasuredMetricControls. URL params and API behaviour are unchanged. - On PowerX, put Benchmark Config, Chart Config and Compare history on one row and drop the Scenario / Precision select when it has a single locked option; fix the mobile "changed" count that counted the hidden Y-axis metric. - Copy: header description keeps its first sentence; chip-compare and drill-down subtitles cut to one short line; the power model revision footnote moves into the breakdown chart tooltip. - One vocabulary: `POWER_COUNT_LABELS` in lib/power/power-basis.ts feeds the Count toggle, and on the PowerX surface the legend Boundary rows, line-end labels, tooltip series line and table Series column say "GPU only / Whole system" instead of the registry names. CSV columns, API values and URL params keep the registry names. - Chart card top at 1440x900: 925 -> 780 (390x844: 1324 -> 1196). 中文:精简 PowerX 页面:四个问题改为一行紧凑的分段标签(保留 tablist 语义、 测试 id 与埋点,提示文字移入 title),删除每个标签页下的问题行与阅读说明行; 移除“高级设置”抽屉,仅把统计范围与功耗统计量放回标签切换下方(URL 参数与 API 行为不变);PowerX 上基准测试配置、图表配置与历史对比并排一行,只有一个选项 的场景/精度选择器不再显示;页头描述只保留第一句,芯片对比与下钻副标题缩短, 功耗模型版本脚注移入图表提示框;统一术语,PowerX 图例、曲线标签、提示框与表格 均使用“仅 GPU / 整体系统”。1440x900 下图表卡片顶部由 925px 提前到 780px。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): v2 layout: chart first, four views as tabs, options in the legend rail Experimental re-sequencing of the PowerX tab, between the current control stack and the chart-only mock: every feature stays reachable, nothing is deleted, and no URL param or API value changes. - New `components/inference/powerx/`: `PowerXFrame` (section header, the four views as compact tabs with one tooltip hint each, Chart/Table and export on the right of the strip, one caption row with the model dropdown, scenario and precision toggles only when there is a choice, and the compact run chip with the changelog), `PowerXLegendControls` (Count, Per, Show as in the legend rail), `PowerXMoreViews` (collapsed expander with Scope, Power statistic, Compare boundaries, Split by and an Open power over time shortcut), `PowerXCurveSection`, `PowerXProvenance`, and the pure `powerx-views.ts` view/metric mapping that replaces `PowerXTabs.tsx`. - `ChartDisplay` renders through the frame on the PowerX surface only (embeds and minimal chrome keep the shared layout); it opens on energy per output token. `ChartControls`, the question tabs and the inline toggle rows no longer render there; model, scenario, precision, x-axis, chip config and date range still flow through InferenceContext and the URL, so share links, `?unofficialrun=` overlays, /zh and the views API are unchanged. - Where the power goes: the chip comparison is the visual; clicking a bar opens that chip's drill-down inline under it (`PowerAnalysisPanels` `layout="inline"`, compact `PowerBreakdownPanel` with a Collapse button, one shared stack legend); the boundary line chart sits in a collapsed "Compare on the curve" section. An empty selection now says so instead of leaving a gap. - Provenance strip under the chart (measured points, validated windows, power model revision, PUE) is the summary of the collapsed "How we measure" details; a pinned point's "View power trace" still opens the Over time view focused on that trace. - `ChartLegend` gains `controls`, `footer` and `mobileLabel` slots; `ScatterGraph` passes them through plus `plotHeight`. On phones the rail folds into a "Chips & options" row under the plot and the plot is capped at 55 % of the viewport; touch-action pan-y stays via D3Chart. - Tests: `powerx-views.test.ts` (view switching, Count/Per/Show as metric mapping, provenance text) and `PowerXLayout.test.tsx` (tab order and selection, legend controls per view, Split by reason, provenance strip, caption row, frame order, zh strings). Cypress specs updated for the More views expander and the energy default. Docs and the skills reference describe the v2 layout. 中文:PowerX v2 布局(实验性):图表优先,四个视图改为紧凑标签页(每 Token 能耗、功耗、功耗去向、随时间变化),图表/表格切换与导出按钮位于标签栏右侧; 标题下只保留一行说明(模型下拉、有选择时才显示的场景与精度切换、紧凑的运行 日期与变更日志)。统计范围、计量单位、显示方式移入图例栏,统计范围、功耗统计 量、对比功耗边界、拆分方式与“打开功耗随时间变化”收在折叠的“更多视图”中。 “功耗去向”以芯片对比为主视图,点击横条内联展开该芯片的下钻图,功耗边界曲线 为折叠区块。图表下方新增一行数据来源说明,点击展开“测量方法”。手机端图例折叠 为“芯片与选项”一行,图表高度上限为视口 55%。URL 参数与 API 行为不变,所有 功能仍可到达;新增单元测试并更新 Cypress 用例与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): P0: IT-only basis, TDP headroom, load-swing stats and basis labels Implements the four PowerX P0 items from the data-center / power-team feedback on the existing v2 layout, on the PowerX surface only. No URL parameter is renamed; the new boundary rides on `i_metric` like the others. P0-1 IT-only power basis - `lib/power/power-basis.ts`: fifth basis `it-modeled` ("All in Measured IT (no PUE)") = `modeledSystemPower.deploymentItWatts ÷ gpuCount`, the breakdown stack minus its facility part, from the same estimate the facility figure uses (no new formula); `utilityModeledWatts = itModeledWatts × PUE` at every point. New fields `itModeledWatts` / `itModeledJPerOutputToken`, metric keys `y_itModeledWatts` / `y_itModeledJPerOutputToken`, measured-metric configs, All in Measured table rules and CSV, chart power envelope, compare variants (boundaries = GPU only, IT, Facility; `all` = five lines), tooltips, legend/line labels. - Count toggle is GPU only | IT (no PUE) | Facility (| All on Energy); `POWER_COUNT_LABELS` names the facility boundary "Facility" so the legend, pills, table series column and CSV share one vocabulary. - `PowerXReadout` under the caption: IT W/GPU, GPUs per MW (1e6 ÷ IT W), Facility W/GPU at PUE and measured GPU W for the hovered or pinned point (ScatterGraph feeds an active-point context), else the point nearest 80 tok/s/user. - Where the power goes stacks IT only by default; `PowerXFacilitySwitch` (context state, default off) appends the PUE part; `breakdownSeriesAtBoundary` derives the IT series for the chip comparison, the drill-down and their tooltips; "Storage and out-of-rack network are not modeled." sits under the bars. P0-2 Measured-vs-TDP headroom - ScatterGraph `powerx-headroom` layer (PowerX + % of TDP only): shades between each chip's P90 draw (dotted) and 100 % TDP in the chip color. - `lib/power/headroom.ts` + `PowerXHeadroomTable`: avg W, P90 W, % TDP (P90) and headroom = 1 − P90/TDP at 25 / 50 / 100 / 300 tok/s/user via `interpolateMetricAtInteractivity` (no extrapolation → "—"), one example callout computed from the data, CSV download. - Views API: `GET /api/v1/views/inference?headroom=true` returns the same rows (`headroom.rows`), documented in OpenAPI, options defaults and the skills reference. P0-3 Load-swing statistics and export - `lib/power/load-swing-stats.ts` (pure, unit-tested on a synthetic trace): peak, min, idle floor (P5 before the window), window mean, P5 / P95, max Δ1s / Δ5s, ramp up / down per second, volatility (std ÷ mean), NVL72 rack scaling (× 72, upper bound); telemetry gaps are counted and never bridged. - New published route `GET /api/v1/gpu-metrics-point/stats?id=N [&format=json|csv][&scale=gpu|nvl72]` serves the stats (or the 1 s trace as CSV) from the same stored buckets with the same function. - `PowerLoadSwings` above the Over time chart on PowerX: per-trace stats row with % TDP for the Δ columns, "× 72 per NVL72 rack" switch with the correlation caveat, per-point CSV / JSON downloads from the route; fixed caveat line "1 s DCGM samples · single node · inference only · sub-second swings not captured" under the chart. P0-4 Labels - `PowerBasisPill` (GPU / IT / Facility) on readouts, table headers, breakdown totals and the tooltip power-model block, explained once in How we measure, which also gains the three-meanings-of-utilization note. - Collapsed "What is PowerX?" line under the page description (en + zh). Not built: P0-5 "Copy chart for Slack" (mock-only placeholder). Tests: power-basis (IT identity), headroom, load-swing stats, stats route, inference view headroom panel, power-breakdown IT boundary, powerx-views, PowerXLayout (Count labels, readout, What is, basis key, facility switch), power-compare / measured-metric-config expectations, Cypress component spec labels; API route catalog digests and skills integrity refreshed. 中文:实现 PowerX P0 的四项功能(仅限 PowerX 页面,不改 URL 参数名): (1) 新增 IT(不含 PUE)功耗口径 `it-modeled`,取自同一系统功耗模型的 deploymentItWatts ÷ GPU 数,即功耗构成堆叠去掉数据中心开销的部分;统计范围 改为“仅 GPU | IT(不含 PUE)| 数据中心”,标题行下方新增读数行(每 GPU IT 功耗、每 MW 可支持 GPU 数、按 PUE 计的数据中心功耗),“功耗去向”默认只堆叠 IT,新增“计入数据中心开销”开关。(2) 功耗按 TDP 占比显示时填充 P90 到 100% 的余量,并新增按交互性(25/50/100/300 tok/s/user)插值的余量表与 CSV 导出;views API 新增 `headroom=true`。(3) 新增负载波动统计(峰值、最小 值、空闲底线、均值、P5/P95、最大 1 s/5 s 变化、上升/下降速率、波动率,可按 NVL72 机架 ×72 换算)、新的只读接口 `/api/v1/gpu-metrics-point/stats` (JSON 统计或 1 秒曲线 CSV)与下载按钮,图表下方固定注明“1 秒 DCGM 采样 · 单节点 · 仅推理 · 不包含亚秒级波动”。(4) 所有功耗数值带 GPU / IT / 数据中心 标签,“测量方法”中统一解释并补充“利用率”的三种含义,页面描述下新增可折叠 的“什么是 PowerX?”。未实现 P0-5 的“复制图表到 Slack”(仅为 mock 占位)。 附带单元测试、API 文档、路由摘要与 skills 文档更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): cut the method copy, match the /inference layout, fix overlay bugs Copy - "How we measure" keeps three sentences: each point is one benchmark configuration; GPU power is measured every second and averaged over the validated serving window, other components are modeled; AgentX estimates are not calibrated against measured system power (AgentX only). The separate summary sentence, the three-tag key, the utilization paragraph, the basis assumptions and the All-in-Measured note are gone from the PowerX disclosure (the non-PowerX caption keeps its own notes). - Each GPU / IT / Facility pill explains its tag in its `title` only: "GPU board power, measured by DCGM", "GPU + modeled server, no PUE", "IT x PUE". - "What is PowerX?" is dropped; the description reads "Measured GPU power and energy per token for every benchmark point, with a modeled IT and facility breakdown." Layout (same chrome as /inference) - PowerX renders through the shared ChartDisplay frame: section header Card, the four views as a tab strip under the description, the Benchmark Config fieldset (Model / Scenario / Precision selectors), Chart Config (X-Axis Metric beside Count, Per or Show as, and the collapsed More views row) in place of the Y-axis pick, Compare history, the run date / run / changelog row; the Chart/Table toggle and export menu sit above the chart card, right-aligned; the chart card keeps the h2 caption, Updated / Source line, the readout as outline badges (the TCO badge row style), the plain Quick Filters legend and the footer notes, which now end with the provenance line + How we measure. - PowerXFrame, PowerXCaptionRow, PowerXWhatIs and the legend-rail controls are removed; headroom and load-swing tables use the validated-window summary table style; the Where view keeps its caption at the top of the card. Overlay bugs - % of TDP headroom: the y-axis reaches 100 % so the band ends at the TDP line instead of the plot edge; the SVG key text that sat over the top points is now a sentence in the table note. - Unofficial-run overlays get their own headroom band in the run color (`overlayRunColor`, filtered by `activeOverlayHwTypes`) and their own rows in the headroom table (run-colored dot, run tag, `source` CSV column); they were silently merged into the official chip before. - Chart tooltips clamp below the sticky site header instead of under it. - "More views" no longer wraps its label on phones. Tests: PowerXLayout, headroom (overlay rows), ScatterGraph PowerX overlay bands (new file), scatter-points tooltip clamp; the powerx-compare e2e asserts the new method sentence; docs updated. 中文:精简 PowerX 的测量说明文案(仅保留三句,标签含义移入 pill 的 title,删除“什么是 PowerX?”),让 PowerX 页面沿用 /inference 的布局与 组件(区块头、Benchmark Config / Chart Config / Compare history 字段集、 图表上方的 Chart/Table 与导出工具栏、相同的图表卡片与图例),并修复 重叠问题:TDP 余量阴影延伸到 100% 线且图内文字移到表格说明;非官方运行 overlay 拥有自己的余量阴影与表格行(按运行配色);图表提示框不再被 置顶站点页眉遮挡;手机端“更多视图”标签不再换行。补充/更新单元测试、 e2e 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): keep the across-load stacks open on Where, compare boundaries on Power draw Where the power goes - The compared chip's drill-down (the "across load" stacked bars / stacked area panel) is open inline under its bar from the first render, not only after a click. The compared chip is the one whose point sits nearest the slider interactivity; moving the slider to another chip moves the panel with it. Clicking a bar or picking a chip in the panel's Hardware select pins it to that chip until the slider moves on; Collapse (or clicking the open bar) hides it for the rest of the session, and clicking a bar opens it again. Session state only, no URL parameter. - The compact panel keeps the "<chip> across load" title with its one-line subtitle, the Hardware select (now shown in compact mode too), the Stacked bars | Stacked area toggle (`i_pbview`), the TDP and All in Provisioned reference lines and the PNG / CSV buttons; the stack legend above the bars stays the only legend. A chip picked in the Hardware select that has no bar near the slider renders its panel after the list. - The collapsed "Compare on the curve" section (`PowerXCurveSection`) is removed from the Where view; the view's own compare mode is the new `i_pcompare=breakdown`, which overlays no series on the chart. Power draw - Count gains "All", as Energy per token already had: it sets `i_pcompare=boundaries` and draws GPU only (solid), IT no PUE (dashed) and Facility (dash-dot) per chip on the one scatter, with the existing Boundary legend section; X-Axis Metric and Show as apply as on any Power draw chart (% of TDP stays GPU-only). `powerXViewFor` keeps a boundary overlay on the metric's own view instead of sending it to Where. - The "Compare boundaries: All five" control under More views stays as the rated-lines variant, relabelled "Rated boundaries: Off | TDP + provisioned" (`selectPowerXRated`): on sets `all`, off returns to the measured three. It is offered only where the rated series exist, J per output token (`powerXRatedAvailable`); W per chip has no rated series, so All already draws every boundary there. Unofficial-run overlays are untouched (the chip comparison keeps its run-colored sources; the Power draw overlay path expands the same boundaries). Tests: new PowerAnalysisPanels jsdom test (default-expanded compared chip, slider follow, collapse persists, pin, Hardware select and Stacked bars | Stacked area in compact mode), powerx-views (breakdown mode, Count: All on Power draw, rated toggle), PowerXLayout (Count labels and states). Docs and the inferencex-api skill reference updated. 中文:“功耗去向”视图默认即在所对比芯片(最接近滑块交互性的芯片)的横条下方内联 展开“随负载变化”的堆叠柱状图 / 堆叠面积图面板,并随滑块切换芯片;点击横条或在 面板的硬件选择器中选择芯片会固定到该芯片,“收起”后在本次会话中保持收起,再次 点击横条可重新展开(仅会话状态,不写入 URL)。紧凑面板保留标题与一行副标题、 硬件选择器、“堆叠柱状图 | 堆叠面积图”切换(`i_pbview`)、TDP 与整体预配参考线 以及 PNG / CSV 按钮;横条上方的图例是唯一图例。移除“在曲线上对比”折叠区块,该 视图改用 `i_pcompare=breakdown`。“功耗”视图的“统计范围”新增“全部”(与“每 Token 能耗”一致):设置 `i_pcompare=boundaries`,在同一散点图上按芯片绘制仅 GPU (实线)、IT(虚线)与数据中心(点划线),沿用现有“功耗边界”图例;横轴指标与 显示方式控件照常生效。“更多视图”中的对比功耗边界控件改为“额定边界:关闭 | TDP + 整体预配”,仅在存在额定序列(每输出 token 能耗)时可用。非官方运行 overlay 行为不变。补充 PowerAnalysisPanels 单元测试并更新 powerx-views、PowerXLayout 测试、文档与 inferencex-api skill 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): drop the provenance strip and More views, lay Chart Config out like /inference - Footer: remove the "N measured points · validated windows · power model rev · PUE" line (`powerXProvenanceText`, `PowerXProvenance`); the collapsed "How we measure" details stays as a plain muted link (`PowerXMethod`) with the same method sentences. - Chart Config: remove the "More views" expander (`PowerXMoreViews`) and the "Open power over time" shortcut. Scope, Power statistic and Rated boundaries are plain labelled controls beside X-Axis Metric, Count and Per / Show as, each shown only on the views where it applies; Split by stays in the Where the power goes card. - Update unit tests, Cypress specs, docs/powerx-permanent-view.md, the skills dashboard-views reference and integrity.json. 中文:移除 PowerX 页脚的来源信息行(实测数据点数、验证窗口、功耗模型版本、PUE), 仅保留折叠的“测量方法”链接;移除图表配置中的“更多视图”折叠区和“打开功耗随时间变化” 按钮,统计范围、功耗统计量与额定边界改为与 /inference 相同布局的普通控件,仅在适用 的视图上显示;拆分方式仍位于“功耗去向”卡片。同步更新单元测试、Cypress 用例、文档与 skills 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * fix(powerx): lay the Chart Config out in the /inference grid, pair rated with GPU only The PowerX Count, Per or Show as, Scope, Power statistic and Rated boundaries controls sat in one flex-wrap box inside the second Chart Config column, so X-Axis Metric stood alone on the left while the rest stacked tall on the right. They now render as `contents`, so each one is a cell of the same grid /inference uses: the X-Axis Metric column stays 11rem (18rem on agentic traces) and the rest of the row splits in two. Row one is X-Axis Metric and Count (two cells, equal segments); row two is Per or Show as, then Scope and Power statistic or Rated boundaries, flowing left to right with no empty cells. Every control fills its cell, toggles wrap instead of overflowing, and each label carries the same (i) help as X-Axis Metric. Below sm every control is a row inside the "More chart controls" fold, whose changed count now includes the PowerX controls (`powerXChangedCount`). The Chinese Count label becomes 统计口径 so it no longer shares a name with Scope (统计范围). Rated boundaries is now Off | All-in provisioned and draws exactly two lines per chip: measured GPU power (solid) and the all-in provisioned bound (dashed), with no IT, Facility or GPU-level TDP line, so the chart stays readable. It has its own compare value, `i_pcompare=provisioned` (`PROVISIONED_COMPARE_BASES`), and the Boundary legend lists just those two; the five-line `all` stays reachable from share links only. Docs and the inferencex-skills reference follow. 中文:PowerX 的统计口径、计量单位/显示为、统计范围、功耗统计量与额定边界 控件原先挤在图表配置第二列的一个 flex-wrap 容器中,导致 X 轴指标独占左列、 其余控件在右列纵向堆叠。现改为 `contents` 渲染,使每个控件成为 /inference 同一网格的单元格:X 轴指标列保持 11rem(智能体场景 18rem),其余宽度平分为 两列。第一行为 X 轴指标与统计口径(占两格、等宽分段),第二行为计量单位或 显示为、统计范围、功耗统计量或额定边界,自左向右排布、无空格。各控件填满 单元格,分段切换换行而不溢出,标签带有与 X 轴指标相同的 (i) 说明。sm 以下 每个控件独占一行,位于“更多图表设置”折叠区内,其“已更改”计数现包含 PowerX 控件(`powerXChangedCount`)。中文“统计口径”取代原“统计范围”,避免与 Scope (统计范围)同名。 额定边界改为“关闭 | 整体预配”,每芯片仅绘制两条线:GPU 实测功耗(实线)与 整体预配功耗(虚线),不再绘制 IT、数据中心或 GPU 级 TDP 线,以降低认知负担。 它使用独立的对比值 `i_pcompare=provisioned`(`PROVISIONED_COMPARE_BASES`), 图例“功耗边界”仅列出这两项;五条线的 `all` 仅能通过分享链接访问。文档与 inferencex-skills 参考同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the How we measure footer note Remove the collapsed "How we measure" details (`PowerXMethod`) from the PowerX chart footer, its en/zh strings, its unit tests and the Cypress assertion on it. The shared /inference footer notes stay as they are; the GPU / IT / Facility tag meaning now lives only in each pill's `title`. Docs and the inferencex-skills dashboard-views reference no longer point at the note; the skills integrity manifest is regenerated. 中文:移除 PowerX 图表页脚中折叠的“测量方法”说明(`PowerXMethod`)及其中英文文案、 单元测试和 Cypress 断言。/inference 共用的页脚说明保持不变;GPU / IT / 数据中心 标签的含义仅保留在各标签自身的 `title` 提示框中。文档与 inferencex-skills 的 dashboard-views 参考不再指向该说明,并重新生成 skills integrity 清单。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the chart hint and ISL/OSL footer lines PowerX no longer shows the "Shift+Scroll to zoom • Drag to pan • Double-click to reset • Click a point to pin tooltip" line (nor its touch variant) under its charts: ScatterGraph and PowerTimeline pass an empty `instructions` when `usePowerXSurface()` is true; the breakdown panels already did. The "Completed requests across all resident points" ISL/OSL footer is gated off on PowerX too, and ChartDisplay skips the resident-sequence-lengths query there. /inference, embeds and the `minimalChrome` path are unchanged. Tests: ScatterGraph.powerx-chrome.test.tsx covers the hint on /inference, PowerX and minimal chrome; powerx-compare.cy.ts adds an official-only agentic PowerX case asserting no hint, no ISL/OSL footer and no sketch request; powerx-timeline.cy.ts asserts no hint under the timeline. 中文:PowerX 页面不再在图表下方显示「按住 Shift 滚动以缩放 · 拖动以平移 · 双击以重置 · 点击数据点固定提示框」交互提示(含触屏版本),ScatterGraph 与 PowerTimeline 在 usePowerXSurface() 为真时传入空 instructions;同时隐藏 「当前所有数据点的已完成请求」ISL/OSL 页脚,并在 PowerX 上跳过 resident-sequence-lengths 查询。/inference、嵌入页与 minimalChrome 行为不变。 新增单元测试与 Cypress 用例覆盖上述三种 PowerX 视图。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): component-level power breakdown with per-layer colours, area default Where the power goes, per Oren's review of #1480: - The across-load drill-down opens on the stacked area view; `i_pbview=bars` still selects the stacked bars and the toggle stays. - "Server parts" is split into the pinned power model's real component classes. The breakdown now carries, in stack order, gpu (measured), measuredCpu (Grace socket telemetry, CPU + LPDDR), cpu, memory, nic (NIC cards + system-side optics), nvswitch (NVSwitch ASICs and the NVL72 switch tray incl. its embedded EPYC), storage, other (PCIe switches, retimers, shelf controllers), fans, psuLoss (AC/DC + DC/DC conversion loss), network and facility. `systemPowerLeafCategory` maps leaf names to parts and the test pins the full leaf table across every supported system; a renamed upstream component lands in `other` and fails it. AMD chassis have no nvswitch, B300 has no other, NVL72 rows with measured sockets have no cpu/memory. The parts still sum to All in Measured W/GPU (IT + facility). - One colour per part, shared by every chip, so a single SKU's layers are tellable apart: `--power-part-*` tokens next to the `--overlay-run-*` palette in globals.css with light, dark and minecraft values. Measured layers are solid, modeled layers keep the hatch over a lighter fill of their own colour, facility is the lightest hatch; the chip's vendor colour stays on its legend dot, the area's top edge and total dots. Legend swatches, tooltip rows and the chip-compare segments use the same swatches. - API: `powerBreakdowns[].categories` and `wattsPerGpu` carry the new keys; OpenAPI schema, route-catalog digest, skills reference (+ integrity) and the PowerX docs updated; CSV export has one column per part. 中文:PowerX「功耗去向」视图改为默认显示堆叠面积图(`i_pbview=bars` 仍可切回堆叠柱状图); 「服务器部件」按功耗模型的真实组件拆分为 CPU、内存、网卡、NVSwitch、存储、PCIe 及其他、 风扇、电源损耗、网络分摊与机房开销,各部分之和仍等于 All in Measured W/GPU,并以测试 固定了全部系统的叶子组件到分类的映射;每个分类使用站点统一的独立颜色(globals.css 中 的 `--power-part-*` token,含浅色/深色主题),实测层为实色、建模层保留斜线,芯片厂商色 仅用于图例圆点与总功耗轮廓;API 响应、OpenAPI、路由目录摘要、skills 参考与文档同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): single-hue breakdown with hover-to-identify and edge labels Where the power goes, after Wenyao's review of the per-part palette in #1480: - One hue per chip again. Every layer is a lightness step of the chip's own colour: `powerLayerOpacity(index, count)` runs linearly from 0.92 at the measured GPU base to 0.14 at the top over the parts that series actually has, so a 9-, 10- or 12-deep stack keeps evenly spaced, tellable steps, and a 1 px chip-colour stroke at 0.6 separates neighbours. The `--power-part-*` tokens, `powerCategoryColor`, the hatch patterns, `HATCH_ANGLE` and `cssHatchAngle` are gone; "Modeled" survives as a dashed swatch outline and the tooltip's basis column. - Interaction tells the bands apart. Hovering a band, its legend row or its edge label raises it to full opacity with a 1.5 px stroke and fades the rest to 0.25, with a small name + W/GPU label at the pointer (interpolated at the hovered x on the area, the column value on bars); clicking a legend row pins it (`aria-pressed`), a second click, Escape or a click on the plot unpins, a tap on a band pins on touch. The highlighted row is bold in the per-column tooltip. The state is shared between the chip comparison's legend, its bar segments and the open drill-down (`usePowerLayerHighlight`), so hovering "NICs" lights NICs on every chip. `powerx_breakdown_layer_highlighted`. - The area view labels every band at its right edge (name + W at the last point) in the right margin with a leader to the band centre; `placeEndLabels` pushes collisions apart at 12 px in stack order and the margin widens to the longest label. Below `sm` the labels are skipped so the plot keeps its width. - Legend rows are swatch + name in stack order; Measured/Modeled live in the swatch title. Comparison segments use the same ramp on each chip's colour. - Unofficial-run series get the same ramp from `overlayRunColor(runIndex)`: `buildPowerBreakdownsWithOverlays` keeps each run as its own `hwKey|precision|run<N>` series with the run tag, dashboard only (the API keeps `buildPowerBreakdowns`). - Kept from e727923: the twelve component categories, the API/skills contract, stacked area by default, the bars toggle, the per-column tooltip and CSV. - Tests: ramp monotone and distinct at 12 and 9 deep, band interpolation, end-label placement, overlay series; a jsdom harness that runs the panel's D3 layers covers legend hover/pin/Escape, plot hover, edge labels, margin, overlay colour and the chip-compare legend highlight. 中文:PowerX「功耗去向」堆叠图回到单一色相:每一层都是该芯片自身颜色的明度梯度 (`powerLayerOpacity` 按该系列实际存在的部件数从 0.92 线性降到 0.14,层间以 1 px 芯片色描边分隔),移除 `--power-part-*` 配色与斜线填充;「建模」改由图例色块的虚线边框和 提示框中的「建模」列表示。各层靠交互区分:悬停图层、图例项或右侧标签时该层提亮、其余层 淡化并显示名称与该 x 处的 W/GPU,点击图例固定高亮(`aria-pressed`),再次点击、Escape 或点击绘图区取消,触屏点按图层即固定;高亮状态在芯片对比图例、对比柱段与展开的下钻图之间 共享。堆叠面积图在右侧按堆叠顺序为每层标注名称与末点功耗,重叠时按 12 px 逐个推开并自动 加宽右边距,窄于 `sm` 时不显示。非官方 run 的系列以 `overlayRunColor` 使用同样的梯度。 保留 e727923 的十二个部件分类、API/skills 契约、默认堆叠面积图、柱状切换、提示框与 CSV 导出,并补充单元测试。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): three-band breakdown overview with a parts list Where the power goes, after Wenyao's review of the single-hue stack in #1480 ("this is not that clear"): stop drawing eleven parts in one stacked area and split the view into overview plus detail. - Overview: the drill-down's area and bars, and each chip-compare bar, collapse to three bands in stack order: Measured GPU (`gpu` + `measuredCpu`), Modeled server (`cpu`, `memory`, `nic`, `nvswitch`, `storage`, `other`, `fans`, `psuLoss`, `network`) and Facility overhead (`facility`, only when the facility is counted). `powerBandOpacity` gives each band a fixed step of the chip colour (0.92 / 0.53 / 0.14, the generic `powerLayerOpacity` called with 3), so the modeled band reads the same with or without the facility. The 1 px edges, the heavier top edge, the three right-edge labels with their watts at the last point, the hover/pin highlight and the per-column tooltip stay; the tooltip keeps every part under its band's bold subtotal. The legend shows the three bands; measured vs modeled stays as the dashed swatch outline and the tooltip word. A chip-compare modeled segment's `title` lists its parts and watts. - Detail: `PowerPartsList` sits right of the plot from `lg` (the plot keeps two thirds) and under it below. Its header is the compared point (`B200 (vLLM) FP4 · c16 · 88 tok/s/user`); one row per non-empty part of that chip, heaviest first, the facility row last under a rule: short name, a bar on a faint track in the band's step (dashed left edge when modeled), the watts, the share of IT (the facility row: of the facility total) and a 72×18 sparkline of that part across the chip's points on its own 0..max scale with the compared point dotted. The row `title` reads Measured, Modeled · fixed or Modeled · moves with load (`POWER_PART_BEHAVIOUR`, cross-checked against the model in tests). The list follows the slider and the Hardware select exactly as the plot's dashed outline does; off the comparison's range it reads the nearest point (`nearestBreakdownPoint`). - Shared highlight: `PowerLayerHighlight` is now `{ band, category, pinned }` and `usePowerLayerHighlight` takes a target, `bandTarget(band)` from the plot, legends and chip bars or `partTarget(category)` from a list row, so a hovered row raises its band everywhere and the row lights (`powerPart Emphasis`: highlighted, a sibling of a plot-hovered band, or plain). Click pins, Escape unpins. `powerx_breakdown_part_hovered` / `_pinned` on the rows; `powerx_breakdown_layer_highlighted` keeps the band events. - Overlay runs get the same bands, list and sparklines in `overlayRunColor(runIndex)`. - Removed with the collapse: the twelve-step ramp, `stackPowerBreakdown`, per-part legend rows and end labels, `data-category` on the drawn layers (now `data-band`). `SYSTEM_POWER_CATEGORIES` and the API are untouched. - Tests: bands, stacking, part rows (sort, shares, history), sparkline geometry, behaviour table vs the model, nearest point; the jsdom harness covers the three bands, legend, tooltip structure, edge labels, plot hover, list hover/pin/Escape, overlay colour and the chip-compare link; `PowerPartsList.test.tsx` covers the list alone in en and zh. Cypress component assertions updated for bands and the list. - Docs: `docs/powerx-permanent-view.md` and the skills dashboard-views reference (integrity regenerated). 中文:PowerX「功耗去向」下钻图不再把十一个部件画在同一张堆叠面积图里,而是拆成 「总览 + 明细」:面积图、柱状图和芯片对比横条都合并为三段(实测 GPU、建模服务器、 机房开销,仅在计入机房开销时显示),每段为芯片颜色的固定明度梯度,保留 1 px 分隔线、 右侧三条带末点功耗的标签、悬停/固定高亮和逐列提示框(提示框在各段加粗小计下仍列出 全部部件);明细由图旁新增的部件列表承担(`lg` 以上在图右侧,以下在图下方):表头为 对比点,每行一个非空部件,按功耗降序、机房开销置于末行,含名称、按功耗比例的小条、 瓦数、占 IT 比例和该部件随负载变化的迷你面积图(各自 0..最大值刻度,对比点打点), 行 `title` 标注实测 / 建模·固定 / 建模·随负载变化;悬停某行会在图中提亮其所属分段, 点击固定、Escape 取消;列表随滑块和硬件选择同步。非官方 run 以 `overlayRunColor` 使用相同的三段与列表。移除十二级梯度和逐部件图例;`SYSTEM_POWER_CATEGORIES` 与 API 不变。补充单元测试、Cypress 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): restore the six-layer hatched breakdown, keep the parts list The breakdown plot, the comparison bars and the legends go back to the treatment the panel had before the component-level and single-hue passes: six layers in stack order (Measured GPU, Measured Grace CPU, Server parts, Fans + PSU loss, Network share, Facility overhead), each a fixed opacity step of the chip colour (0.9 / 0.72 / 0.5 / 0.34 / 0.2, hatch tint 0.18) like the Profit Estimator's stacked bars, every modeled layer hatched at its own stripe angle (45 / 45 / 45 / 135 / 0 / 90 deg) like its loss segment, measured layers solid. The twelve API parts stay; the layers are a mapping over them (`POWER_BANDS` / `POWER_BAND_CATEGORIES`: server = cpu + memory + nic + nvswitch + storage + other, fansPsu = fans + psuLoss), so the API, CSV and skills contract from the component-level pass are untouched. Kept from the later passes: stacked area by default (`i_pbview`), the bars toggle, the per-column tooltip with bold layer subtotals (a layer that folds several parts lists them beneath), the parts list beside the plot with hover/pin through `usePowerLayerHighlight` (a hovered layer keeps its step and hatch, its edge thickens, the others fade to 0.25), overlay runs in `overlayRunColor`, and the download button. Dropped: the right-edge layer labels and the three-band opacity ramp. Tests cover the mapping, the opacity and hatch tables, the pattern defs, the legend order and swatches, the tooltip rows, the highlight states, the chip-compare segments and the overlay path; the Cypress component spec checks the five legend rows, the patterns and the absence of edge labels. Docs and the skills reference describe the six hatched layers; the route catalog digest for `utils/power-breakdown.ts` is refreshed (presentation only, no API change). 中文:恢复 PowerX 功耗构成图原有的六层斜线填充样式,并保留图旁的部件列表。 六层按堆叠顺序为实测 GPU、实测 Grace CPU、服务器部件、风扇 + 电源损耗、网络分摊、 机房开销,每层为芯片颜色的固定透明度阶梯,建模层按各自角度画斜线,实测层为纯色。 API 的十二个部件不变,六层只是其映射;保留默认堆叠面积图、提示框分层小计、 部件列表的悬停/固定联动、非官方运行叠加与下载按钮;去掉右侧边缘标签与三段透明度渐变。 相应更新了单元测试、Cypress 组件测试、文档与 skills 参考,并刷新了路由目录摘要。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
edwingao28
added a commit
that referenced
this pull request
Oct 27, 2026
…rt / PowerX 图表下新增逐点系统功耗构成 (#1443) * [Feature] add a per-point system power breakdown under the PowerX chart / PowerX 图表下新增逐点系统功耗构成 * [Feature] place the power breakdown on the interactivity x-axis / 功耗构成改用交互性作为 x 轴 * [Feature] add a PowerX dashboard tab / 新增 PowerX 仪表板标签页 (#1476) * [Feature] add a PowerX dashboard tab / 新增 PowerX 仪表板标签页 * [Chore] remove the PowerX terms glossary / 移除 PowerX 术语说明 * [Feature] link PowerX chart hover to chip compare and space across-load bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列 (#1477) * [Feature] link PowerX chart hover to chip compare and space across-load bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列 * [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 (#1478) * [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 * [PowerX] declutter the PowerX tab: chart above the fold, single control layer, shorter copy / 精简 PowerX 页面:图表置顶、单层控件、精简文案 (#1480) * feat(powerx): declutter the PowerX tab: chart above the fold, one control layer, shorter copy The PowerX tab opened on 39 controls and no data: four question tiles, a question line and a how-to-read line, an "Advanced settings" drawer that re-expressed Count / Show as / Split by as Boundary / Display / Compare, and three full-width control fieldsets pushed the chart card to y=925 at 1440x900. The same boundary was also named three ways on one screen. - Render the four questions as one compact segmented tab row (still a role=tablist with the same test ids and analytics); the hint moves to the button title. Drop the per-tab question and how-to-read lines. - Remove the Advanced settings drawer. Scope and Power statistic, the only controls it added, render under the tab toggles on the Power draw tab (Scope alone on per-token Energy) through a new `fields` prop on MeasuredMetricControls. URL params and API behaviour are unchanged. - On PowerX, put Benchmark Config, Chart Config and Compare history on one row and drop the Scenario / Precision select when it has a single locked option; fix the mobile "changed" count that counted the hidden Y-axis metric. - Copy: header description keeps its first sentence; chip-compare and drill-down subtitles cut to one short line; the power model revision footnote moves into the breakdown chart tooltip. - One vocabulary: `POWER_COUNT_LABELS` in lib/power/power-basis.ts feeds the Count toggle, and on the PowerX surface the legend Boundary rows, line-end labels, tooltip series line and table Series column say "GPU only / Whole system" instead of the registry names. CSV columns, API values and URL params keep the registry names. - Chart card top at 1440x900: 925 -> 780 (390x844: 1324 -> 1196). 中文:精简 PowerX 页面:四个问题改为一行紧凑的分段标签(保留 tablist 语义、 测试 id 与埋点,提示文字移入 title),删除每个标签页下的问题行与阅读说明行; 移除“高级设置”抽屉,仅把统计范围与功耗统计量放回标签切换下方(URL 参数与 API 行为不变);PowerX 上基准测试配置、图表配置与历史对比并排一行,只有一个选项 的场景/精度选择器不再显示;页头描述只保留第一句,芯片对比与下钻副标题缩短, 功耗模型版本脚注移入图表提示框;统一术语,PowerX 图例、曲线标签、提示框与表格 均使用“仅 GPU / 整体系统”。1440x900 下图表卡片顶部由 925px 提前到 780px。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): v2 layout: chart first, four views as tabs, options in the legend rail Experimental re-sequencing of the PowerX tab, between the current control stack and the chart-only mock: every feature stays reachable, nothing is deleted, and no URL param or API value changes. - New `components/inference/powerx/`: `PowerXFrame` (section header, the four views as compact tabs with one tooltip hint each, Chart/Table and export on the right of the strip, one caption row with the model dropdown, scenario and precision toggles only when there is a choice, and the compact run chip with the changelog), `PowerXLegendControls` (Count, Per, Show as in the legend rail), `PowerXMoreViews` (collapsed expander with Scope, Power statistic, Compare boundaries, Split by and an Open power over time shortcut), `PowerXCurveSection`, `PowerXProvenance`, and the pure `powerx-views.ts` view/metric mapping that replaces `PowerXTabs.tsx`. - `ChartDisplay` renders through the frame on the PowerX surface only (embeds and minimal chrome keep the shared layout); it opens on energy per output token. `ChartControls`, the question tabs and the inline toggle rows no longer render there; model, scenario, precision, x-axis, chip config and date range still flow through InferenceContext and the URL, so share links, `?unofficialrun=` overlays, /zh and the views API are unchanged. - Where the power goes: the chip comparison is the visual; clicking a bar opens that chip's drill-down inline under it (`PowerAnalysisPanels` `layout="inline"`, compact `PowerBreakdownPanel` with a Collapse button, one shared stack legend); the boundary line chart sits in a collapsed "Compare on the curve" section. An empty selection now says so instead of leaving a gap. - Provenance strip under the chart (measured points, validated windows, power model revision, PUE) is the summary of the collapsed "How we measure" details; a pinned point's "View power trace" still opens the Over time view focused on that trace. - `ChartLegend` gains `controls`, `footer` and `mobileLabel` slots; `ScatterGraph` passes them through plus `plotHeight`. On phones the rail folds into a "Chips & options" row under the plot and the plot is capped at 55 % of the viewport; touch-action pan-y stays via D3Chart. - Tests: `powerx-views.test.ts` (view switching, Count/Per/Show as metric mapping, provenance text) and `PowerXLayout.test.tsx` (tab order and selection, legend controls per view, Split by reason, provenance strip, caption row, frame order, zh strings). Cypress specs updated for the More views expander and the energy default. Docs and the skills reference describe the v2 layout. 中文:PowerX v2 布局(实验性):图表优先,四个视图改为紧凑标签页(每 Token 能耗、功耗、功耗去向、随时间变化),图表/表格切换与导出按钮位于标签栏右侧; 标题下只保留一行说明(模型下拉、有选择时才显示的场景与精度切换、紧凑的运行 日期与变更日志)。统计范围、计量单位、显示方式移入图例栏,统计范围、功耗统计 量、对比功耗边界、拆分方式与“打开功耗随时间变化”收在折叠的“更多视图”中。 “功耗去向”以芯片对比为主视图,点击横条内联展开该芯片的下钻图,功耗边界曲线 为折叠区块。图表下方新增一行数据来源说明,点击展开“测量方法”。手机端图例折叠 为“芯片与选项”一行,图表高度上限为视口 55%。URL 参数与 API 行为不变,所有 功能仍可到达;新增单元测试并更新 Cypress 用例与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): P0: IT-only basis, TDP headroom, load-swing stats and basis labels Implements the four PowerX P0 items from the data-center / power-team feedback on the existing v2 layout, on the PowerX surface only. No URL parameter is renamed; the new boundary rides on `i_metric` like the others. P0-1 IT-only power basis - `lib/power/power-basis.ts`: fifth basis `it-modeled` ("All in Measured IT (no PUE)") = `modeledSystemPower.deploymentItWatts ÷ gpuCount`, the breakdown stack minus its facility part, from the same estimate the facility figure uses (no new formula); `utilityModeledWatts = itModeledWatts × PUE` at every point. New fields `itModeledWatts` / `itModeledJPerOutputToken`, metric keys `y_itModeledWatts` / `y_itModeledJPerOutputToken`, measured-metric configs, All in Measured table rules and CSV, chart power envelope, compare variants (boundaries = GPU only, IT, Facility; `all` = five lines), tooltips, legend/line labels. - Count toggle is GPU only | IT (no PUE) | Facility (| All on Energy); `POWER_COUNT_LABELS` names the facility boundary "Facility" so the legend, pills, table series column and CSV share one vocabulary. - `PowerXReadout` under the caption: IT W/GPU, GPUs per MW (1e6 ÷ IT W), Facility W/GPU at PUE and measured GPU W for the hovered or pinned point (ScatterGraph feeds an active-point context), else the point nearest 80 tok/s/user. - Where the power goes stacks IT only by default; `PowerXFacilitySwitch` (context state, default off) appends the PUE part; `breakdownSeriesAtBoundary` derives the IT series for the chip comparison, the drill-down and their tooltips; "Storage and out-of-rack network are not modeled." sits under the bars. P0-2 Measured-vs-TDP headroom - ScatterGraph `powerx-headroom` layer (PowerX + % of TDP only): shades between each chip's P90 draw (dotted) and 100 % TDP in the chip color. - `lib/power/headroom.ts` + `PowerXHeadroomTable`: avg W, P90 W, % TDP (P90) and headroom = 1 − P90/TDP at 25 / 50 / 100 / 300 tok/s/user via `interpolateMetricAtInteractivity` (no extrapolation → "—"), one example callout computed from the data, CSV download. - Views API: `GET /api/v1/views/inference?headroom=true` returns the same rows (`headroom.rows`), documented in OpenAPI, options defaults and the skills reference. P0-3 Load-swing statistics and export - `lib/power/load-swing-stats.ts` (pure, unit-tested on a synthetic trace): peak, min, idle floor (P5 before the window), window mean, P5 / P95, max Δ1s / Δ5s, ramp up / down per second, volatility (std ÷ mean), NVL72 rack scaling (× 72, upper bound); telemetry gaps are counted and never bridged. - New published route `GET /api/v1/gpu-metrics-point/stats?id=N [&format=json|csv][&scale=gpu|nvl72]` serves the stats (or the 1 s trace as CSV) from the same stored buckets with the same function. - `PowerLoadSwings` above the Over time chart on PowerX: per-trace stats row with % TDP for the Δ columns, "× 72 per NVL72 rack" switch with the correlation caveat, per-point CSV / JSON downloads from the route; fixed caveat line "1 s DCGM samples · single node · inference only · sub-second swings not captured" under the chart. P0-4 Labels - `PowerBasisPill` (GPU / IT / Facility) on readouts, table headers, breakdown totals and the tooltip power-model block, explained once in How we measure, which also gains the three-meanings-of-utilization note. - Collapsed "What is PowerX?" line under the page description (en + zh). Not built: P0-5 "Copy chart for Slack" (mock-only placeholder). Tests: power-basis (IT identity), headroom, load-swing stats, stats route, inference view headroom panel, power-breakdown IT boundary, powerx-views, PowerXLayout (Count labels, readout, What is, basis key, facility switch), power-compare / measured-metric-config expectations, Cypress component spec labels; API route catalog digests and skills integrity refreshed. 中文:实现 PowerX P0 的四项功能(仅限 PowerX 页面,不改 URL 参数名): (1) 新增 IT(不含 PUE)功耗口径 `it-modeled`,取自同一系统功耗模型的 deploymentItWatts ÷ GPU 数,即功耗构成堆叠去掉数据中心开销的部分;统计范围 改为“仅 GPU | IT(不含 PUE)| 数据中心”,标题行下方新增读数行(每 GPU IT 功耗、每 MW 可支持 GPU 数、按 PUE 计的数据中心功耗),“功耗去向”默认只堆叠 IT,新增“计入数据中心开销”开关。(2) 功耗按 TDP 占比显示时填充 P90 到 100% 的余量,并新增按交互性(25/50/100/300 tok/s/user)插值的余量表与 CSV 导出;views API 新增 `headroom=true`。(3) 新增负载波动统计(峰值、最小 值、空闲底线、均值、P5/P95、最大 1 s/5 s 变化、上升/下降速率、波动率,可按 NVL72 机架 ×72 换算)、新的只读接口 `/api/v1/gpu-metrics-point/stats` (JSON 统计或 1 秒曲线 CSV)与下载按钮,图表下方固定注明“1 秒 DCGM 采样 · 单节点 · 仅推理 · 不包含亚秒级波动”。(4) 所有功耗数值带 GPU / IT / 数据中心 标签,“测量方法”中统一解释并补充“利用率”的三种含义,页面描述下新增可折叠 的“什么是 PowerX?”。未实现 P0-5 的“复制图表到 Slack”(仅为 mock 占位)。 附带单元测试、API 文档、路由摘要与 skills 文档更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): cut the method copy, match the /inference layout, fix overlay bugs Copy - "How we measure" keeps three sentences: each point is one benchmark configuration; GPU power is measured every second and averaged over the validated serving window, other components are modeled; AgentX estimates are not calibrated against measured system power (AgentX only). The separate summary sentence, the three-tag key, the utilization paragraph, the basis assumptions and the All-in-Measured note are gone from the PowerX disclosure (the non-PowerX caption keeps its own notes). - Each GPU / IT / Facility pill explains its tag in its `title` only: "GPU board power, measured by DCGM", "GPU + modeled server, no PUE", "IT x PUE". - "What is PowerX?" is dropped; the description reads "Measured GPU power and energy per token for every benchmark point, with a modeled IT and facility breakdown." Layout (same chrome as /inference) - PowerX renders through the shared ChartDisplay frame: section header Card, the four views as a tab strip under the description, the Benchmark Config fieldset (Model / Scenario / Precision selectors), Chart Config (X-Axis Metric beside Count, Per or Show as, and the collapsed More views row) in place of the Y-axis pick, Compare history, the run date / run / changelog row; the Chart/Table toggle and export menu sit above the chart card, right-aligned; the chart card keeps the h2 caption, Updated / Source line, the readout as outline badges (the TCO badge row style), the plain Quick Filters legend and the footer notes, which now end with the provenance line + How we measure. - PowerXFrame, PowerXCaptionRow, PowerXWhatIs and the legend-rail controls are removed; headroom and load-swing tables use the validated-window summary table style; the Where view keeps its caption at the top of the card. Overlay bugs - % of TDP headroom: the y-axis reaches 100 % so the band ends at the TDP line instead of the plot edge; the SVG key text that sat over the top points is now a sentence in the table note. - Unofficial-run overlays get their own headroom band in the run color (`overlayRunColor`, filtered by `activeOverlayHwTypes`) and their own rows in the headroom table (run-colored dot, run tag, `source` CSV column); they were silently merged into the official chip before. - Chart tooltips clamp below the sticky site header instead of under it. - "More views" no longer wraps its label on phones. Tests: PowerXLayout, headroom (overlay rows), ScatterGraph PowerX overlay bands (new file), scatter-points tooltip clamp; the powerx-compare e2e asserts the new method sentence; docs updated. 中文:精简 PowerX 的测量说明文案(仅保留三句,标签含义移入 pill 的 title,删除“什么是 PowerX?”),让 PowerX 页面沿用 /inference 的布局与 组件(区块头、Benchmark Config / Chart Config / Compare history 字段集、 图表上方的 Chart/Table 与导出工具栏、相同的图表卡片与图例),并修复 重叠问题:TDP 余量阴影延伸到 100% 线且图内文字移到表格说明;非官方运行 overlay 拥有自己的余量阴影与表格行(按运行配色);图表提示框不再被 置顶站点页眉遮挡;手机端“更多视图”标签不再换行。补充/更新单元测试、 e2e 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): keep the across-load stacks open on Where, compare boundaries on Power draw Where the power goes - The compared chip's drill-down (the "across load" stacked bars / stacked area panel) is open inline under its bar from the first render, not only after a click. The compared chip is the one whose point sits nearest the slider interactivity; moving the slider to another chip moves the panel with it. Clicking a bar or picking a chip in the panel's Hardware select pins it to that chip until the slider moves on; Collapse (or clicking the open bar) hides it for the rest of the session, and clicking a bar opens it again. Session state only, no URL parameter. - The compact panel keeps the "<chip> across load" title with its one-line subtitle, the Hardware select (now shown in compact mode too), the Stacked bars | Stacked area toggle (`i_pbview`), the TDP and All in Provisioned reference lines and the PNG / CSV buttons; the stack legend above the bars stays the only legend. A chip picked in the Hardware select that has no bar near the slider renders its panel after the list. - The collapsed "Compare on the curve" section (`PowerXCurveSection`) is removed from the Where view; the view's own compare mode is the new `i_pcompare=breakdown`, which overlays no series on the chart. Power draw - Count gains "All", as Energy per token already had: it sets `i_pcompare=boundaries` and draws GPU only (solid), IT no PUE (dashed) and Facility (dash-dot) per chip on the one scatter, with the existing Boundary legend section; X-Axis Metric and Show as apply as on any Power draw chart (% of TDP stays GPU-only). `powerXViewFor` keeps a boundary overlay on the metric's own view instead of sending it to Where. - The "Compare boundaries: All five" control under More views stays as the rated-lines variant, relabelled "Rated boundaries: Off | TDP + provisioned" (`selectPowerXRated`): on sets `all`, off returns to the measured three. It is offered only where the rated series exist, J per output token (`powerXRatedAvailable`); W per chip has no rated series, so All already draws every boundary there. Unofficial-run overlays are untouched (the chip comparison keeps its run-colored sources; the Power draw overlay path expands the same boundaries). Tests: new PowerAnalysisPanels jsdom test (default-expanded compared chip, slider follow, collapse persists, pin, Hardware select and Stacked bars | Stacked area in compact mode), powerx-views (breakdown mode, Count: All on Power draw, rated toggle), PowerXLayout (Count labels and states). Docs and the inferencex-api skill reference updated. 中文:“功耗去向”视图默认即在所对比芯片(最接近滑块交互性的芯片)的横条下方内联 展开“随负载变化”的堆叠柱状图 / 堆叠面积图面板,并随滑块切换芯片;点击横条或在 面板的硬件选择器中选择芯片会固定到该芯片,“收起”后在本次会话中保持收起,再次 点击横条可重新展开(仅会话状态,不写入 URL)。紧凑面板保留标题与一行副标题、 硬件选择器、“堆叠柱状图 | 堆叠面积图”切换(`i_pbview`)、TDP 与整体预配参考线 以及 PNG / CSV 按钮;横条上方的图例是唯一图例。移除“在曲线上对比”折叠区块,该 视图改用 `i_pcompare=breakdown`。“功耗”视图的“统计范围”新增“全部”(与“每 Token 能耗”一致):设置 `i_pcompare=boundaries`,在同一散点图上按芯片绘制仅 GPU (实线)、IT(虚线)与数据中心(点划线),沿用现有“功耗边界”图例;横轴指标与 显示方式控件照常生效。“更多视图”中的对比功耗边界控件改为“额定边界:关闭 | TDP + 整体预配”,仅在存在额定序列(每输出 token 能耗)时可用。非官方运行 overlay 行为不变。补充 PowerAnalysisPanels 单元测试并更新 powerx-views、PowerXLayout 测试、文档与 inferencex-api skill 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): drop the provenance strip and More views, lay Chart Config out like /inference - Footer: remove the "N measured points · validated windows · power model rev · PUE" line (`powerXProvenanceText`, `PowerXProvenance`); the collapsed "How we measure" details stays as a plain muted link (`PowerXMethod`) with the same method sentences. - Chart Config: remove the "More views" expander (`PowerXMoreViews`) and the "Open power over time" shortcut. Scope, Power statistic and Rated boundaries are plain labelled controls beside X-Axis Metric, Count and Per / Show as, each shown only on the views where it applies; Split by stays in the Where the power goes card. - Update unit tests, Cypress specs, docs/powerx-permanent-view.md, the skills dashboard-views reference and integrity.json. 中文:移除 PowerX 页脚的来源信息行(实测数据点数、验证窗口、功耗模型版本、PUE), 仅保留折叠的“测量方法”链接;移除图表配置中的“更多视图”折叠区和“打开功耗随时间变化” 按钮,统计范围、功耗统计量与额定边界改为与 /inference 相同布局的普通控件,仅在适用 的视图上显示;拆分方式仍位于“功耗去向”卡片。同步更新单元测试、Cypress 用例、文档与 skills 参考。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * fix(powerx): lay the Chart Config out in the /inference grid, pair rated with GPU only The PowerX Count, Per or Show as, Scope, Power statistic and Rated boundaries controls sat in one flex-wrap box inside the second Chart Config column, so X-Axis Metric stood alone on the left while the rest stacked tall on the right. They now render as `contents`, so each one is a cell of the same grid /inference uses: the X-Axis Metric column stays 11rem (18rem on agentic traces) and the rest of the row splits in two. Row one is X-Axis Metric and Count (two cells, equal segments); row two is Per or Show as, then Scope and Power statistic or Rated boundaries, flowing left to right with no empty cells. Every control fills its cell, toggles wrap instead of overflowing, and each label carries the same (i) help as X-Axis Metric. Below sm every control is a row inside the "More chart controls" fold, whose changed count now includes the PowerX controls (`powerXChangedCount`). The Chinese Count label becomes 统计口径 so it no longer shares a name with Scope (统计范围). Rated boundaries is now Off | All-in provisioned and draws exactly two lines per chip: measured GPU power (solid) and the all-in provisioned bound (dashed), with no IT, Facility or GPU-level TDP line, so the chart stays readable. It has its own compare value, `i_pcompare=provisioned` (`PROVISIONED_COMPARE_BASES`), and the Boundary legend lists just those two; the five-line `all` stays reachable from share links only. Docs and the inferencex-skills reference follow. 中文:PowerX 的统计口径、计量单位/显示为、统计范围、功耗统计量与额定边界 控件原先挤在图表配置第二列的一个 flex-wrap 容器中,导致 X 轴指标独占左列、 其余控件在右列纵向堆叠。现改为 `contents` 渲染,使每个控件成为 /inference 同一网格的单元格:X 轴指标列保持 11rem(智能体场景 18rem),其余宽度平分为 两列。第一行为 X 轴指标与统计口径(占两格、等宽分段),第二行为计量单位或 显示为、统计范围、功耗统计量或额定边界,自左向右排布、无空格。各控件填满 单元格,分段切换换行而不溢出,标签带有与 X 轴指标相同的 (i) 说明。sm 以下 每个控件独占一行,位于“更多图表设置”折叠区内,其“已更改”计数现包含 PowerX 控件(`powerXChangedCount`)。中文“统计口径”取代原“统计范围”,避免与 Scope (统计范围)同名。 额定边界改为“关闭 | 整体预配”,每芯片仅绘制两条线:GPU 实测功耗(实线)与 整体预配功耗(虚线),不再绘制 IT、数据中心或 GPU 级 TDP 线,以降低认知负担。 它使用独立的对比值 `i_pcompare=provisioned`(`PROVISIONED_COMPARE_BASES`), 图例“功耗边界”仅列出这两项;五条线的 `all` 仅能通过分享链接访问。文档与 inferencex-skills 参考同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the How we measure footer note Remove the collapsed "How we measure" details (`PowerXMethod`) from the PowerX chart footer, its en/zh strings, its unit tests and the Cypress assertion on it. The shared /inference footer notes stay as they are; the GPU / IT / Facility tag meaning now lives only in each pill's `title`. Docs and the inferencex-skills dashboard-views reference no longer point at the note; the skills integrity manifest is regenerated. 中文:移除 PowerX 图表页脚中折叠的“测量方法”说明(`PowerXMethod`)及其中英文文案、 单元测试和 Cypress 断言。/inference 共用的页脚说明保持不变;GPU / IT / 数据中心 标签的含义仅保留在各标签自身的 `title` 提示框中。文档与 inferencex-skills 的 dashboard-views 参考不再指向该说明,并重新生成 skills integrity 清单。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): drop the chart hint and ISL/OSL footer lines PowerX no longer shows the "Shift+Scroll to zoom • Drag to pan • Double-click to reset • Click a point to pin tooltip" line (nor its touch variant) under its charts: ScatterGraph and PowerTimeline pass an empty `instructions` when `usePowerXSurface()` is true; the breakdown panels already did. The "Completed requests across all resident points" ISL/OSL footer is gated off on PowerX too, and ChartDisplay skips the resident-sequence-lengths query there. /inference, embeds and the `minimalChrome` path are unchanged. Tests: ScatterGraph.powerx-chrome.test.tsx covers the hint on /inference, PowerX and minimal chrome; powerx-compare.cy.ts adds an official-only agentic PowerX case asserting no hint, no ISL/OSL footer and no sketch request; powerx-timeline.cy.ts asserts no hint under the timeline. 中文:PowerX 页面不再在图表下方显示「按住 Shift 滚动以缩放 · 拖动以平移 · 双击以重置 · 点击数据点固定提示框」交互提示(含触屏版本),ScatterGraph 与 PowerTimeline 在 usePowerXSurface() 为真时传入空 instructions;同时隐藏 「当前所有数据点的已完成请求」ISL/OSL 页脚,并在 PowerX 上跳过 resident-sequence-lengths 查询。/inference、嵌入页与 minimalChrome 行为不变。 新增单元测试与 Cypress 用例覆盖上述三种 PowerX 视图。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): component-level power breakdown with per-layer colours, area default Where the power goes, per Oren's review of #1480: - The across-load drill-down opens on the stacked area view; `i_pbview=bars` still selects the stacked bars and the toggle stays. - "Server parts" is split into the pinned power model's real component classes. The breakdown now carries, in stack order, gpu (measured), measuredCpu (Grace socket telemetry, CPU + LPDDR), cpu, memory, nic (NIC cards + system-side optics), nvswitch (NVSwitch ASICs and the NVL72 switch tray incl. its embedded EPYC), storage, other (PCIe switches, retimers, shelf controllers), fans, psuLoss (AC/DC + DC/DC conversion loss), network and facility. `systemPowerLeafCategory` maps leaf names to parts and the test pins the full leaf table across every supported system; a renamed upstream component lands in `other` and fails it. AMD chassis have no nvswitch, B300 has no other, NVL72 rows with measured sockets have no cpu/memory. The parts still sum to All in Measured W/GPU (IT + facility). - One colour per part, shared by every chip, so a single SKU's layers are tellable apart: `--power-part-*` tokens next to the `--overlay-run-*` palette in globals.css with light, dark and minecraft values. Measured layers are solid, modeled layers keep the hatch over a lighter fill of their own colour, facility is the lightest hatch; the chip's vendor colour stays on its legend dot, the area's top edge and total dots. Legend swatches, tooltip rows and the chip-compare segments use the same swatches. - API: `powerBreakdowns[].categories` and `wattsPerGpu` carry the new keys; OpenAPI schema, route-catalog digest, skills reference (+ integrity) and the PowerX docs updated; CSV export has one column per part. 中文:PowerX「功耗去向」视图改为默认显示堆叠面积图(`i_pbview=bars` 仍可切回堆叠柱状图); 「服务器部件」按功耗模型的真实组件拆分为 CPU、内存、网卡、NVSwitch、存储、PCIe 及其他、 风扇、电源损耗、网络分摊与机房开销,各部分之和仍等于 All in Measured W/GPU,并以测试 固定了全部系统的叶子组件到分类的映射;每个分类使用站点统一的独立颜色(globals.css 中 的 `--power-part-*` token,含浅色/深色主题),实测层为实色、建模层保留斜线,芯片厂商色 仅用于图例圆点与总功耗轮廓;API 响应、OpenAPI、路由目录摘要、skills 参考与文档同步更新。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): single-hue breakdown with hover-to-identify and edge labels Where the power goes, after Wenyao's review of the per-part palette in #1480: - One hue per chip again. Every layer is a lightness step of the chip's own colour: `powerLayerOpacity(index, count)` runs linearly from 0.92 at the measured GPU base to 0.14 at the top over the parts that series actually has, so a 9-, 10- or 12-deep stack keeps evenly spaced, tellable steps, and a 1 px chip-colour stroke at 0.6 separates neighbours. The `--power-part-*` tokens, `powerCategoryColor`, the hatch patterns, `HATCH_ANGLE` and `cssHatchAngle` are gone; "Modeled" survives as a dashed swatch outline and the tooltip's basis column. - Interaction tells the bands apart. Hovering a band, its legend row or its edge label raises it to full opacity with a 1.5 px stroke and fades the rest to 0.25, with a small name + W/GPU label at the pointer (interpolated at the hovered x on the area, the column value on bars); clicking a legend row pins it (`aria-pressed`), a second click, Escape or a click on the plot unpins, a tap on a band pins on touch. The highlighted row is bold in the per-column tooltip. The state is shared between the chip comparison's legend, its bar segments and the open drill-down (`usePowerLayerHighlight`), so hovering "NICs" lights NICs on every chip. `powerx_breakdown_layer_highlighted`. - The area view labels every band at its right edge (name + W at the last point) in the right margin with a leader to the band centre; `placeEndLabels` pushes collisions apart at 12 px in stack order and the margin widens to the longest label. Below `sm` the labels are skipped so the plot keeps its width. - Legend rows are swatch + name in stack order; Measured/Modeled live in the swatch title. Comparison segments use the same ramp on each chip's colour. - Unofficial-run series get the same ramp from `overlayRunColor(runIndex)`: `buildPowerBreakdownsWithOverlays` keeps each run as its own `hwKey|precision|run<N>` series with the run tag, dashboard only (the API keeps `buildPowerBreakdowns`). - Kept from e727923: the twelve component categories, the API/skills contract, stacked area by default, the bars toggle, the per-column tooltip and CSV. - Tests: ramp monotone and distinct at 12 and 9 deep, band interpolation, end-label placement, overlay series; a jsdom harness that runs the panel's D3 layers covers legend hover/pin/Escape, plot hover, edge labels, margin, overlay colour and the chip-compare legend highlight. 中文:PowerX「功耗去向」堆叠图回到单一色相:每一层都是该芯片自身颜色的明度梯度 (`powerLayerOpacity` 按该系列实际存在的部件数从 0.92 线性降到 0.14,层间以 1 px 芯片色描边分隔),移除 `--power-part-*` 配色与斜线填充;「建模」改由图例色块的虚线边框和 提示框中的「建模」列表示。各层靠交互区分:悬停图层、图例项或右侧标签时该层提亮、其余层 淡化并显示名称与该 x 处的 W/GPU,点击图例固定高亮(`aria-pressed`),再次点击、Escape 或点击绘图区取消,触屏点按图层即固定;高亮状态在芯片对比图例、对比柱段与展开的下钻图之间 共享。堆叠面积图在右侧按堆叠顺序为每层标注名称与末点功耗,重叠时按 12 px 逐个推开并自动 加宽右边距,窄于 `sm` 时不显示。非官方 run 的系列以 `overlayRunColor` 使用同样的梯度。 保留 e727923 的十二个部件分类、API/skills 契约、默认堆叠面积图、柱状切换、提示框与 CSV 导出,并补充单元测试。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): three-band breakdown overview with a parts list Where the power goes, after Wenyao's review of the single-hue stack in #1480 ("this is not that clear"): stop drawing eleven parts in one stacked area and split the view into overview plus detail. - Overview: the drill-down's area and bars, and each chip-compare bar, collapse to three bands in stack order: Measured GPU (`gpu` + `measuredCpu`), Modeled server (`cpu`, `memory`, `nic`, `nvswitch`, `storage`, `other`, `fans`, `psuLoss`, `network`) and Facility overhead (`facility`, only when the facility is counted). `powerBandOpacity` gives each band a fixed step of the chip colour (0.92 / 0.53 / 0.14, the generic `powerLayerOpacity` called with 3), so the modeled band reads the same with or without the facility. The 1 px edges, the heavier top edge, the three right-edge labels with their watts at the last point, the hover/pin highlight and the per-column tooltip stay; the tooltip keeps every part under its band's bold subtotal. The legend shows the three bands; measured vs modeled stays as the dashed swatch outline and the tooltip word. A chip-compare modeled segment's `title` lists its parts and watts. - Detail: `PowerPartsList` sits right of the plot from `lg` (the plot keeps two thirds) and under it below. Its header is the compared point (`B200 (vLLM) FP4 · c16 · 88 tok/s/user`); one row per non-empty part of that chip, heaviest first, the facility row last under a rule: short name, a bar on a faint track in the band's step (dashed left edge when modeled), the watts, the share of IT (the facility row: of the facility total) and a 72×18 sparkline of that part across the chip's points on its own 0..max scale with the compared point dotted. The row `title` reads Measured, Modeled · fixed or Modeled · moves with load (`POWER_PART_BEHAVIOUR`, cross-checked against the model in tests). The list follows the slider and the Hardware select exactly as the plot's dashed outline does; off the comparison's range it reads the nearest point (`nearestBreakdownPoint`). - Shared highlight: `PowerLayerHighlight` is now `{ band, category, pinned }` and `usePowerLayerHighlight` takes a target, `bandTarget(band)` from the plot, legends and chip bars or `partTarget(category)` from a list row, so a hovered row raises its band everywhere and the row lights (`powerPart Emphasis`: highlighted, a sibling of a plot-hovered band, or plain). Click pins, Escape unpins. `powerx_breakdown_part_hovered` / `_pinned` on the rows; `powerx_breakdown_layer_highlighted` keeps the band events. - Overlay runs get the same bands, list and sparklines in `overlayRunColor(runIndex)`. - Removed with the collapse: the twelve-step ramp, `stackPowerBreakdown`, per-part legend rows and end labels, `data-category` on the drawn layers (now `data-band`). `SYSTEM_POWER_CATEGORIES` and the API are untouched. - Tests: bands, stacking, part rows (sort, shares, history), sparkline geometry, behaviour table vs the model, nearest point; the jsdom harness covers the three bands, legend, tooltip structure, edge labels, plot hover, list hover/pin/Escape, overlay colour and the chip-compare link; `PowerPartsList.test.tsx` covers the list alone in en and zh. Cypress component assertions updated for bands and the list. - Docs: `docs/powerx-permanent-view.md` and the skills dashboard-views reference (integrity regenerated). 中文:PowerX「功耗去向」下钻图不再把十一个部件画在同一张堆叠面积图里,而是拆成 「总览 + 明细」:面积图、柱状图和芯片对比横条都合并为三段(实测 GPU、建模服务器、 机房开销,仅在计入机房开销时显示),每段为芯片颜色的固定明度梯度,保留 1 px 分隔线、 右侧三条带末点功耗的标签、悬停/固定高亮和逐列提示框(提示框在各段加粗小计下仍列出 全部部件);明细由图旁新增的部件列表承担(`lg` 以上在图右侧,以下在图下方):表头为 对比点,每行一个非空部件,按功耗降序、机房开销置于末行,含名称、按功耗比例的小条、 瓦数、占 IT 比例和该部件随负载变化的迷你面积图(各自 0..最大值刻度,对比点打点), 行 `title` 标注实测 / 建模·固定 / 建模·随负载变化;悬停某行会在图中提亮其所属分段, 点击固定、Escape 取消;列表随滑块和硬件选择同步。非官方 run 以 `overlayRunColor` 使用相同的三段与列表。移除十二级梯度和逐部件图例;`SYSTEM_POWER_CATEGORIES` 与 API 不变。补充单元测试、Cypress 断言与文档。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): restore the six-layer hatched breakdown, keep the parts list The breakdown plot, the comparison bars and the legends go back to the treatment the panel had before the component-level and single-hue passes: six layers in stack order (Measured GPU, Measured Grace CPU, Server parts, Fans + PSU loss, Network share, Facility overhead), each a fixed opacity step of the chip colour (0.9 / 0.72 / 0.5 / 0.34 / 0.2, hatch tint 0.18) like the Profit Estimator's stacked bars, every modeled layer hatched at its own stripe angle (45 / 45 / 45 / 135 / 0 / 90 deg) like its loss segment, measured layers solid. The twelve API parts stay; the layers are a mapping over them (`POWER_BANDS` / `POWER_BAND_CATEGORIES`: server = cpu + memory + nic + nvswitch + storage + other, fansPsu = fans + psuLoss), so the API, CSV and skills contract from the component-level pass are untouched. Kept from the later passes: stacked area by default (`i_pbview`), the bars toggle, the per-column tooltip with bold layer subtotals (a layer that folds several parts lists them beneath), the parts list beside the plot with hover/pin through `usePowerLayerHighlight` (a hovered layer keeps its step and hatch, its edge thickens, the others fade to 0.25), overlay runs in `overlayRunColor`, and the download button. Dropped: the right-edge layer labels and the three-band opacity ramp. Tests cover the mapping, the opacity and hatch tables, the pattern defs, the legend order and swatches, the tooltip rows, the highlight states, the chip-compare segments and the overlay path; the Cypress component spec checks the five legend rows, the patterns and the absence of edge labels. Docs and the skills reference describe the six hatched layers; the route catalog digest for `utils/power-breakdown.ts` is refreshed (presentation only, no API change). 中文:恢复 PowerX 功耗构成图原有的六层斜线填充样式,并保留图旁的部件列表。 六层按堆叠顺序为实测 GPU、实测 Grace CPU、服务器部件、风扇 + 电源损耗、网络分摊、 机房开销,每层为芯片颜色的固定透明度阶梯,建模层按各自角度画斜线,实测层为纯色。 API 的十二个部件不变,六层只是其映射;保留默认堆叠面积图、提示框分层小计、 部件列表的悬停/固定联动、非官方运行叠加与下载按钮;去掉右侧边缘标签与三段透明度渐变。 相应更新了单元测试、Cypress 组件测试、文档与 skills 参考,并刷新了路由目录摘要。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> * feat(powerx): per-chip compared point in the breakdown, stable chip rows Clicking a column of the open drill-down (stacked bars or stacked area) now pins that chip's compared point to that column instead of moving the global interactivity slider: only that chip's row, dashed outline and parts list change, the other chips keep their slider-derived point. Moving the slider drops every pin; the Hardware select and Collapse keep them; a small "×" marker on the pinned row ("Pinned to c<N> · click to follow the slider") unpins one chip. Pins are shared as `i_pbpoint` (`seriesKey:concurrency` pairs, overlay runs included) and read once on load. Chip rows keep a fixed order, HW_REGISTRY order with unofficial-run lines after, instead of reordering by watts whenever the slider moves. Presentation only: the views API already returns every breakdown point, so no API selector changes; the route-catalog digest of `utils/power-breakdown.ts`, the docs and the skills reference (en/zh, integrity regenerated) are updated. 中文:点击已展开下钻图中的某一列,现在会把该芯片的对比点固定在该列,而不再移动 全局交互性滑块:只有该芯片的行、虚线框和部件列表会变化,其他芯片仍按滑块取点。 移动滑块会清除所有固定点;硬件选择与收起会保留固定点;已固定行上的 “×” 标记 (“已固定在 c<N> · 点击后跟随滑块”)可单独取消该芯片的固定。固定点通过 `i_pbpoint`(`seriesKey:concurrency`,含非官方运行)分享,加载时读取一次。芯片行 顺序固定为 HW_REGISTRY 顺序(非官方运行排在其后),不再随滑块按功耗重排。仅为展示 逻辑:views API 已返回全部构成数据点,不新增 API 选择项;同步更新了 `utils/power-breakdown.ts` 的路由目录摘要、文档与 skills 参考(中英文,已重新生成 integrity)。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * refactor(powerx): pin glyph for the pinned chip row, invite the column click The pinned chip row now shows a small filled lucide `Pin` glyph before its `c<N> · <interactivity>` label (same title and unpin click) instead of a lone "×" that read as "remove this chip". The drill-down subtitle says "Click a point to compare it; the dashed outline marks the compared point." so the column click is discoverable; columns already show a pointer cursor and a hover band. 中文:已固定的芯片行改为在 `c<N> · <交互性>` 标签前显示一个实心 lucide `Pin` 图标(提示与取消固定的点击行为不变),不再使用容易被理解为“移除该芯片”的 “×”。下钻图副标题改为“点击任一数据点即可对比;虚线框标出上方对比所用的点。”, 便于发现点击操作;各列本已显示指针光标与悬停高亮。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * fix(powerx): keep the power-model link visible, land old power links on Power draw, align tests with the PowerX tab CI on this branch had four reds, none from the per-chip point itself: - The pinned scatter tooltip's "Power model" source link had moved inside the collapsed "Deployment & model details" block, so the attribution was hidden until the details opened; the link line now sits under the block again. - `/inference?i_power=…` links with no metric redirect to `/powerx` on the Power draw scatter (`i_metric=y_measuredAvgPower`), as they used to chart power; PowerX itself still opens on Energy per token. - The certified-power E2E spec opens the power scatter explicitly, and the profit-estimator E2E spec's dashboard tab order includes the PowerX tab. - The new chip-pin component test resets the module-level `i_pbpoint` URL state between retries and moves the range slider through the native value setter, which a React controlled input needs. 中文:本分支 CI 有四处失败,均与按芯片固定对比点本身无关:固定提示框中的 “Power model”来源链接此前被移进了折叠的“部署与模型详情”块内,展开前不可见,现在 重新放回该块下方;不带 metric 的 `/inference?i_power=…` 旧链接重定向到 `/powerx` 时落在“功耗”散点图(`i_metric=y_measuredAvgPower`),与其原先绘制功耗的行为一致, PowerX 本身仍默认打开“每 token 能耗”视图;certified-power E2E 用例显式打开功耗散点图, profit-estimator E2E 用例的标签页顺序加入 PowerX;新的芯片固定组件测试在重试之间重置 模块级 `i_pbpoint` URL 状态,并通过原生 value setter 拖动滑块(React 受控输入所需)。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): show the slider as a guide in the drill-down, mark pinned rows, teach the column click Three refinements to the per-chip compared point so one mental model holds: the slider is the global guide, the dashed outline is this chip's point. - A pinned chip row's `c<N> · <interactivity>` reads in the pin's accent and its title says "Compared at <x> tok/s/user · slider at <y> tok/s/user", so the row visibly sits off the slider; other rows are unchanged. - The open drill-down (bars and area) draws a faint dashed vertical guide at the slider's interactivity with a tiny value label; the label is suppressed while the guide sits on the compared column (not pinned), and clicking the guide, or the column under it, returns the chip to the slider. - The cursor label gains a second line: "Click to compare at c48" on another column, "Compared here" on the compared one. 中文:围绕按芯片固定对比点做三处打磨,统一心智模型——滑块是全局参考线,虚线框是该 芯片自己的对比点:已固定芯片行的 `c<N> · <交互性>` 以固定标记的强调色显示,提示为 “对比点 <x> tok/s/user · 滑块位于 <y> tok/s/user”,其他行不变;展开的下钻图(柱状与面积) 在滑块交互性处绘制一条浅色虚线参考线并带小字数值标签,参考线落在当前对比列上(未固定) 时不显示标签,点击参考线或其下方的列即可让该芯片回到跟随滑块;光标标签增加第二行: 其他列显示“点击以在 c48 处对比”,当前对比列显示“当前对比点”。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): larger, fewer controls on phones Under md, PowerX only; nothing changes from md up. - View tabs: a 2x2 grid of 48 px buttons, so Over time is on screen without a sideways scroll (the strip was 519 px wide in a 332 px viewport). - Count, Per and Show as: one native select per group (SegmentedToggle variant="select"); each option carries the segment's hover hint that touch never showed. Values, URL params and analytics are unchanged. - X-Axis Metric, Scope, Power statistic and Rated boundaries sit behind one 44 px "More" row, collapsed by default, reading "More · N changed" when any of them is off its default (powerXSecondaryChangedCount; ChartControls hands the X-Axis Metric cell to PowerXChartConfig through a render prop). - 44 px touch targets: Chart Config help icons, legend rows and buttons, chip-compare legend items and rows, and a 28 px slider thumb, through a data-powerx-surface block in globals.css plus PowerX-gated classes. - Dashboard toasts stay off on phone-width /powerx and /zh/powerx; the pinned point sheet and the drill-down subtitle say Tap on touch-primary devices. - Tick labels get a 12 px floor on PowerX charts under md. Presentation only: no data, filter semantics, units or defaults change, so the API, OpenAPI document and inferencex-skills package are untouched. 中文:PowerX 手机端控件更大、更少(仅 md 以下生效,md 及以上不变)。 视图标签改为 2×2 的 48 px 按钮网格,“随时间变化”无需横向滚动即可看到; 统计口径、计量单位、显示为改为原生下拉框,选项附带原先只在悬停时可见的提示; X 轴指标、统计范围、功耗统计量、额定边界收进一行 44 px 的“更多”折叠行, 默认收起,有非默认项时显示“更多 · 已更改 N 项”;帮助图标、图例行、芯片对比 行与滑块拇指扩大到 44 px 触控区;手机宽度的 PowerX 不再弹出仪表板提示, 触屏设备上的固定数据点面板与下钻副标题改用“点按”;刻度标签最小 12 px。 纯展示改动,不涉及数据、筛选语义、单位或默认值,API、OpenAPI 与 skills 包未改。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * fix(powerx): let the X-Axis Metric cell fill the phone "More" fold XAxisModeSelector caps its cell at max-w-44 / max-w-72, so inside the one-column fold under md it ended about 20 px short of the Count and Per selects. The selector takes an optional className and PowerX's ChartControls branch passes max-md:max-w-none; from md up and on /inference nothing changes. 中文:修复 PowerX 手机端“更多”折叠行内的 X 轴指标单元格宽度:XAxisModeSelector 自带 max-w-44 / max-w-72 上限,在 md 以下的单列折叠中比统计口径和计量单位的下拉框 窄约 20 px。现为该组件增加可选 className,PowerX 分支传入 max-md:max-w-none, md 及以上与 /inference 页面保持不变。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): scrub the drill-down on touch, with a readout above the plot PowerX on a coarse pointer (useIsCoarsePointer, the gate the drill-down already uses for its Tap copy and tap-to-pin layer); a mouse keeps the hover label, the tooltip and the click. - Scrub: a finger anywhere across the drill-down plot (bars and area) moves a solid rule to the nearest column (nearestColumnIndex, by column centre) and a readout above the plot (PowerBreakdownReadout) shows that column's total W/GPU with its basis pill, `c<N> · <interactivity>`, and one chip per layer in stack order with the plot's swatch and hatch language; tapping a chip isolates the layer like the legend. The readout sits in normal flow, so it never clips at the plot's edge. The hover cursor label and the tooltip (and so the point sheet) are not attached on touch. The svg keeps touch-action: pan-y so a vertical pan still scrolls the page; it is none only while a scrub is in progress. A gesture that becomes a scroll (pointercancel) restores what the readout showed before it. - Tap = hold: a tap pins that chip's compared point through the same onPinComparedPoint path as a desktop click (dashed outline, i_pbpoint); the readout then says Pinned until the next scrub or the row's pin marker. The compared-point and layer actions now run in one click listener: with two, a layer pin's state flush re-registered the second listener mid-dispatch and the browser skipped it, so a real tap lost its compared-point pin. - Compare button: a 44 px full-width "Compare chips at N tok/s/user" under the plot moves the slider to the readout's interactivity (the slider's own action, so every pin drops) and tracks powerx_compare_at_scrub; disabled while the slider already reads that value. Desktop does not get it. - The touch subtitle teaches the drag and the tap; zh copy for all of it. - Layer style helpers move to power-layer-style.ts (re-exported unchanged) so the readout can share them without a module cycle. - Unofficial-run series scrub and read in their run colour. Presentation only: no data, filter semantics, units or defaults change, and moving the slider is the existing action, so the API, OpenAPI document and inferencex-skills package are untouched. 中文:PowerX 触屏(粗指针,与下钻图现有“点按”文案和点按固定分层所用的判断一致) 下,下钻图改为拖动读取:手指在图上任意位置拖动,实线参考线移到最近的一列, 图表上方的读数区显示该列的每 GPU 总功耗(含口径标签)、`c<N> · <交互性>`, 以及按堆叠顺序排列的各分层色块与数值(与图中的色阶和斜线一致,点按色块可 单独突出该分层);读数区位于正常文档流中,不会在图表边缘被裁切。触屏下不再 显示悬停光标标签和提示框,svg 保持 touch-action: pan-y,纵向滑动仍可滚动页面, 仅在拖动进行中设为 none;手势变为滚动时恢复拖动前的读数。点按即固定:点按某列 通过与桌面端点击相同的 onPinComparedPoint 路径固定该芯片的对比点(虚线框、 i_pbpoint),读数区显示“已固定”;对比点与分层两个动作合并到同一个 click 监听器 中,原来分成两个时,分层固定引起的同步刷新会在事件派发过程中重新注册第二个 监听器,浏览器会跳过它,导致真实点按丢失对比点固定。图下方新增 44 px 全宽按钮 “在 N tok/s/user 处对比各芯片”,将滑块移到读数所在交互性(即滑块自身的动作, 会清除所有固定点)并上报 powerx_compare_at_scrub,滑块已在该值时禁用;桌面端 无此按钮。触屏副标题改为说明拖动与点按;全部提供中文文案。分层样式辅助函数 移至 power-layer-style.ts(原样重新导出)以避免模块循环引用。非官方运行序列 同样支持拖动读取并使用其运行颜色。纯展示改动,不涉及数据、筛选语义、单位或 默认值,移动滑块为既有动作,API、OpenAPI 与 inferencex-skills 包未改。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): scrub the main chart on touch into the readout above it PowerX on a coarse pointer (useIsCoarsePointer, the gate ScatterGraph already uses for its Tap copy); a mouse keeps the hover tooltip and readout as they were. - A finger dragged across the scatter snaps to the plotted point nearest it, official or ?unofficialrun= overlay under the current zoom (nearestScrubCandidate; a `powerx-scrub` custom layer draws a rule and a ring in the chip or run colour, dropped on zoom), and reports it to the PowerX readout as source 'scrub'. The svg keeps touch-action: pan-y so a vertical pan still scrolls the page; it is none only while a scrub is in progress. One-finger touches never reach d3-zoom, as before. - The readout (PowerXReadout) leads with the chart's own y value on a coarse pointer (`yMetric`: the metric label and the tooltip's number format from ChartDisplay), says "Point under your finger · tap it for details", and the no-interaction hint says drag instead of hover. A scrub replaces a pinned point (the sheet is closed by then) and survives the compat hover end a tap synthesises; a hover still never replaces a pin. - A tap on a point still opens the provenance sheet through the point's own click, as today. - Overlay points respect activeOverlayHwTypes and the optimal-only toggle exactly as the chart draws them. Presentation only: no data, filter semantics, units or defaults change, so the API, OpenAPI document and inferencex-skills package are untouched. 中文:PowerX 触屏(粗指针,与 ScatterGraph 现有“点按”文案所用的判断一致)下, 主散点图改为拖动读取:手指在图上拖动时吸附到距离最近的数据点(含当前缩放下的 官方点与 ?unofficialrun= 叠加点,nearestScrubCandidate;新增 powerx-scrub 自定义 图层,用芯片或运行颜色绘制参考线与圆环,缩放时清除),并以 source 'scrub' 上报 给 PowerX 读数行。svg 保持 touch-action: pan-y,纵向滑动仍可滚动页面,仅在拖动 进行中设为 none;单指触摸一如既往不会触发 d3-zoom。读数行(PowerXReadout)在 粗指针下首先显示图表自身的 y 值(yMetric:来自 ChartDisplay 的指标名称与提示框 的数字格式),提示“手指所在的数据点 · 点按可查看详情”,无交互时的提示改为拖动 而非悬停;拖动会替换已固定的点(此时面板已关闭),并在点按合成的 hover 结束 事件后保持,悬停仍不会替换固定点。点按数据点仍通过该点自身的 click 打开来源 面板,与现在一致。叠加点遵循 activeOverlayHwTypes 与“仅最优”开关,与图表绘制 完全一致。纯展示改动,不涉及数据、筛选语义、单位或默认值,API、OpenAPI 与 inferencex-skills 包未改。鼠标端悬停提示框与读数行保持不变。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * fix(powerx): a touch tap only holds the column, and the readout sits closer to the plot Two polishes on the drill-down's touch scrub (PowerX on a coarse pointer): - A column tap now only pins the chip's compared point. The layer under the finger is no longer toggled, so the chart does not dim to one hatched band the moment the user taps to hold; on touch a layer is isolated only from a readout chip (tap again to release). A mouse click is unchanged: it pins the compared point and toggles the layer as before. - The plot's top margin is 16 px instead of 40 under the readout (TOUCH_MARGIN), closing the empty band between the readout card and the plot frame from 48 px to 24 px at 390 wide. The margin kept room for the concurrency and total labels above the tallest column, which protrude at most ~10 px above the plot top; the guide label and the TDP / All in Provisioned labels sit inside the plot and stay unclipped. Mouse charts keep MARGIN. Tests: the touch unit spec asserts a column tap leaves every layer plain and a readout chip isolates and releases its layer, and checks the 16 px vs 40 px margins; the touch E2E spec asserts the same plus the readout-to-plot gap. 中文:PowerX 触屏拖动读取的两处打磨。点按某列现在只固定该芯片的对比点,不再 切换手指下方的分层,避免点按固定的瞬间整张图暗下来只剩一条斜线分层;触屏下 只有点按读数区的分层色块才会单独突出该分层(再点一次恢复)。鼠标点击保持不变: 仍同时固定对比点并切换分层。读数区下方的图表上边距由 40 px 改为 16 px (TOUCH_MARGIN),390 px 宽度下读数卡片与图框之间的空白由 48 px 缩至 24 px;该边距 原本为最高一列上方的并发数与总功耗标签预留,而它们最多只超出图框顶部约 10 px, 参考线标签与 TDP / All in Provisioned 标签位于图内不会被裁切;鼠标端图表仍使用 MARGIN。触屏单元测试断言点按列后各分层保持 plain、读数色块可单独突出并恢复, 并检查 16 px 与 40 px 边距;触屏 E2E 测试同样断言,并检查读数区到图框的间距。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * test(cypress): add the touch-scrub spec to the split timing baselines CI's "Typecheck and unit tests" failed on 629db8a in src/lib/testing/cypress-timings.test.ts ("contains one positive timing for every current integration spec" and "... every Firefox integration spec"): the new cypress/e2e/powerx-touch-scrub.cy.ts had no entry in timings.json and timings-firefox.json, which cypress-split seeds the CI shards from. Both baselines gain the spec with its locally measured Cypress execution time (7 s for its two cases in electron), the same placeholder shape the powerx-compare and powerx-timeline specs carry; cypress-balance.json is the report CI regenerates from observations and is left alone. 中文:修复 629db8a 上 CI “Typecheck and unit tests” 的失败: src/lib/testing/cypress-timings.test.ts 要求每个集成测试文件在 timings.json 与 timings-firefox.json(cypress-split 据此分配 CI 分片)中都有一条正的耗时记录,而新增的 cypress/e2e/powerx-touch-scrub.cy.ts 缺少该记录。两份基线均补入该文件及其本地实测 的 Cypress 执行时间(electron 下两个用例共约 7 秒),格式与 powerx-compare、 powerx-timeline 的占位记录一致;cypress-balance.json 由 CI 根据观测数据重新生成, 不作修改。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd * feat(powerx): fold the Where view's parts list and compact its chip rows on phones PowerX Where the power goes under the `md` breakpoint (`useIsMobileViewport()`, PowerX surface only; nothing changes from `md` up): - Parts list (`PowerPartsList`): the three largest IT parts stay in view and an "All N parts · across load" row (44 px, `aria-expanded` / `aria-controls`, `powerx_parts_expanded`) opens the rest in place; the facility row always folds. Rows are 56 px two-line cards (name, watts and share above the 8 px bar and the 72x18 sparkline, which still fits at 390 px). Open, the list keeps its order and a tap pins a row where it is; when it folds, a pinned part in the remainder stays among the visible rows (`foldPowerPartRows`). Hover and pin behaviour and the CSV export (every part) are unchanged. - Chip rows (`PowerChipCompare`): 56 px cards with the name and total W plus the basis pill on the first line, `c<N> · <interactivity>` with the pin marker and "GPU NN%" on the second, and one 8 px stacked bar that keeps the layer steps, hatches and titles but carries no in-bar watt labels (`data-layout="compact"`). Registry order, the pin marker and the expand affordance are as before. - Drill-down plot (`PowerBreakdownPanel`): 260 px high instead of 380 under the touch readout (`PHONE_PLOT_HEIGHT`), every label inside the svg. - Overlay runs render the same way (`overlayRunColor`, rows after the official chips, per-run dismissal through the overlay rows passed in). Presentation only: no data, filter, unit or URL semantics change, so the views API, OpenAPI document and skills package need no update. Tests: PowerPartsList (fold, expand/collapse, pinned part survives the fold, md and non-PowerX keep the full list, overlay colours, zh label), PowerAnalysisPanels (compact cards, pin marker, folded parts, overlay run), a Cypress e2e at 390x844 (`powerx-parts-accordion.cy.ts`, added to both timing baselines) and the docs paragraph in docs/powerx-permanent-view.md. Page height at 390x844 with one chip expanded (prod snapshot): 5,010 px (5.9 screens) before, 4,678 px (5.5) after w…
edwingao28
added a commit
that referenced
this pull request
Oct 27, 2026
* [Feature] add a per-point system power breakdown under the PowerX chart / PowerX 图表下新增逐点系统功耗构成
* [Feature] place the power breakdown on the interactivity x-axis / 功耗构成改用交互性作为 x 轴
* [Feature] add a PowerX dashboard tab / 新增 PowerX 仪表板标签页 (#1476)
* [Feature] add a PowerX dashboard tab / 新增 PowerX 仪表板标签页
* [Chore] remove the PowerX terms glossary / 移除 PowerX 术语说明
* [Feature] link PowerX chart hover to chip compare and space across-load bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列 (#1477)
* [Feature] link PowerX chart hover to chip compare and space across-load bars evenly / PowerX 图表悬停联动芯片对比,随负载柱等距排列
* [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图 (#1478)
* [Feature] move power metrics to the PowerX tab and drop the power fit view / 功耗指标迁至 PowerX 标签页并移除功耗拟合视图
* [PowerX] declutter the PowerX tab: chart above the fold, single control layer, shorter copy / 精简 PowerX 页面:图表置顶、单层控件、精简文案 (#1480)
* feat(powerx): declutter the PowerX tab: chart above the fold, one control layer, shorter copy
The PowerX tab opened on 39 controls and no data: four question tiles, a
question line and a how-to-read line, an "Advanced settings" drawer that
re-expressed Count / Show as / Split by as Boundary / Display / Compare,
and three full-width control fieldsets pushed the chart card to y=925 at
1440x900. The same boundary was also named three ways on one screen.
- Render the four questions as one compact segmented tab row (still a
role=tablist with the same test ids and analytics); the hint moves to
the button title. Drop the per-tab question and how-to-read lines.
- Remove the Advanced settings drawer. Scope and Power statistic, the
only controls it added, render under the tab toggles on the Power draw
tab (Scope alone on per-token Energy) through a new `fields` prop on
MeasuredMetricControls. URL params and API behaviour are unchanged.
- On PowerX, put Benchmark Config, Chart Config and Compare history on
one row and drop the Scenario / Precision select when it has a single
locked option; fix the mobile "changed" count that counted the hidden
Y-axis metric.
- Copy: header description keeps its first sentence; chip-compare and
drill-down subtitles cut to one short line; the power model revision
footnote moves into the breakdown chart tooltip.
- One vocabulary: `POWER_COUNT_LABELS` in lib/power/power-basis.ts feeds
the Count toggle, and on the PowerX surface the legend Boundary rows,
line-end labels, tooltip series line and table Series column say
"GPU only / Whole system" instead of the registry names. CSV columns,
API values and URL params keep the registry names.
- Chart card top at 1440x900: 925 -> 780 (390x844: 1324 -> 1196).
中文:精简 PowerX 页面:四个问题改为一行紧凑的分段标签(保留 tablist 语义、
测试 id 与埋点,提示文字移入 title),删除每个标签页下的问题行与阅读说明行;
移除“高级设置”抽屉,仅把统计范围与功耗统计量放回标签切换下方(URL 参数与 API
行为不变);PowerX 上基准测试配置、图表配置与历史对比并排一行,只有一个选项
的场景/精度选择器不再显示;页头描述只保留第一句,芯片对比与下钻副标题缩短,
功耗模型版本脚注移入图表提示框;统一术语,PowerX 图例、曲线标签、提示框与表格
均使用“仅 GPU / 整体系统”。1440x900 下图表卡片顶部由 925px 提前到 780px。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): v2 layout: chart first, four views as tabs, options in the legend rail
Experimental re-sequencing of the PowerX tab, between the current control
stack and the chart-only mock: every feature stays reachable, nothing is
deleted, and no URL param or API value changes.
- New `components/inference/powerx/`: `PowerXFrame` (section header, the
four views as compact tabs with one tooltip hint each, Chart/Table and
export on the right of the strip, one caption row with the model
dropdown, scenario and precision toggles only when there is a choice,
and the compact run chip with the changelog), `PowerXLegendControls`
(Count, Per, Show as in the legend rail), `PowerXMoreViews` (collapsed
expander with Scope, Power statistic, Compare boundaries, Split by and
an Open power over time shortcut), `PowerXCurveSection`,
`PowerXProvenance`, and the pure `powerx-views.ts` view/metric mapping
that replaces `PowerXTabs.tsx`.
- `ChartDisplay` renders through the frame on the PowerX surface only
(embeds and minimal chrome keep the shared layout); it opens on energy
per output token. `ChartControls`, the question tabs and the inline
toggle rows no longer render there; model, scenario, precision, x-axis,
chip config and date range still flow through InferenceContext and the
URL, so share links, `?unofficialrun=` overlays, /zh and the views API
are unchanged.
- Where the power goes: the chip comparison is the visual; clicking a bar
opens that chip's drill-down inline under it (`PowerAnalysisPanels`
`layout="inline"`, compact `PowerBreakdownPanel` with a Collapse button,
one shared stack legend); the boundary line chart sits in a collapsed
"Compare on the curve" section. An empty selection now says so instead
of leaving a gap.
- Provenance strip under the chart (measured points, validated windows,
power model revision, PUE) is the summary of the collapsed "How we
measure" details; a pinned point's "View power trace" still opens the
Over time view focused on that trace.
- `ChartLegend` gains `controls`, `footer` and `mobileLabel` slots;
`ScatterGraph` passes them through plus `plotHeight`. On phones the rail
folds into a "Chips & options" row under the plot and the plot is capped
at 55 % of the viewport; touch-action pan-y stays via D3Chart.
- Tests: `powerx-views.test.ts` (view switching, Count/Per/Show as metric
mapping, provenance text) and `PowerXLayout.test.tsx` (tab order and
selection, legend controls per view, Split by reason, provenance strip,
caption row, frame order, zh strings). Cypress specs updated for the
More views expander and the energy default. Docs and the skills
reference describe the v2 layout.
中文:PowerX v2 布局(实验性):图表优先,四个视图改为紧凑标签页(每 Token
能耗、功耗、功耗去向、随时间变化),图表/表格切换与导出按钮位于标签栏右侧;
标题下只保留一行说明(模型下拉、有选择时才显示的场景与精度切换、紧凑的运行
日期与变更日志)。统计范围、计量单位、显示方式移入图例栏,统计范围、功耗统计
量、对比功耗边界、拆分方式与“打开功耗随时间变化”收在折叠的“更多视图”中。
“功耗去向”以芯片对比为主视图,点击横条内联展开该芯片的下钻图,功耗边界曲线
为折叠区块。图表下方新增一行数据来源说明,点击展开“测量方法”。手机端图例折叠
为“芯片与选项”一行,图表高度上限为视口 55%。URL 参数与 API 行为不变,所有
功能仍可到达;新增单元测试并更新 Cypress 用例与文档。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): P0: IT-only basis, TDP headroom, load-swing stats and basis labels
Implements the four PowerX P0 items from the data-center / power-team
feedback on the existing v2 layout, on the PowerX surface only. No URL
parameter is renamed; the new boundary rides on `i_metric` like the others.
P0-1 IT-only power basis
- `lib/power/power-basis.ts`: fifth basis `it-modeled` ("All in Measured
IT (no PUE)") = `modeledSystemPower.deploymentItWatts ÷ gpuCount`, the
breakdown stack minus its facility part, from the same estimate the
facility figure uses (no new formula); `utilityModeledWatts =
itModeledWatts × PUE` at every point. New fields `itModeledWatts` /
`itModeledJPerOutputToken`, metric keys `y_itModeledWatts` /
`y_itModeledJPerOutputToken`, measured-metric configs, All in Measured
table rules and CSV, chart power envelope, compare variants (boundaries =
GPU only, IT, Facility; `all` = five lines), tooltips, legend/line labels.
- Count toggle is GPU only | IT (no PUE) | Facility (| All on Energy);
`POWER_COUNT_LABELS` names the facility boundary "Facility" so the
legend, pills, table series column and CSV share one vocabulary.
- `PowerXReadout` under the caption: IT W/GPU, GPUs per MW (1e6 ÷ IT W),
Facility W/GPU at PUE and measured GPU W for the hovered or pinned point
(ScatterGraph feeds an active-point context), else the point nearest
80 tok/s/user.
- Where the power goes stacks IT only by default; `PowerXFacilitySwitch`
(context state, default off) appends the PUE part;
`breakdownSeriesAtBoundary` derives the IT series for the chip
comparison, the drill-down and their tooltips; "Storage and out-of-rack
network are not modeled." sits under the bars.
P0-2 Measured-vs-TDP headroom
- ScatterGraph `powerx-headroom` layer (PowerX + % of TDP only): shades
between each chip's P90 draw (dotted) and 100 % TDP in the chip color.
- `lib/power/headroom.ts` + `PowerXHeadroomTable`: avg W, P90 W, % TDP
(P90) and headroom = 1 − P90/TDP at 25 / 50 / 100 / 300 tok/s/user via
`interpolateMetricAtInteractivity` (no extrapolation → "—"), one example
callout computed from the data, CSV download.
- Views API: `GET /api/v1/views/inference?headroom=true` returns the same
rows (`headroom.rows`), documented in OpenAPI, options defaults and the
skills reference.
P0-3 Load-swing statistics and export
- `lib/power/load-swing-stats.ts` (pure, unit-tested on a synthetic
trace): peak, min, idle floor (P5 before the window), window mean, P5 /
P95, max Δ1s / Δ5s, ramp up / down per second, volatility (std ÷ mean),
NVL72 rack scaling (× 72, upper bound); telemetry gaps are counted and
never bridged.
- New published route `GET /api/v1/gpu-metrics-point/stats?id=N
[&format=json|csv][&scale=gpu|nvl72]` serves the stats (or the 1 s
trace as CSV) from the same stored buckets with the same function.
- `PowerLoadSwings` above the Over time chart on PowerX: per-trace stats
row with % TDP for the Δ columns, "× 72 per NVL72 rack" switch with the
correlation caveat, per-point CSV / JSON downloads from the route; fixed
caveat line "1 s DCGM samples · single node · inference only ·
sub-second swings not captured" under the chart.
P0-4 Labels
- `PowerBasisPill` (GPU / IT / Facility) on readouts, table headers,
breakdown totals and the tooltip power-model block, explained once in
How we measure, which also gains the three-meanings-of-utilization note.
- Collapsed "What is PowerX?" line under the page description (en + zh).
Not built: P0-5 "Copy chart for Slack" (mock-only placeholder).
Tests: power-basis (IT identity), headroom, load-swing stats, stats route,
inference view headroom panel, power-breakdown IT boundary, powerx-views,
PowerXLayout (Count labels, readout, What is, basis key, facility switch),
power-compare / measured-metric-config expectations, Cypress component
spec labels; API route catalog digests and skills integrity refreshed.
中文:实现 PowerX P0 的四项功能(仅限 PowerX 页面,不改 URL 参数名):
(1) 新增 IT(不含 PUE)功耗口径 `it-modeled`,取自同一系统功耗模型的
deploymentItWatts ÷ GPU 数,即功耗构成堆叠去掉数据中心开销的部分;统计范围
改为“仅 GPU | IT(不含 PUE)| 数据中心”,标题行下方新增读数行(每 GPU IT
功耗、每 MW 可支持 GPU 数、按 PUE 计的数据中心功耗),“功耗去向”默认只堆叠
IT,新增“计入数据中心开销”开关。(2) 功耗按 TDP 占比显示时填充 P90 到
100% 的余量,并新增按交互性(25/50/100/300 tok/s/user)插值的余量表与
CSV 导出;views API 新增 `headroom=true`。(3) 新增负载波动统计(峰值、最小
值、空闲底线、均值、P5/P95、最大 1 s/5 s 变化、上升/下降速率、波动率,可按
NVL72 机架 ×72 换算)、新的只读接口 `/api/v1/gpu-metrics-point/stats`
(JSON 统计或 1 秒曲线 CSV)与下载按钮,图表下方固定注明“1 秒 DCGM 采样 ·
单节点 · 仅推理 · 不包含亚秒级波动”。(4) 所有功耗数值带 GPU / IT / 数据中心
标签,“测量方法”中统一解释并补充“利用率”的三种含义,页面描述下新增可折叠
的“什么是 PowerX?”。未实现 P0-5 的“复制图表到 Slack”(仅为 mock 占位)。
附带单元测试、API 文档、路由摘要与 skills 文档更新。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): cut the method copy, match the /inference layout, fix overlay bugs
Copy
- "How we measure" keeps three sentences: each point is one benchmark
configuration; GPU power is measured every second and averaged over the
validated serving window, other components are modeled; AgentX estimates
are not calibrated against measured system power (AgentX only). The
separate summary sentence, the three-tag key, the utilization paragraph,
the basis assumptions and the All-in-Measured note are gone from the
PowerX disclosure (the non-PowerX caption keeps its own notes).
- Each GPU / IT / Facility pill explains its tag in its `title` only:
"GPU board power, measured by DCGM", "GPU + modeled server, no PUE",
"IT x PUE".
- "What is PowerX?" is dropped; the description reads "Measured GPU power
and energy per token for every benchmark point, with a modeled IT and
facility breakdown."
Layout (same chrome as /inference)
- PowerX renders through the shared ChartDisplay frame: section header
Card, the four views as a tab strip under the description, the
Benchmark Config fieldset (Model / Scenario / Precision selectors),
Chart Config (X-Axis Metric beside Count, Per or Show as, and the
collapsed More views row) in place of the Y-axis pick, Compare history,
the run date / run / changelog row; the Chart/Table toggle and export
menu sit above the chart card, right-aligned; the chart card keeps the
h2 caption, Updated / Source line, the readout as outline badges (the
TCO badge row style), the plain Quick Filters legend and the footer
notes, which now end with the provenance line + How we measure.
- PowerXFrame, PowerXCaptionRow, PowerXWhatIs and the legend-rail
controls are removed; headroom and load-swing tables use the
validated-window summary table style; the Where view keeps its caption
at the top of the card.
Overlay bugs
- % of TDP headroom: the y-axis reaches 100 % so the band ends at the
TDP line instead of the plot edge; the SVG key text that sat over the
top points is now a sentence in the table note.
- Unofficial-run overlays get their own headroom band in the run color
(`overlayRunColor`, filtered by `activeOverlayHwTypes`) and their own
rows in the headroom table (run-colored dot, run tag, `source` CSV
column); they were silently merged into the official chip before.
- Chart tooltips clamp below the sticky site header instead of under it.
- "More views" no longer wraps its label on phones.
Tests: PowerXLayout, headroom (overlay rows), ScatterGraph PowerX
overlay bands (new file), scatter-points tooltip clamp; the
powerx-compare e2e asserts the new method sentence; docs updated.
中文:精简 PowerX 的测量说明文案(仅保留三句,标签含义移入 pill 的
title,删除“什么是 PowerX?”),让 PowerX 页面沿用 /inference 的布局与
组件(区块头、Benchmark Config / Chart Config / Compare history 字段集、
图表上方的 Chart/Table 与导出工具栏、相同的图表卡片与图例),并修复
重叠问题:TDP 余量阴影延伸到 100% 线且图内文字移到表格说明;非官方运行
overlay 拥有自己的余量阴影与表格行(按运行配色);图表提示框不再被
置顶站点页眉遮挡;手机端“更多视图”标签不再换行。补充/更新单元测试、
e2e 断言与文档。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): keep the across-load stacks open on Where, compare boundaries on Power draw
Where the power goes
- The compared chip's drill-down (the "across load" stacked bars / stacked
area panel) is open inline under its bar from the first render, not only
after a click. The compared chip is the one whose point sits nearest the
slider interactivity; moving the slider to another chip moves the panel
with it. Clicking a bar or picking a chip in the panel's Hardware select
pins it to that chip until the slider moves on; Collapse (or clicking the
open bar) hides it for the rest of the session, and clicking a bar opens
it again. Session state only, no URL parameter.
- The compact panel keeps the "<chip> across load" title with its one-line
subtitle, the Hardware select (now shown in compact mode too), the
Stacked bars | Stacked area toggle (`i_pbview`), the TDP and All in
Provisioned reference lines and the PNG / CSV buttons; the stack legend
above the bars stays the only legend. A chip picked in the Hardware
select that has no bar near the slider renders its panel after the list.
- The collapsed "Compare on the curve" section (`PowerXCurveSection`) is
removed from the Where view; the view's own compare mode is the new
`i_pcompare=breakdown`, which overlays no series on the chart.
Power draw
- Count gains "All", as Energy per token already had: it sets
`i_pcompare=boundaries` and draws GPU only (solid), IT no PUE (dashed) and
Facility (dash-dot) per chip on the one scatter, with the existing
Boundary legend section; X-Axis Metric and Show as apply as on any Power
draw chart (% of TDP stays GPU-only). `powerXViewFor` keeps a boundary
overlay on the metric's own view instead of sending it to Where.
- The "Compare boundaries: All five" control under More views stays as the
rated-lines variant, relabelled "Rated boundaries: Off | TDP +
provisioned" (`selectPowerXRated`): on sets `all`, off returns to the
measured three. It is offered only where the rated series exist, J per
output token (`powerXRatedAvailable`); W per chip has no rated series, so
All already draws every boundary there.
Unofficial-run overlays are untouched (the chip comparison keeps its
run-colored sources; the Power draw overlay path expands the same
boundaries). Tests: new PowerAnalysisPanels jsdom test (default-expanded
compared chip, slider follow, collapse persists, pin, Hardware select and
Stacked bars | Stacked area in compact mode), powerx-views (breakdown mode,
Count: All on Power draw, rated toggle), PowerXLayout (Count labels and
states). Docs and the inferencex-api skill reference updated.
中文:“功耗去向”视图默认即在所对比芯片(最接近滑块交互性的芯片)的横条下方内联
展开“随负载变化”的堆叠柱状图 / 堆叠面积图面板,并随滑块切换芯片;点击横条或在
面板的硬件选择器中选择芯片会固定到该芯片,“收起”后在本次会话中保持收起,再次
点击横条可重新展开(仅会话状态,不写入 URL)。紧凑面板保留标题与一行副标题、
硬件选择器、“堆叠柱状图 | 堆叠面积图”切换(`i_pbview`)、TDP 与整体预配参考线
以及 PNG / CSV 按钮;横条上方的图例是唯一图例。移除“在曲线上对比”折叠区块,该
视图改用 `i_pcompare=breakdown`。“功耗”视图的“统计范围”新增“全部”(与“每 Token
能耗”一致):设置 `i_pcompare=boundaries`,在同一散点图上按芯片绘制仅 GPU
(实线)、IT(虚线)与数据中心(点划线),沿用现有“功耗边界”图例;横轴指标与
显示方式控件照常生效。“更多视图”中的对比功耗边界控件改为“额定边界:关闭 |
TDP + 整体预配”,仅在存在额定序列(每输出 token 能耗)时可用。非官方运行 overlay
行为不变。补充 PowerAnalysisPanels 单元测试并更新 powerx-views、PowerXLayout
测试、文档与 inferencex-api skill 参考。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): drop the provenance strip and More views, lay Chart Config out like /inference
- Footer: remove the "N measured points · validated windows · power model rev · PUE"
line (`powerXProvenanceText`, `PowerXProvenance`); the collapsed "How we measure"
details stays as a plain muted link (`PowerXMethod`) with the same method sentences.
- Chart Config: remove the "More views" expander (`PowerXMoreViews`) and the
"Open power over time" shortcut. Scope, Power statistic and Rated boundaries are
plain labelled controls beside X-Axis Metric, Count and Per / Show as, each shown
only on the views where it applies; Split by stays in the Where the power goes card.
- Update unit tests, Cypress specs, docs/powerx-permanent-view.md, the skills
dashboard-views reference and integrity.json.
中文:移除 PowerX 页脚的来源信息行(实测数据点数、验证窗口、功耗模型版本、PUE),
仅保留折叠的“测量方法”链接;移除图表配置中的“更多视图”折叠区和“打开功耗随时间变化”
按钮,统计范围、功耗统计量与额定边界改为与 /inference 相同布局的普通控件,仅在适用
的视图上显示;拆分方式仍位于“功耗去向”卡片。同步更新单元测试、Cypress 用例、文档与
skills 参考。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* fix(powerx): lay the Chart Config out in the /inference grid, pair rated with GPU only
The PowerX Count, Per or Show as, Scope, Power statistic and Rated
boundaries controls sat in one flex-wrap box inside the second Chart
Config column, so X-Axis Metric stood alone on the left while the rest
stacked tall on the right. They now render as `contents`, so each one
is a cell of the same grid /inference uses: the X-Axis Metric column
stays 11rem (18rem on agentic traces) and the rest of the row splits in
two. Row one is X-Axis Metric and Count (two cells, equal segments);
row two is Per or Show as, then Scope and Power statistic or Rated
boundaries, flowing left to right with no empty cells. Every control
fills its cell, toggles wrap instead of overflowing, and each label
carries the same (i) help as X-Axis Metric. Below sm every control is a
row inside the "More chart controls" fold, whose changed count now
includes the PowerX controls (`powerXChangedCount`). The Chinese Count
label becomes 统计口径 so it no longer shares a name with Scope (统计范围).
Rated boundaries is now Off | All-in provisioned and draws exactly two
lines per chip: measured GPU power (solid) and the all-in provisioned
bound (dashed), with no IT, Facility or GPU-level TDP line, so the chart
stays readable. It has its own compare value, `i_pcompare=provisioned`
(`PROVISIONED_COMPARE_BASES`), and the Boundary legend lists just those
two; the five-line `all` stays reachable from share links only. Docs and
the inferencex-skills reference follow.
中文:PowerX 的统计口径、计量单位/显示为、统计范围、功耗统计量与额定边界
控件原先挤在图表配置第二列的一个 flex-wrap 容器中,导致 X 轴指标独占左列、
其余控件在右列纵向堆叠。现改为 `contents` 渲染,使每个控件成为 /inference
同一网格的单元格:X 轴指标列保持 11rem(智能体场景 18rem),其余宽度平分为
两列。第一行为 X 轴指标与统计口径(占两格、等宽分段),第二行为计量单位或
显示为、统计范围、功耗统计量或额定边界,自左向右排布、无空格。各控件填满
单元格,分段切换换行而不溢出,标签带有与 X 轴指标相同的 (i) 说明。sm 以下
每个控件独占一行,位于“更多图表设置”折叠区内,其“已更改”计数现包含 PowerX
控件(`powerXChangedCount`)。中文“统计口径”取代原“统计范围”,避免与 Scope
(统计范围)同名。
额定边界改为“关闭 | 整体预配”,每芯片仅绘制两条线:GPU 实测功耗(实线)与
整体预配功耗(虚线),不再绘制 IT、数据中心或 GPU 级 TDP 线,以降低认知负担。
它使用独立的对比值 `i_pcompare=provisioned`(`PROVISIONED_COMPARE_BASES`),
图例“功耗边界”仅列出这两项;五条线的 `all` 仅能通过分享链接访问。文档与
inferencex-skills 参考同步更新。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* refactor(powerx): drop the How we measure footer note
Remove the collapsed "How we measure" details (`PowerXMethod`) from the
PowerX chart footer, its en/zh strings, its unit tests and the Cypress
assertion on it. The shared /inference footer notes stay as they are; the
GPU / IT / Facility tag meaning now lives only in each pill's `title`.
Docs and the inferencex-skills dashboard-views reference no longer point
at the note; the skills integrity manifest is regenerated.
中文:移除 PowerX 图表页脚中折叠的“测量方法”说明(`PowerXMethod`)及其中英文文案、
单元测试和 Cypress 断言。/inference 共用的页脚说明保持不变;GPU / IT / 数据中心
标签的含义仅保留在各标签自身的 `title` 提示框中。文档与 inferencex-skills 的
dashboard-views 参考不再指向该说明,并重新生成 skills integrity 清单。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* refactor(powerx): drop the chart hint and ISL/OSL footer lines
PowerX no longer shows the "Shift+Scroll to zoom • Drag to pan •
Double-click to reset • Click a point to pin tooltip" line (nor its touch
variant) under its charts: ScatterGraph and PowerTimeline pass an empty
`instructions` when `usePowerXSurface()` is true; the breakdown panels
already did. The "Completed requests across all resident points" ISL/OSL
footer is gated off on PowerX too, and ChartDisplay skips the
resident-sequence-lengths query there. /inference, embeds and the
`minimalChrome` path are unchanged.
Tests: ScatterGraph.powerx-chrome.test.tsx covers the hint on /inference,
PowerX and minimal chrome; powerx-compare.cy.ts adds an official-only
agentic PowerX case asserting no hint, no ISL/OSL footer and no sketch
request; powerx-timeline.cy.ts asserts no hint under the timeline.
中文:PowerX 页面不再在图表下方显示「按住 Shift 滚动以缩放 · 拖动以平移 ·
双击以重置 · 点击数据点固定提示框」交互提示(含触屏版本),ScatterGraph 与
PowerTimeline 在 usePowerXSurface() 为真时传入空 instructions;同时隐藏
「当前所有数据点的已完成请求」ISL/OSL 页脚,并在 PowerX 上跳过
resident-sequence-lengths 查询。/inference、嵌入页与 minimalChrome 行为不变。
新增单元测试与 Cypress 用例覆盖上述三种 PowerX 视图。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): component-level power breakdown with per-layer colours, area default
Where the power goes, per Oren's review of #1480:
- The across-load drill-down opens on the stacked area view; `i_pbview=bars`
still selects the stacked bars and the toggle stays.
- "Server parts" is split into the pinned power model's real component
classes. The breakdown now carries, in stack order, gpu (measured),
measuredCpu (Grace socket telemetry, CPU + LPDDR), cpu, memory, nic (NIC
cards + system-side optics), nvswitch (NVSwitch ASICs and the NVL72 switch
tray incl. its embedded EPYC), storage, other (PCIe switches, retimers, shelf
controllers), fans, psuLoss (AC/DC + DC/DC conversion loss), network and
facility. `systemPowerLeafCategory` maps leaf names to parts and the test
pins the full leaf table across every supported system; a renamed upstream
component lands in `other` and fails it. AMD chassis have no nvswitch, B300
has no other, NVL72 rows with measured sockets have no cpu/memory. The parts
still sum to All in Measured W/GPU (IT + facility).
- One colour per part, shared by every chip, so a single SKU's layers are
tellable apart: `--power-part-*` tokens next to the `--overlay-run-*`
palette in globals.css with light, dark and minecraft values. Measured
layers are solid, modeled layers keep the hatch over a lighter fill of their
own colour, facility is the lightest hatch; the chip's vendor colour stays on
its legend dot, the area's top edge and total dots. Legend swatches, tooltip
rows and the chip-compare segments use the same swatches.
- API: `powerBreakdowns[].categories` and `wattsPerGpu` carry the new keys;
OpenAPI schema, route-catalog digest, skills reference (+ integrity) and the
PowerX docs updated; CSV export has one column per part.
中文:PowerX「功耗去向」视图改为默认显示堆叠面积图(`i_pbview=bars` 仍可切回堆叠柱状图);
「服务器部件」按功耗模型的真实组件拆分为 CPU、内存、网卡、NVSwitch、存储、PCIe 及其他、
风扇、电源损耗、网络分摊与机房开销,各部分之和仍等于 All in Measured W/GPU,并以测试
固定了全部系统的叶子组件到分类的映射;每个分类使用站点统一的独立颜色(globals.css 中
的 `--power-part-*` token,含浅色/深色主题),实测层为实色、建模层保留斜线,芯片厂商色
仅用于图例圆点与总功耗轮廓;API 响应、OpenAPI、路由目录摘要、skills 参考与文档同步更新。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): single-hue breakdown with hover-to-identify and edge labels
Where the power goes, after Wenyao's review of the per-part palette in #1480:
- One hue per chip again. Every layer is a lightness step of the chip's own
colour: `powerLayerOpacity(index, count)` runs linearly from 0.92 at the
measured GPU base to 0.14 at the top over the parts that series actually
has, so a 9-, 10- or 12-deep stack keeps evenly spaced, tellable steps, and
a 1 px chip-colour stroke at 0.6 separates neighbours. The `--power-part-*`
tokens, `powerCategoryColor`, the hatch patterns, `HATCH_ANGLE` and
`cssHatchAngle` are gone; "Modeled" survives as a dashed swatch outline and
the tooltip's basis column.
- Interaction tells the bands apart. Hovering a band, its legend row or its
edge label raises it to full opacity with a 1.5 px stroke and fades the rest
to 0.25, with a small name + W/GPU label at the pointer (interpolated at the
hovered x on the area, the column value on bars); clicking a legend row pins
it (`aria-pressed`), a second click, Escape or a click on the plot unpins, a
tap on a band pins on touch. The highlighted row is bold in the per-column
tooltip. The state is shared between the chip comparison's legend, its bar
segments and the open drill-down (`usePowerLayerHighlight`), so hovering
"NICs" lights NICs on every chip. `powerx_breakdown_layer_highlighted`.
- The area view labels every band at its right edge (name + W at the last
point) in the right margin with a leader to the band centre; `placeEndLabels`
pushes collisions apart at 12 px in stack order and the margin widens to the
longest label. Below `sm` the labels are skipped so the plot keeps its width.
- Legend rows are swatch + name in stack order; Measured/Modeled live in the
swatch title. Comparison segments use the same ramp on each chip's colour.
- Unofficial-run series get the same ramp from `overlayRunColor(runIndex)`:
`buildPowerBreakdownsWithOverlays` keeps each run as its own
`hwKey|precision|run<N>` series with the run tag, dashboard only (the API
keeps `buildPowerBreakdowns`).
- Kept from e727923: the twelve component categories, the API/skills contract,
stacked area by default, the bars toggle, the per-column tooltip and CSV.
- Tests: ramp monotone and distinct at 12 and 9 deep, band interpolation,
end-label placement, overlay series; a jsdom harness that runs the panel's
D3 layers covers legend hover/pin/Escape, plot hover, edge labels, margin,
overlay colour and the chip-compare legend highlight.
中文:PowerX「功耗去向」堆叠图回到单一色相:每一层都是该芯片自身颜色的明度梯度
(`powerLayerOpacity` 按该系列实际存在的部件数从 0.92 线性降到 0.14,层间以 1 px
芯片色描边分隔),移除 `--power-part-*` 配色与斜线填充;「建模」改由图例色块的虚线边框和
提示框中的「建模」列表示。各层靠交互区分:悬停图层、图例项或右侧标签时该层提亮、其余层
淡化并显示名称与该 x 处的 W/GPU,点击图例固定高亮(`aria-pressed`),再次点击、Escape
或点击绘图区取消,触屏点按图层即固定;高亮状态在芯片对比图例、对比柱段与展开的下钻图之间
共享。堆叠面积图在右侧按堆叠顺序为每层标注名称与末点功耗,重叠时按 12 px 逐个推开并自动
加宽右边距,窄于 `sm` 时不显示。非官方 run 的系列以 `overlayRunColor` 使用同样的梯度。
保留 e727923 的十二个部件分类、API/skills 契约、默认堆叠面积图、柱状切换、提示框与 CSV
导出,并补充单元测试。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): three-band breakdown overview with a parts list
Where the power goes, after Wenyao's review of the single-hue stack in
#1480 ("this is not that clear"): stop drawing eleven parts in one stacked
area and split the view into overview plus detail.
- Overview: the drill-down's area and bars, and each chip-compare bar,
collapse to three bands in stack order: Measured GPU (`gpu` +
`measuredCpu`), Modeled server (`cpu`, `memory`, `nic`, `nvswitch`,
`storage`, `other`, `fans`, `psuLoss`, `network`) and Facility overhead
(`facility`, only when the facility is counted). `powerBandOpacity` gives
each band a fixed step of the chip colour (0.92 / 0.53 / 0.14, the generic
`powerLayerOpacity` called with 3), so the modeled band reads the same with
or without the facility. The 1 px edges, the heavier top edge, the three
right-edge labels with their watts at the last point, the hover/pin
highlight and the per-column tooltip stay; the tooltip keeps every part
under its band's bold subtotal. The legend shows the three bands; measured
vs modeled stays as the dashed swatch outline and the tooltip word. A
chip-compare modeled segment's `title` lists its parts and watts.
- Detail: `PowerPartsList` sits right of the plot from `lg` (the plot keeps
two thirds) and under it below. Its header is the compared point (`B200
(vLLM) FP4 · c16 · 88 tok/s/user`); one row per non-empty part of that
chip, heaviest first, the facility row last under a rule: short name, a
bar on a faint track in the band's step (dashed left edge when modeled),
the watts, the share of IT (the facility row: of the facility total) and a
72×18 sparkline of that part across the chip's points on its own 0..max
scale with the compared point dotted. The row `title` reads Measured,
Modeled · fixed or Modeled · moves with load (`POWER_PART_BEHAVIOUR`,
cross-checked against the model in tests). The list follows the slider and
the Hardware select exactly as the plot's dashed outline does; off the
comparison's range it reads the nearest point (`nearestBreakdownPoint`).
- Shared highlight: `PowerLayerHighlight` is now `{ band, category, pinned }`
and `usePowerLayerHighlight` takes a target, `bandTarget(band)` from the
plot, legends and chip bars or `partTarget(category)` from a list row, so a
hovered row raises its band everywhere and the row lights (`powerPart
Emphasis`: highlighted, a sibling of a plot-hovered band, or plain). Click
pins, Escape unpins. `powerx_breakdown_part_hovered` / `_pinned` on the
rows; `powerx_breakdown_layer_highlighted` keeps the band events.
- Overlay runs get the same bands, list and sparklines in
`overlayRunColor(runIndex)`.
- Removed with the collapse: the twelve-step ramp, `stackPowerBreakdown`,
per-part legend rows and end labels, `data-category` on the drawn layers
(now `data-band`). `SYSTEM_POWER_CATEGORIES` and the API are untouched.
- Tests: bands, stacking, part rows (sort, shares, history), sparkline
geometry, behaviour table vs the model, nearest point; the jsdom harness
covers the three bands, legend, tooltip structure, edge labels, plot
hover, list hover/pin/Escape, overlay colour and the chip-compare link;
`PowerPartsList.test.tsx` covers the list alone in en and zh. Cypress
component assertions updated for bands and the list.
- Docs: `docs/powerx-permanent-view.md` and the skills dashboard-views
reference (integrity regenerated).
中文:PowerX「功耗去向」下钻图不再把十一个部件画在同一张堆叠面积图里,而是拆成
「总览 + 明细」:面积图、柱状图和芯片对比横条都合并为三段(实测 GPU、建模服务器、
机房开销,仅在计入机房开销时显示),每段为芯片颜色的固定明度梯度,保留 1 px 分隔线、
右侧三条带末点功耗的标签、悬停/固定高亮和逐列提示框(提示框在各段加粗小计下仍列出
全部部件);明细由图旁新增的部件列表承担(`lg` 以上在图右侧,以下在图下方):表头为
对比点,每行一个非空部件,按功耗降序、机房开销置于末行,含名称、按功耗比例的小条、
瓦数、占 IT 比例和该部件随负载变化的迷你面积图(各自 0..最大值刻度,对比点打点),
行 `title` 标注实测 / 建模·固定 / 建模·随负载变化;悬停某行会在图中提亮其所属分段,
点击固定、Escape 取消;列表随滑块和硬件选择同步。非官方 run 以 `overlayRunColor`
使用相同的三段与列表。移除十二级梯度和逐部件图例;`SYSTEM_POWER_CATEGORIES` 与
API 不变。补充单元测试、Cypress 断言与文档。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* refactor(powerx): restore the six-layer hatched breakdown, keep the parts list
The breakdown plot, the comparison bars and the legends go back to the
treatment the panel had before the component-level and single-hue passes:
six layers in stack order (Measured GPU, Measured Grace CPU, Server parts,
Fans + PSU loss, Network share, Facility overhead), each a fixed opacity step
of the chip colour (0.9 / 0.72 / 0.5 / 0.34 / 0.2, hatch tint 0.18) like the
Profit Estimator's stacked bars, every modeled layer hatched at its own
stripe angle (45 / 45 / 45 / 135 / 0 / 90 deg) like its loss segment, measured
layers solid. The twelve API parts stay; the layers are a mapping over them
(`POWER_BANDS` / `POWER_BAND_CATEGORIES`: server = cpu + memory + nic +
nvswitch + storage + other, fansPsu = fans + psuLoss), so the API, CSV and
skills contract from the component-level pass are untouched.
Kept from the later passes: stacked area by default (`i_pbview`), the bars
toggle, the per-column tooltip with bold layer subtotals (a layer that folds
several parts lists them beneath), the parts list beside the plot with
hover/pin through `usePowerLayerHighlight` (a hovered layer keeps its step
and hatch, its edge thickens, the others fade to 0.25), overlay runs in
`overlayRunColor`, and the download button. Dropped: the right-edge layer
labels and the three-band opacity ramp.
Tests cover the mapping, the opacity and hatch tables, the pattern defs,
the legend order and swatches, the tooltip rows, the highlight states, the
chip-compare segments and the overlay path; the Cypress component spec
checks the five legend rows, the patterns and the absence of edge labels.
Docs and the skills reference describe the six hatched layers; the route
catalog digest for `utils/power-breakdown.ts` is refreshed (presentation
only, no API change).
中文:恢复 PowerX 功耗构成图原有的六层斜线填充样式,并保留图旁的部件列表。
六层按堆叠顺序为实测 GPU、实测 Grace CPU、服务器部件、风扇 + 电源损耗、网络分摊、
机房开销,每层为芯片颜色的固定透明度阶梯,建模层按各自角度画斜线,实测层为纯色。
API 的十二个部件不变,六层只是其映射;保留默认堆叠面积图、提示框分层小计、
部件列表的悬停/固定联动、非官方运行叠加与下载按钮;去掉右侧边缘标签与三段透明度渐变。
相应更新了单元测试、Cypress 组件测试、文档与 skills 参考,并刷新了路由目录摘要。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
---------
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* docs: add PowerX tutorial pages
* feat: add interactive PowerX tutorial widgets
* feat: add PowerX tutorial diagrams and examples
* fix: correct PowerX tutorial chart rendering
* feat: animate PowerX tutorial diagrams
* feat: update PowerX tutorial heading and flow arrows
* chore: remove PowerX tutorial tests
* refactor: render PowerX tutorial from MDX
* refactor: drop static PowerX flow SVG export
* chore: remove PowerX tutorial animations
* chore: remove unused PowerX tutorial code
* refactor: build PowerX tutorial ladder from the system power breakdown
* feat: link the PowerX tutorial from the PowerX tab
* feat(powerx): per-chip compared point in the breakdown, stable chip rows
Clicking a column of the open drill-down (stacked bars or stacked area) now
pins that chip's compared point to that column instead of moving the global
interactivity slider: only that chip's row, dashed outline and parts list
change, the other chips keep their slider-derived point. Moving the slider
drops every pin; the Hardware select and Collapse keep them; a small "×"
marker on the pinned row ("Pinned to c<N> · click to follow the slider")
unpins one chip. Pins are shared as `i_pbpoint` (`seriesKey:concurrency`
pairs, overlay runs included) and read once on load. Chip rows keep a fixed
order, HW_REGISTRY order with unofficial-run lines after, instead of
reordering by watts whenever the slider moves. Presentation only: the views
API already returns every breakdown point, so no API selector changes; the
route-catalog digest of `utils/power-breakdown.ts`, the docs and the skills
reference (en/zh, integrity regenerated) are updated.
中文:点击已展开下钻图中的某一列,现在会把该芯片的对比点固定在该列,而不再移动
全局交互性滑块:只有该芯片的行、虚线框和部件列表会变化,其他芯片仍按滑块取点。
移动滑块会清除所有固定点;硬件选择与收起会保留固定点;已固定行上的 “×” 标记
(“已固定在 c<N> · 点击后跟随滑块”)可单独取消该芯片的固定。固定点通过
`i_pbpoint`(`seriesKey:concurrency`,含非官方运行)分享,加载时读取一次。芯片行
顺序固定为 HW_REGISTRY 顺序(非官方运行排在其后),不再随滑块按功耗重排。仅为展示
逻辑:views API 已返回全部构成数据点,不新增 API 选择项;同步更新了
`utils/power-breakdown.ts` 的路由目录摘要、文档与 skills 参考(中英文,已重新生成
integrity)。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* refactor(powerx): pin glyph for the pinned chip row, invite the column click
The pinned chip row now shows a small filled lucide `Pin` glyph before its
`c<N> · <interactivity>` label (same title and unpin click) instead of a lone
"×" that read as "remove this chip". The drill-down subtitle says "Click a
point to compare it; the dashed outline marks the compared point." so the
column click is discoverable; columns already show a pointer cursor and a
hover band.
中文:已固定的芯片行改为在 `c<N> · <交互性>` 标签前显示一个实心 lucide `Pin`
图标(提示与取消固定的点击行为不变),不再使用容易被理解为“移除该芯片”的
“×”。下钻图副标题改为“点击任一数据点即可对比;虚线框标出上方对比所用的点。”,
便于发现点击操作;各列本已显示指针光标与悬停高亮。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* fix(powerx): keep the power-model link visible, land old power links on Power draw, align tests with the PowerX tab
CI on this branch had four reds, none from the per-chip point itself:
- The pinned scatter tooltip's "Power model" source link had moved inside the
collapsed "Deployment & model details" block, so the attribution was hidden
until the details opened; the link line now sits under the block again.
- `/inference?i_power=…` links with no metric redirect to `/powerx` on the
Power draw scatter (`i_metric=y_measuredAvgPower`), as they used to chart
power; PowerX itself still opens on Energy per token.
- The certified-power E2E spec opens the power scatter explicitly, and the
profit-estimator E2E spec's dashboard tab order includes the PowerX tab.
- The new chip-pin component test resets the module-level `i_pbpoint` URL
state between retries and moves the range slider through the native value
setter, which a React controlled input needs.
中文:本分支 CI 有四处失败,均与按芯片固定对比点本身无关:固定提示框中的
“Power model”来源链接此前被移进了折叠的“部署与模型详情”块内,展开前不可见,现在
重新放回该块下方;不带 metric 的 `/inference?i_power=…` 旧链接重定向到 `/powerx`
时落在“功耗”散点图(`i_metric=y_measuredAvgPower`),与其原先绘制功耗的行为一致,
PowerX 本身仍默认打开“每 token 能耗”视图;certified-power E2E 用例显式打开功耗散点图,
profit-estimator E2E 用例的标签页顺序加入 PowerX;新的芯片固定组件测试在重试之间重置
模块级 `i_pbpoint` URL 状态,并通过原生 value setter 拖动滑块(React 受控输入所需)。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): show the slider as a guide in the drill-down, mark pinned rows, teach the column click
Three refinements to the per-chip compared point so one mental model holds:
the slider is the global guide, the dashed outline is this chip's point.
- A pinned chip row's `c<N> · <interactivity>` reads in the pin's accent and
its title says "Compared at <x> tok/s/user · slider at <y> tok/s/user", so
the row visibly sits off the slider; other rows are unchanged.
- The open drill-down (bars and area) draws a faint dashed vertical guide at
the slider's interactivity with a tiny value label; the label is suppressed
while the guide sits on the compared column (not pinned), and clicking the
guide, or the column under it, returns the chip to the slider.
- The cursor label gains a second line: "Click to compare at c48" on another
column, "Compared here" on the compared one.
中文:围绕按芯片固定对比点做三处打磨,统一心智模型——滑块是全局参考线,虚线框是该
芯片自己的对比点:已固定芯片行的 `c<N> · <交互性>` 以固定标记的强调色显示,提示为
“对比点 <x> tok/s/user · 滑块位于 <y> tok/s/user”,其他行不变;展开的下钻图(柱状与面积)
在滑块交互性处绘制一条浅色虚线参考线并带小字数值标签,参考线落在当前对比列上(未固定)
时不显示标签,点击参考线或其下方的列即可让该芯片回到跟随滑块;光标标签增加第二行:
其他列显示“点击以在 c48 处对比”,当前对比列显示“当前对比点”。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): larger, fewer controls on phones
Under md, PowerX only; nothing changes from md up.
- View tabs: a 2x2 grid of 48 px buttons, so Over time is on screen without
a sideways scroll (the strip was 519 px wide in a 332 px viewport).
- Count, Per and Show as: one native select per group (SegmentedToggle
variant="select"); each option carries the segment's hover hint that touch
never showed. Values, URL params and analytics are unchanged.
- X-Axis Metric, Scope, Power statistic and Rated boundaries sit behind one
44 px "More" row, collapsed by default, reading "More · N changed" when any
of them is off its default (powerXSecondaryChangedCount; ChartControls
hands the X-Axis Metric cell to PowerXChartConfig through a render prop).
- 44 px touch targets: Chart Config help icons, legend rows and buttons,
chip-compare legend items and rows, and a 28 px slider thumb, through a
data-powerx-surface block in globals.css plus PowerX-gated classes.
- Dashboard toasts stay off on phone-width /powerx and /zh/powerx; the pinned
point sheet and the drill-down subtitle say Tap on touch-primary devices.
- Tick labels get a 12 px floor on PowerX charts under md.
Presentation only: no data, filter semantics, units or defaults change, so
the API, OpenAPI document and inferencex-skills package are untouched.
中文:PowerX 手机端控件更大、更少(仅 md 以下生效,md 及以上不变)。
视图标签改为 2×2 的 48 px 按钮网格,“随时间变化”无需横向滚动即可看到;
统计口径、计量单位、显示为改为原生下拉框,选项附带原先只在悬停时可见的提示;
X 轴指标、统计范围、功耗统计量、额定边界收进一行 44 px 的“更多”折叠行,
默认收起,有非默认项时显示“更多 · 已更改 N 项”;帮助图标、图例行、芯片对比
行与滑块拇指扩大到 44 px 触控区;手机宽度的 PowerX 不再弹出仪表板提示,
触屏设备上的固定数据点面板与下钻副标题改用“点按”;刻度标签最小 12 px。
纯展示改动,不涉及数据、筛选语义、单位或默认值,API、OpenAPI 与 skills 包未改。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* fix(powerx): let the X-Axis Metric cell fill the phone "More" fold
XAxisModeSelector caps its cell at max-w-44 / max-w-72, so inside the
one-column fold under md it ended about 20 px short of the Count and Per
selects. The selector takes an optional className and PowerX's ChartControls
branch passes max-md:max-w-none; from md up and on /inference nothing changes.
中文:修复 PowerX 手机端“更多”折叠行内的 X 轴指标单元格宽度:XAxisModeSelector
自带 max-w-44 / max-w-72 上限,在 md 以下的单列折叠中比统计口径和计量单位的下拉框
窄约 20 px。现为该组件增加可选 className,PowerX 分支传入 max-md:max-w-none,
md 及以上与 /inference 页面保持不变。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): scrub the drill-down on touch, with a readout above the plot
PowerX on a coarse pointer (useIsCoarsePointer, the gate the drill-down already
uses for its Tap copy and tap-to-pin layer); a mouse keeps the hover label, the
tooltip and the click.
- Scrub: a finger anywhere across the drill-down plot (bars and area) moves a
solid rule to the nearest column (nearestColumnIndex, by column centre) and a
readout above the plot (PowerBreakdownReadout) shows that column's total W/GPU
with its basis pill, `c<N> · <interactivity>`, and one chip per layer in stack
order with the plot's swatch and hatch language; tapping a chip isolates the
layer like the legend. The readout sits in normal flow, so it never clips at
the plot's edge. The hover cursor label and the tooltip (and so the point
sheet) are not attached on touch. The svg keeps touch-action: pan-y so a
vertical pan still scrolls the page; it is none only while a scrub is in
progress. A gesture that becomes a scroll (pointercancel) restores what the
readout showed before it.
- Tap = hold: a tap pins that chip's compared point through the same
onPinComparedPoint path as a desktop click (dashed outline, i_pbpoint); the
readout then says Pinned until the next scrub or the row's pin marker. The
compared-point and layer actions now run in one click listener: with two, a
layer pin's state flush re-registered the second listener mid-dispatch and the
browser skipped it, so a real tap lost its compared-point pin.
- Compare button: a 44 px full-width "Compare chips at N tok/s/user" under the
plot moves the slider to the readout's interactivity (the slider's own action,
so every pin drops) and tracks powerx_compare_at_scrub; disabled while the
slider already reads that value. Desktop does not get it.
- The touch subtitle teaches the drag and the tap; zh copy for all of it.
- Layer style helpers move to power-layer-style.ts (re-exported unchanged) so
the readout can share them without a module cycle.
- Unofficial-run series scrub and read in their run colour.
Presentation only: no data, filter semantics, units or defaults change, and
moving the slider is the existing action, so the API, OpenAPI document and
inferencex-skills package are untouched.
中文:PowerX 触屏(粗指针,与下钻图现有“点按”文案和点按固定分层所用的判断一致)
下,下钻图改为拖动读取:手指在图上任意位置拖动,实线参考线移到最近的一列,
图表上方的读数区显示该列的每 GPU 总功耗(含口径标签)、`c<N> · <交互性>`,
以及按堆叠顺序排列的各分层色块与数值(与图中的色阶和斜线一致,点按色块可
单独突出该分层);读数区位于正常文档流中,不会在图表边缘被裁切。触屏下不再
显示悬停光标标签和提示框,svg 保持 touch-action: pan-y,纵向滑动仍可滚动页面,
仅在拖动进行中设为 none;手势变为滚动时恢复拖动前的读数。点按即固定:点按某列
通过与桌面端点击相同的 onPinComparedPoint 路径固定该芯片的对比点(虚线框、
i_pbpoint),读数区显示“已固定”;对比点与分层两个动作合并到同一个 click 监听器
中,原来分成两个时,分层固定引起的同步刷新会在事件派发过程中重新注册第二个
监听器,浏览器会跳过它,导致真实点按丢失对比点固定。图下方新增 44 px 全宽按钮
“在 N tok/s/user 处对比各芯片”,将滑块移到读数所在交互性(即滑块自身的动作,
会清除所有固定点)并上报 powerx_compare_at_scrub,滑块已在该值时禁用;桌面端
无此按钮。触屏副标题改为说明拖动与点按;全部提供中文文案。分层样式辅助函数
移至 power-layer-style.ts(原样重新导出)以避免模块循环引用。非官方运行序列
同样支持拖动读取并使用其运行颜色。纯展示改动,不涉及数据、筛选语义、单位或
默认值,移动滑块为既有动作,API、OpenAPI 与 inferencex-skills 包未改。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): scrub the main chart on touch into the readout above it
PowerX on a coarse pointer (useIsCoarsePointer, the gate ScatterGraph already
uses for its Tap copy); a mouse keeps the hover tooltip and readout as they
were.
- A finger dragged across the scatter snaps to the plotted point nearest it,
official or ?unofficialrun= overlay under the current zoom
(nearestScrubCandidate; a `powerx-scrub` custom layer draws a rule and a ring
in the chip or run colour, dropped on zoom), and reports it to the PowerX
readout as source 'scrub'. The svg keeps touch-action: pan-y so a vertical
pan still scrolls the page; it is none only while a scrub is in progress.
One-finger touches never reach d3-zoom, as before.
- The readout (PowerXReadout) leads with the chart's own y value on a coarse
pointer (`yMetric`: the metric label and the tooltip's number format from
ChartDisplay), says "Point under your finger · tap it for details", and the
no-interaction hint says drag instead of hover. A scrub replaces a pinned
point (the sheet is closed by then) and survives the compat hover end a tap
synthesises; a hover still never replaces a pin.
- A tap on a point still opens the provenance sheet through the point's own
click, as today.
- Overlay points respect activeOverlayHwTypes and the optimal-only toggle
exactly as the chart draws them.
Presentation only: no data, filter semantics, units or defaults change, so the
API, OpenAPI document and inferencex-skills package are untouched.
中文:PowerX 触屏(粗指针,与 ScatterGraph 现有“点按”文案所用的判断一致)下,
主散点图改为拖动读取:手指在图上拖动时吸附到距离最近的数据点(含当前缩放下的
官方点与 ?unofficialrun= 叠加点,nearestScrubCandidate;新增 powerx-scrub 自定义
图层,用芯片或运行颜色绘制参考线与圆环,缩放时清除),并以 source 'scrub' 上报
给 PowerX 读数行。svg 保持 touch-action: pan-y,纵向滑动仍可滚动页面,仅在拖动
进行中设为 none;单指触摸一如既往不会触发 d3-zoom。读数行(PowerXReadout)在
粗指针下首先显示图表自身的 y 值(yMetric:来自 ChartDisplay 的指标名称与提示框
的数字格式),提示“手指所在的数据点 · 点按可查看详情”,无交互时的提示改为拖动
而非悬停;拖动会替换已固定的点(此时面板已关闭),并在点按合成的 hover 结束
事件后保持,悬停仍不会替换固定点。点按数据点仍通过该点自身的 click 打开来源
面板,与现在一致。叠加点遵循 activeOverlayHwTypes 与“仅最优”开关,与图表绘制
完全一致。纯展示改动,不涉及数据、筛选语义、单位或默认值,API、OpenAPI 与
inferencex-skills 包未改。鼠标端悬停提示框与读数行保持不变。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* fix(powerx): a touch tap only holds the column, and the readout sits closer to the plot
Two polishes on the drill-down's touch scrub (PowerX on a coarse pointer):
- A column tap now only pins the chip's compared point. The layer under the
finger is no longer toggled, so the chart does not dim to one hatched band the
moment the user taps to hold; on touch a layer is isolated only from a readout
chip (tap again to release). A mouse click is unchanged: it pins the compared
point and toggles the layer as before.
- The plot's top margin is 16 px instead of 40 under the readout
(TOUCH_MARGIN), closing the empty band between the readout card and the plot
frame from 48 px to 24 px at 390 wide. The margin kept room for the
concurrency and total labels above the tallest column, which protrude at most
~10 px above the plot top; the guide label and the TDP / All in Provisioned
labels sit inside the plot and stay unclipped. Mouse charts keep MARGIN.
Tests: the touch unit spec asserts a column tap leaves every layer plain and a
readout chip isolates and releases its layer, and checks the 16 px vs 40 px
margins; the touch E2E spec asserts the same plus the readout-to-plot gap.
中文:PowerX 触屏拖动读取的两处打磨。点按某列现在只固定该芯片的对比点,不再
切换手指下方的分层,避免点按固定的瞬间整张图暗下来只剩一条斜线分层;触屏下
只有点按读数区的分层色块才会单独突出该分层(再点一次恢复)。鼠标点击保持不变:
仍同时固定对比点并切换分层。读数区下方的图表上边距由 40 px 改为 16 px
(TOUCH_MARGIN),390 px 宽度下读数卡片与图框之间的空白由 48 px 缩至 24 px;该边距
原本为最高一列上方的并发数与总功耗标签预留,而它们最多只超出图框顶部约 10 px,
参考线标签与 TDP / All in Provisioned 标签位于图内不会被裁切;鼠标端图表仍使用
MARGIN。触屏单元测试断言点按列后各分层保持 plain、读数色块可单独突出并恢复,
并检查 16 px 与 40 px 边距;触屏 E2E 测试同样断言,并检查读数区到图框的间距。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* test(cypress): add the touch-scrub spec to the split timing baselines
CI's "Typecheck and unit tests" failed on 629db8a in
src/lib/testing/cypress-timings.test.ts ("contains one positive timing for every
current integration spec" and "... every Firefox integration spec"): the new
cypress/e2e/powerx-touch-scrub.cy.ts had no entry in timings.json and
timings-firefox.json, which cypress-split seeds the CI shards from. Both
baselines gain the spec with its locally measured Cypress execution time (7 s
for its two cases in electron), the same placeholder shape the powerx-compare
and powerx-timeline specs carry; cypress-balance.json is the report CI
regenerates from observations and is left alone.
中文:修复 629db8a 上 CI “Typecheck and unit tests” 的失败:
src/lib/testing/cypress-timings.test.ts 要求每个集成测试文件在 timings.json 与
timings-firefox.json(cypress-split 据此分配 CI 分片)中都有一条正的耗时记录,而新增的
cypress/e2e/powerx-touch-scrub.cy.ts 缺少该记录。两份基线均补入该文件及其本地实测
的 Cypress 执行时间(electron 下两个用例共约 7 秒),格式与 powerx-compare、
powerx-timeline 的占位记录一致;cypress-balance.json 由 CI 根据观测数据重新生成,
不作修改。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012XziBthMeranqSpmv1koTd
* feat(powerx): fold the Where view's parts list and compact its chip rows on phones
PowerX Where the power goes under the `md` breakpoint (`useIsMobileViewport()`,
PowerX surface only; nothing changes from `md` up):
- Parts list (`PowerPartsList`): the three largest IT parts stay in view and an
"All N parts · across load" row (44 px, `aria-expanded` / `aria-controls`,
`powerx_parts_expanded`) opens the rest in place; the facility row always
folds. Rows are 56 px two-line cards (name, watts and share above the 8 px
bar and the 72x18 sparkline, which still fits at 390 px). Open, the list keeps
its order and a tap pins a row where it is; when it folds, a pinned part in
the remainder stays among the visible rows (`foldPowerPartRows`). Hover and
pin behaviour and the CSV export (every part) are unchanged.
- Chip rows (`PowerChipCompare`): 56 px cards with the name and total W plus the
basis pill on the first line, `c<N> · <interactivity>` with the pin marker and
"GPU NN%" on the second, and one 8 px stacked bar that keeps the layer steps,
hatches and titles but carries no in-bar watt labels (`data-layout="compact"`).
Registry order, the pin marker and the expand affordance are as before.
- Drill-down plot (`PowerBreakdownPanel`): 260 px high instead of 380 under the
touch readout (`PHONE_PLOT_HEIGHT`), every label inside the svg.
- Overlay runs render the same way (`overlayRunColor`, rows after the official
chips, per-run dismissal through the overlay rows passed in).
Presentation only: no data, filter, unit or URL semantics chang…
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Wenyao Gao · Slack thread
Before:
/powerxopened on four question tiles, a question line and a how-to-read line under them, an "Advanced settings" drawer whose Boundary / Display / Compare selects re-expressed the Count / Show as / Split by toggles in different words, and three full-width control fieldsets. At 1440x900 the fold held 39 controls and no data; the chart card started at y=925. The same boundary was named "GPU only / Whole system" in the toggle, "GPU Level Measured / All in Measured" in the legend, tooltip and table, and "W/chip" in the Advanced row.After: one compact segmented tab row (Power draw / Energy per token / Over time / Where the power goes; the hint is the button tooltip), the tab's own toggles, and a small Scope / Power statistic row only where those mean something; Benchmark Config, Chart Config and Compare history sit on one row and a Scenario or Precision select with a single locked option is dropped. The chart card now starts at y=780 at 1440x900, so its top is above the fold with the default state. The header keeps one sentence, the chip-compare and drill-down subtitles are one short line each, the power-model-revision footnote lives in the breakdown chart tooltip, and the PowerX legend rows, line labels, tooltip series line and table Series column say "GPU only / Whole system" like the Count toggle.
Why: the UX review of the PowerX stack found 39 controls and no chart above the fold, three layers of the same control, and explanatory copy repeated in seven places. Per Wenyao, the per-tab question line is cut along with the how-to-read line (the tab label already says what the view is; "solid is measured, hatched is modeled" stays in the breakdown legends), and the "What do these terms mean?" glossary is confirmed gone on the base (#1476 commit 4dd62e9); no remnant was found.
How:
PowerXTabs.tsxrenders the questions throughSegmentedToggle(stillrole=tablist, samepowerx-tab-*test ids andinference_powerx_*analytics) and drops the<details data-testid="powerx-advanced">block;powerXMetricFields()decides which legacy controls stay andMeasuredMetricControlsgains afieldsprop to render only those (Scope + Power statistic on GPU-only Power draw, Scope on per-token Energy; nothing on Whole system, Over time or Where).ChartControls.tsxcompacts its grid on the PowerX surface and hides a locked Scenario / Precision select; the mobile "changed" count no longer counts the hidden Y-axis metric.POWER_COUNT_LABELSinlib/power/power-basis.tsis the single source for the Count vocabulary, threaded as a'count'label style throughpower-compare.ts,tooltipUtils.ts,ScatterGraph.tsxandInferenceTable.tsxon the PowerX surface only. URL params (i_metric,i_pcompare, ...), API values and CSV column names are unchanged;i_pcompare=allstill works from a share link, it just has no control on the page any more (noted in the skills reference). Works for both official runs and?unofficialrun=overlays: the label style applies to the overlay tooltip and legend paths too, and the overlay e2e specs were updated rather than removed.Validation: local dev server (
E2E_FIXTURES=1) with Playwright at 1440x900: chart card top 925 → 780 (page 2516 → 2371 px, 492 → 436 words); at 390x844: 1324 → 1196 (page 3984 → 3856 px)./zh/powerxrenders the Chinese tab row, hints and description. No console errors on either page.Validation details
power-compare.test.ts,PowerXTabs.test.tsx).packages/appunit suite: 473/474 files pass; the one failure (src/lib/overview/overview-metadata.test.ts,RegExp.escape is not a function) fails identically on the base branch and is unrelated.inference-chart.cy.ts,measured-power-overlay.cy.ts,ttft-x-axis-toggle.cy.ts) now assert the Scope / Power statistic row directly and that the Boundary / Display / Compare selects are gone; they were not run locally (no Cypress binary here).PowerChipCompare.tsxhad a pre-existingtext-[11px]thatcheck:typographyflags on this branch too; replaced withtext-2xsso the pre-commit hook passes.AI model disclosure
Claude Fable 5.1 (claude-fable-5-1) via Claude Code, including a delegated implementation agent on the same model.
中文
修改前:
/powerx打开后先是四个问题卡片、其下的问题行与阅读说明行、一个把 Count / Show as / Split by 用另一套词(Boundary / Display / Compare)重复一遍的“高级设置”抽屉,再加三组占满整行的控件。1440x900 下首屏有 39 个控件却没有数据,图表卡片从 y=925 才开始。同一个功耗边界在页面上有三种叫法。修改后: 四个问题改为一行紧凑的分段标签(提示文字移入按钮 title),下方只保留该标签页自己的切换项,以及仅在有意义时出现的“统计范围 / 功耗统计量”一行;基准测试配置、图表配置与历史对比并排一行,只有一个锁定选项的场景/精度选择器不再显示。图表卡片顶部提前到 y=780,默认状态下在首屏可见。页头描述只保留第一句,芯片对比与下钻副标题各缩为一行,功耗模型版本脚注移入构成图的提示框;PowerX 图例、曲线标签、提示框与表格统一使用“仅 GPU / 整体系统”。
原因: UX 审查发现 PowerX 首屏 39 个控件却无图表、同一控件重复三层、说明文案在七处重复。按 Wenyao 的意见,连同阅读说明一起删除每个标签页的问题行;术语表已在 #1476(4dd62e9)移除,确认无残留。
实现:
PowerXTabs.tsx用SegmentedToggle渲染问题(仍为 tablist,测试 id 与埋点不变)并移除高级设置;MeasuredMetricControls新增fields属性只渲染需要的控件;ChartControls.tsx在 PowerX 上压缩网格;POWER_COUNT_LABELS作为 Count 术语的唯一来源,仅在 PowerX 页面应用于图例、曲线标签、提示框与表格。URL 参数、API 值与 CSV 列名不变。验证: 本地 Playwright:1440x900 图表卡片顶部 925 → 780;390x844 为 1324 → 1196。
/zh/powerx正常。单元测试除一个与本次无关、在基线分支同样失败的用例外全部通过。Generated by Claude Code