Repository navigation
chore(operatorx): remove redundant GPU selector / 移除 OperatorX 中多余的 GPU 选择器 - #1561
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The GPU multi-select and the per-chart hardware legends toggled the same selection state. Keep the legends as the single control and give the remaining Workload, Metric and Baseline controls a three-column row. 中文:移除 OperatorX 中多余的 GPU 选择器。GPU 多选框与各图表的硬件图例控制同一选择状态, 现仅保留图例作为唯一入口,其余 Workload、Metric 和 Baseline 控件改为三列布局。
Oseltamivir
force-pushed
the
chore/operatorx-remove-gpu-selector
branch
from
October 29, 2026 06:42
136a2af to
bb1f0bf
Compare
adibarra
added a commit
that referenced
this pull request
Oct 29, 2026
…standardize keys / 统计:覆盖未追踪的交互,补充事件上下文并统一键名 (#1555) * feat(analytics): dedupe mount-time events and report failed data queries Add trackOncePerPageview and trackOncePerSession to the analytics client. Mount-time page events (landing, submissions, feedback viewer, the four compare pages, not_found_page_shown, inference_chart_view, inference_power_timeline_loaded) now fire once per page view, so remounts, StrictMode effects and dependency changes no longer double count, while a real navigation back to the page still counts. blog_read_milestone fires once per post and milestone per tab session, and inference_replay_export_unavailable once per session. Failed React Query requests now send data_query_failed with endpoint, status, query_key and route_template, once per query key per page view. Client fetchers throw ApiRequestError so status and endpoint are structured. Cancellations and queries that throw to an error boundary are skipped, since error.tsx already reports those as error_page_shown. Compare page views now send gpus, model and precisions instead of gpu_a/gpu_b, default_model and prec_a/prec_b. 中文:为分析客户端新增 trackOncePerPageview 和 trackOncePerSession。挂载时触发的页面事件(落地页、submissions、反馈查看器、四个对比页、not_found_page_shown、inference_chart_view、inference_power_timeline_loaded)现在每次页面浏览只发送一次,重新挂载、StrictMode 和依赖变化不再重复计数,真正返回该页面时仍会计数。blog_read_milestone 在每个标签页会话中按文章和进度只发送一次,inference_replay_export_unavailable 每个会话只发送一次。React Query 请求失败时发送 data_query_failed(endpoint、status、query_key、route_template),每次页面浏览中每个 query key 只发送一次。客户端请求函数改为抛出 ApiRequestError,以便结构化获取状态码和接口路径。取消的请求以及会抛到错误边界的查询不重复上报,因为 error.tsx 已通过 error_page_shown 记录。对比页浏览事件改用 gpus、model、precisions 字段,替代 gpu_a/gpu_b、default_model 和 prec_a/prec_b。 * feat(analytics): track previously untracked interactions Add two shared hooks: useSearchTracking sends <section>_searched with query_length (never the text) once typing pauses, and useDialogCloseTracking sends <section>_closed with duration_ms when a dialog or popover whose opening is tracked closes by any path. Newly tracked: glossary search, category, letter and clear actions; OperatorX category tab, workload, metric, GPU, baseline pickers, chart GPU toggles, case detail open/close and the roofline, pairwise, speedup and metric-vs-size controls; PowerX measured-metric selects; video CI run, source, artifact, open-by-id, view switch, tradeoff, bundle, slot, phase and economics inputs; shared data-table search typing; chart export menu opened; date picker Cancel and in-popover Go to latest; the 12 untracked AgentX explorer PNG exports (agentic_workload_export_png with chart); CollectiveX KV page and op toggles; replay reset; request-timeline wheel zoom and double-click reset; AgentX conversation, dataset conversation and eval sample searches; historical waterfall series; close events for quick filters, legend points, log, power telemetry, replay, share and OperatorX case dialogs. 中文:新增两个共享 hook。useSearchTracking 在输入停顿后发送 <section>_searched,只带 query_length,不发送搜索文本;useDialogCloseTracking 在已有打开埋点的对话框或弹层关闭时(任何关闭方式)发送 <section>_closed 和 duration_ms。新增埋点覆盖:术语表搜索、分类、字母和清除操作;OperatorX 分类标签、workload、指标、GPU、基线选择器、图表内 GPU 切换、用例详情打开与关闭,以及 roofline、pairwise、speedup、metric-vs-size 控件;PowerX 实测指标选择;视频基准的 CI run、来源、artifact、按 ID 打开、视图切换、tradeoff、bundle、slot、phase 和成本输入;共享数据表搜索输入;图表导出菜单打开;日期选择器的取消和弹层内“跳到最新”;AgentX explorer 中 12 个未埋点的 PNG 导出;CollectiveX KV 的 page 和 op 切换;回放重置;请求时间线滚轮缩放和双击重置;AgentX 会话、数据集会话和评测样本搜索;历史趋势瀑布图系列选择;以及快速筛选、图例点表、日志、功耗遥测、回放、分享和 OperatorX 用例对话框的关闭事件。 * feat(analytics): track the remaining dialog closes Send *_closed with duration_ms through useDialogCloseTracking for the TCO model dialog (tco_model_dialog_closed with source), the eval samples drawer (evaluation_samples_closed), both expandable chart dialogs (agentic_chart_closed with title, agentic_workload_chart_closed), the D3 chart card dialog (<prefix>_chart_closed with title), site search (header_search_closed) and the scale-out and scale-up topology dialogs (gpu_specs_topology_closed and gpu_specs_scaleup_topology_closed with gpu). 中文:通过 useDialogCloseTracking 为其余对话框补充关闭埋点(*_closed,带 duration_ms):TCO 模型对话框(tco_model_dialog_closed,带 source)、评测样本抽屉(evaluation_samples_closed)、两个可展开图表对话框(agentic_chart_closed 带 title,agentic_workload_chart_closed)、D3 图表卡片对话框(<prefix>_chart_closed 带 title)、站内搜索(header_search_closed),以及横向扩展和纵向扩展拓扑对话框(gpu_specs_topology_closed 和 gpu_specs_scaleup_topology_closed,带 gpu)。 * feat(analytics): add dashboard context and placement to events Chart PNG, CSV and MP4 exports, the export menu and zoom reset now send chart plus the dashboard selection (model, sequence, precision, gpu_count) for every ChartButtons prefix. ChartButtons, ChartSection and D3ChartCard take an analyticsContext built with selectionAnalyticsContext(). D3 chart cards report their file name as chart instead of a generated id. inference_*_selected events (model, sequence, precision, GPU, y-axis, scale, cost tier, run, PowerX tab/boundary/energy/measured metric, power breakdown source, chip compare and power series) carry a model/sequence/precision snapshot from the new useInferenceAnalyticsContext() hook. share_popover_opened, share_link_copied, share_popover_closed and social_share_* send view, route_template and the selected model. Header, mobile menu, footer, landing hero and sections, blog article body, glossary, compare and chips pages carry data-analytics-placement, so outbound_link_clicked gets placement. Header nav, language, menu, star, footer, landing CTA, curated view, supporter and compare-hero link events send placement too. 中文:所有 ChartButtons 前缀的图表 PNG、CSV、MP4 导出、导出菜单和缩放重置事件,现在都带上 chart 以及仪表板当前选择(model、sequence、precision、gpu_count)。ChartButtons、ChartSection 和 D3ChartCard 接收由 selectionAnalyticsContext() 生成的 analyticsContext。D3 图表卡片用文件名而不是自动生成的 id 作为 chart。inference_*_selected 事件(模型、序列、精度、GPU、Y 轴、刻度、成本档位、运行、PowerX 标签/边界/能耗/实测指标、功耗分解来源、芯片对比和功耗序列)通过新的 useInferenceAnalyticsContext() hook 带上 model/sequence/precision 快照。share_popover_opened、share_link_copied、share_popover_closed 和 social_share_* 发送 view、route_template 和所选模型。页头、移动菜单、页脚、落地页首屏和各区块、博客正文、术语表、对比页和芯片页添加了 data-analytics-placement,因此 outbound_link_clicked 会带上 placement。页头导航、语言切换、菜单、Star、页脚、落地页 CTA、精选视图、支持者和对比首屏链接事件也会发送 placement。 * refactor(analytics): standardize event property keys Event properties now use one snake_case name per concept. hw, hwKey, hw_key, hardware and sku become gpu, and the per-dollar PNG failure's a/b become gpus. gpuCount becomes gpu_count. yAxisMetric (with its label and group) becomes metric, metric_label and metric_group. queryLength becomes query_length. column+dir and sortKey+sortDir become sort_key+sort_dir, and gpu_power_table_sorted sends sort_dir instead of ascending. fileName and filename become file_name. Boolean toggle state (expanded, visible, checked, open, hideSmall, splitArch) becomes enabled. The remaining camelCase keys become snake_case, and the precision PNG failure sends precisions. Only keys passed to tracking calls changed. A new test fails if any tracking call passes a camelCase or legacy key. PostHog insight 7623452 (most common y-axis metrics) reads yAxisMetric and needs switching to metric. 中文:事件属性统一为每个概念一个 snake_case 名称。hw、hwKey、hw_key、hardware 和 sku 改为 gpu,按美元性能 PNG 失败事件的 a/b 改为 gpus。gpuCount 改为 gpu_count。yAxisMetric 及其 label、group 改为 metric、metric_label、metric_group。queryLength 改为 query_length。column+dir 和 sortKey+sortDir 改为 sort_key+sort_dir,gpu_power_table_sorted 改为发送 sort_dir 而不是 ascending。fileName 和 filename 改为 file_name。布尔开关状态(expanded、visible、checked、open、hideSmall、splitArch)改为 enabled。其余 camelCase 键改为 snake_case,精度 PNG 失败事件改为发送 precisions。只修改传给埋点调用的键。新增测试,若任何埋点调用使用 camelCase 或旧键名则失败。PostHog 洞察 7623452(most common y-axis metrics)读取 yAxisMetric,需要改为 metric。 * fix(analytics): mark server events profile-less and name the CLI client captureServer now sends $process_person_profile: false with every server event, so no server event creates a PostHog person. feedback_submission_failed and the compare PNG render failures send route_template. cli_api_request_received had no client property, so it showed as empty in PostHog. It now sends client (cli or skill) read from the inferencex-<client>/<version> user agent, replacing source, and route_template instead of route. The feedback route digest in the API route catalog is refreshed. Only the analytics properties changed, and the API contract is unchanged. 中文:captureServer 现在为每个服务端事件发送 $process_person_profile: false,服务端事件不会再创建 PostHog 用户档案。feedback_submission_failed 和对比页 PNG 渲染失败事件发送 route_template。cli_api_request_received 之前没有 client 属性,在 PostHog 中显示为空;现在从 inferencex-<client>/<version> User-Agent 解析出 client(cli 或 skill)替代 source,并用 route_template 替代 route。已刷新 API 路由目录中反馈路由的摘要。仅埋点属性变化,API 契约不变。 * docs(analytics): document dedupe helpers, placement, hooks and canonical keys The Analytics section of docs/architecture.md now covers trackOncePerPageview/trackOncePerSession, data_query_failed, the data-analytics-placement attribute, useSearchTracking, useDialogCloseTracking, chart and inference selection context, the canonical property keys and the server event defaults. AGENTS.md gets a short note under Analytics Requirement. 中文:docs/architecture.md 的 Analytics 部分补充了 trackOncePerPageview/trackOncePerSession、data_query_failed、data-analytics-placement 属性、useSearchTracking、useDialogCloseTracking、图表与推理选择上下文、规范属性键以及服务端事件默认值。AGENTS.md 在 Analytics Requirement 下增加了简短说明。 * fix(analytics): report the displayed GPU and real zoom direction Topology dialog close events (gpu_specs_scaleup_topology_closed, gpu_specs_topology_closed) now send the GPU on screen after Prev/Next navigation instead of the card that opened the dialog. The agentic timeline zoom event derives its direction from the same deltaY-or-deltaX value the zoom step uses, via a shared timelineWheelZoomDirection helper, so horizontal-only Shift+wheel gestures are no longer misreported. 中文:拓扑图弹窗的关闭事件改为上报经上一个/下一个切换后当前显示的 GPU, 而不是打开弹窗的那张卡片。agentic 时间线的缩放事件与缩放本身共用同一个 方向判断(先取 deltaY,为 0 时取 deltaX),只有水平滚动的 Shift+滚轮手势 不再被误报方向。 * fix(analytics): drop pending timeline zoom event on unmount The Shift+wheel zoom event is debounced by 500ms, but the timer was never cleared on unmount. Leaving the page mid-gesture could send inference_agentic_timeline_zoomed after navigation, attributed to the next page. The timer is now cleared on unmount. Regression tests cover the timeline and the existing useSearchTracking cleanup. 中文:时间线 Shift+滚轮缩放事件有 500ms 防抖,但组件卸载时未清除定时器,导致离开页面后仍可能发送 inference_agentic_timeline_zoomed 并被计入下一个页面。现在卸载时会清除该定时器,并为时间线和 useSearchTracking 的卸载清理补充了回归测试。 * fix(analytics): track timeline double-click reset only when zoomed Double-clicking an unzoomed request timeline sent inference_agentic_timeline_zoom_reset for a no-op reset. 中文:请求时间线仅在已缩放时记录双击重置。未缩放时双击会发送 inference_agentic_timeline_zoom_reset,属于无效重置。 * test(e2e): rebuild the PowerX All-in URL instead of reading the address bar url-state strips share params from the address bar with a deferred replaceState, but Next's HistoryUpdater writes its canonical URL (with the params) when the app router hydrates. On a cold load hydration finishes after the strip and restores the params; on a warm reload it finishes first and the strip sticks. The test reloaded and then read cy.location() to add i_best/i_xmode, so it only kept the All-in view when hydration lost the race (often in loaded CI, never locally) and otherwise visited the default Measured J/token view, which has no rows. Every load now builds its URL from the test's own params. 中文:PowerX All-in 测试改为自行拼接 URL,不再读取地址栏。url-state 会延迟用 replaceState 去掉地址栏中的分享参数,而 Next 的 HistoryUpdater 在 App Router hydration 时会写回带参数的规范 URL。冷加载时 hydration 晚于清理,参数被恢复; 热重载时 hydration 先完成,参数被清掉。原测试 reload 后读取 cy.location() 再追加 i_best/i_xmode,只有 hydration 落后时(CI 负载高时常见,本地从不出现)才停留在 All-in 视图,否则会打开默认的实测 J/token 视图,表格为空。现在每次加载都由测试 自身的参数拼出 URL。 * test(e2e): wait for closing selects to refocus their trigger before typing Radix Select and Popover move focus back to the trigger once the close animation ends. Tests that typed right after picking an option could lose that race: focus jumped to the trigger mid-type, so the profit estimator's clear() was dropped and '9' landed after '2.31' (Firefox, where motion is not reduced), and the video tradeoff cost fields lost their keystrokes so no cost point appeared (component runs, which also animate). Wait for the trigger to hold focus first. 中文:关闭下拉框后,先等待焦点回到触发按钮再输入。Radix Select 和 Popover 在关闭 动画结束后会把焦点还给触发按钮。选择选项后立即输入的测试可能与之竞争:输入途中 焦点跳回触发按钮,导致利润估算器的 clear() 失效,'9' 被追加到 '2.31' 之后 (Firefox 未启用减少动画),视频权衡图的成本输入框也丢失按键,成本点无法出现 (组件测试同样有动画)。现在先确认触发按钮已获得焦点。 * test(e2e): let CollectiveX view switches settle before the next interaction Two races followed showView(). The Series view's longer legend labels narrow the plot, and the ResizeObserver re-render one frame later dismisses any tooltip pinned before it, so 'pins a compact tooltip' clicked a point too early about one run in three. The view select also refocuses its trigger after closing, which dismissed the kernel-mode menu opened right after it. showView now waits for the trigger to regain focus and for the chart SVG to match its container width. 中文:CollectiveX 切换视图后先等待状态稳定再进行下一步操作。showView() 之后有两处 竞争:Series 视图的图例标签更长,会压窄图表,一帧后 ResizeObserver 触发的重绘会 关闭此前固定的提示框,因此 "pins a compact tooltip" 约每三次就有一次点得过早; 视图下拉框关闭后还会把焦点还给触发按钮,从而关闭紧接着打开的 kernel 模式菜单。 现在 showView 会等待触发按钮重新获得焦点,并等待图表 SVG 宽度与容器一致。 * test(e2e): delay only the landing page's own scripts in the hydration test The hydration test registered a response callback on every _next/static script. A chunk the previous test's /zh/quotes page was still loading matched it, the visit aborted that request, and Cypress failed the test because the callback lost its browser connection. Reproduced in Linux Firefox (5 of 15 runs on 3907aac). The delay now applies only to scripts whose referer is the page this test opens. 中文:首页水合测试只延迟本测试打开页面的脚本。原先对所有 _next/static 脚本注册了 响应回调,上一个测试的 /zh/quotes 页面仍在加载的 chunk 也会命中;visit 中止该请求后, Cypress 因回调失去浏览器连接而判定失败。现按 referer 只延迟当前页面的脚本。 * fix(url-state): keep share params in the address bar after load url-state.ts stripped share params at setTimeout(0) through the pristine History prototype, then Next's hydration history write restored its canonical URL with them. Which ran last depended on hydration timing, so a deep link sometimes lost its params and a reload dropped the view. That flaked the TPU deep-link, Jalapeño reload and PowerX share tests. The strip is gone: params are still read once into the snapshot, and the loaded URL now stays visible, so reloading a share link reopens it. Docs and unit tests follow. 中文:加载后保留地址栏中的分享参数。url-state.ts 在 setTimeout(0) 中通过原生 History 原型移除分享参数,随后 Next 水合时又写回带参数的规范 URL;两者先后取决于水合 时机,深链接有时丢失参数、刷新后视图丢失,导致 TPU 深链接、Jalapeño 刷新和 PowerX 分享测试不稳定。现移除该清理:参数仍在加载时读入快照一次,地址栏保留原 URL,刷新分享链接 即可还原视图。同步更新文档与单元测试。 * fix(operatorx): drop tracking for the GPU selector removed on master Master removed the redundant OperatorX GPU selector (#1561); the rebase had restored it with its operatorx_gpus_changed tracking. 中文:移除 master 已删除的 GPU 选择器的追踪。master 已移除 OperatorX 中多余的 GPU 选择器(#1561),变基时该选择器及其 operatorx_gpus_changed 追踪被误恢复。
hbarclay
added a commit
that referenced
this pull request
Oct 29, 2026
Keeps the intent of master's OperatorX changes in this PR's additions: - #1561 (one GPU control): no GPU multi-select; the controls row is Workload, Devices, Metric, Baseline, and the chart legends offer the GPUs with results at the selected split - #1562 (Roofline first): Model View's op dialog also shows Roofline before Metric vs size; the OperatorX e2e spec now expects Roofline to mount first and scrolls to Metric vs size, which mounts on approach - #1555 (analytics): the Devices selector and Model View's model, metric, precision, GPU, op and fold controls are tracked with canonical keys - #1546 (compression, ETag): the public data API passes the request to cachedJson - route catalog digests, views registry and skills reference merged Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
The OperatorX GPU multi-select and the per-chart hardware legends toggled the same selection state (
pickedinComparisonDashboard), so the page had two controls for one thing. This removes the multi-select and keeps the legends as the single way to pick GPUs. The Baseline dropdown still follows the current selection, and the controls row is now three columns (Workload, Metric, Baseline).No API change: the page-owned
/api/v1/operatorx/compareroute and itsdistributionHardwareparameter are unchanged.docs/operatorx.mdnow maps that parameter to the legend toggles, and the Cypress assertion that looked for 950PR in the selector now checks the chart legend.AI model disclosure
Prepared with Claude Opus 5.5 (
claude-opus-5-5) in Claude Code: code change, test and docs update, commit, and PR description. No delegated agents.中文
OperatorX 的 GPU 多选框与各图表的硬件图例控制同一个选择状态(
ComparisonDashboard中的picked),页面上因此有两个功能重复的控件。本 PR 移除多选框,仅保留图例作为选择 GPU 的唯一入口。Baseline 下拉框仍跟随当前选择,控件行改为三列(Workload、Metric、Baseline)。API 无变化:页面专属的
/api/v1/operatorx/compare接口及其distributionHardware参数保持不变。docs/operatorx.md已将该参数对应到图例切换;原先在选择器中检查 950PR 的 Cypress 断言改为检查图表图例。Note
Low Risk
Presentation-only control consolidation; GPU selection state and compare API parameters are unchanged.
Overview
Removes the GPUs multi-select from the OperatorX controls row because it duplicated the same
pickedhardware state already driven by per-chart GPU legend toggles. Users now change which GPUs are in view only via chart legends; Workload, Metric, and Baseline remain in a three-column control bar, with Baseline options still limited to the currently selected hardware.Docs relabel the
distributionHardwareAPI mapping from “GPUs” to “GPU legend toggles.” Cypress asserts 950PR visibility on the metric-vs-size chart legend instead of#operatorx-hardware. No change to/api/v1/operatorx/compareordistributionHardwarebehavior.Reviewed by Cursor Bugbot for commit bb1f0bf. Bugbot is set up for automated code reviews on this repo. Configure here.