Repository navigation
feat(analytics): cover untracked interactions, add event context and standardize keys / 统计:覆盖未追踪的交互,补充事件上下文并统一键名 - #1555
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 28, 2026
Merged
adibarra
force-pushed
the
fix/analytics-pageviews
branch
from
October 29, 2026 02:06
1125679 to
081236f
Compare
adibarra
force-pushed
the
feat/analytics-coverage
branch
from
October 29, 2026 02:06
c78676b to
41b32c1
Compare
adibarra
force-pushed
the
fix/analytics-pageviews
branch
from
October 29, 2026 05:54
23bbcfa to
cb98d5b
Compare
adibarra
force-pushed
the
feat/analytics-coverage
branch
from
October 29, 2026 05:54
c2a58a6 to
019da1b
Compare
adibarra
force-pushed
the
fix/analytics-pageviews
branch
from
October 29, 2026 06:03
cb98d5b to
e1bff67
Compare
adibarra
force-pushed
the
feat/analytics-coverage
branch
from
October 29, 2026 06:03
019da1b to
ae282c7
Compare
adibarra
force-pushed
the
fix/analytics-pageviews
branch
from
October 29, 2026 06:15
e1bff67 to
c1076d7
Compare
adibarra
force-pushed
the
feat/analytics-coverage
branch
from
October 29, 2026 06:15
ae282c7 to
dc3088a
Compare
adibarra
force-pushed
the
fix/analytics-pageviews
branch
3 times, most recently
from
October 29, 2026 06:32
0425bdd to
be33d38
Compare
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。
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 用例对话框的关闭事件。
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)。
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。
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。
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 契约不变。
…cal 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 下增加了简短说明。
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+滚轮手势 不再被误报方向。
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 的卸载清理补充了回归测试。
Double-clicking an unzoomed request timeline sent inference_agentic_timeline_zoom_reset for a no-op reset. 中文:请求时间线仅在已缩放时记录双击重置。未缩放时双击会发送 inference_agentic_timeline_zoom_reset,属于无效重置。
…ss 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。
…yping 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 未启用减少动画),视频权衡图的成本输入框也丢失按键,成本点无法出现 (组件测试同样有动画)。现在先确认触发按钮已获得焦点。
…action 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 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 只延迟当前页面的脚本。
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,刷新分享链接 即可还原视图。同步更新文档与单元测试。
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 67dc036. Configure here.
adibarra
force-pushed
the
feat/analytics-coverage
branch
from
October 29, 2026 08:03
67dc036 to
8bd1b1c
Compare
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.

Summary
Part 9 of the stack split from #1530. Review and merge in order. CI only runs on PRs that target
master, so this layer was verified locally (below).Stack (merge in order):
An audit of all 848 event names in the code against 90 days of PostHog data found three kinds of problem. Busy areas sent nothing: the glossary had about 9.9K pageviews and no events, and OperatorX had 2 event types. Share and export events carried no context. Property names were inconsistent: GPU appeared under 9 keys and 49 keys were camelCase.
useSearchTrackingsendsquery_lengthonly, never the text, anduseDialogCloseTrackingsends*_closedwithduration_ms.chart,model,sequence,precisionandgpu_count.view,route_templateandmodel.inference_*_selectedevents include a model, sequence and precision snapshot.placement.data-analytics-placementattribute fillsplacementonoutbound_link_clicked.inference_chart_viewandinference_power_timeline_loadedfire once per page view.blog_read_milestoneandinference_replay_export_unavailablefire once per session.data_query_failedwithendpoint,statusandroute_template, once per query per page view.$process_person_profile: false.cli_api_request_receivednow sendsclient(cliorskill) androute_templateinstead ofsourceandroute.gpu/gpus,gpu_count,metric,query_length,sort_key/sort_dir,file_name,placement,enabled. A test fails on camelCase or old keys in tracking calls. The convention is documented indocs/architecture.mdand AGENTS.md.Action needed after merge. Renamed keys stop old PostHog queries from matching new events. The saved insight "most common y-axis metrics" reads
yAxisMetricfrominference_gpu_selection_settledand must readmetricinstead. The other saved insights read keys that did not change. Separately, two insights already reference events that no longer fire: "feature usage" useseval_high_contrast_toggledandgpu_timeseries_high_contrast_toggled, and "github star buttons" usesgithub_star_modal_starredandfooter_star_cta_clicked.Validation details
On a fixtures build in Chrome, with every lower-layer fix merged in: 74 of 75 E2E specs (900 of 902 tests) and all 538 component tests pass. The failing spec,
powerx-compare, fails the same way locally on themasterbase (3907aac) and passed in CI on #1545, so it is a local environment issue outside this stack. Earlier, before the lower-layer fixes, the full E2E suite (75 specs) and component suite passed. Two E2E tests needed Cypress's built-in retry: a fixture-server 500 inttft-x-axis-toggle, and an existingcollectivextooltip flake in code this PR doesn't touch. Lint, format, typecheck and the full unit suite (524 files) pass.AI model disclosure
anthropic/claude-opus-5-5(runtime-exposed identifier for the coordinating agent).PR checklist
inferencex-skillschanges (no filters or views change)/zhsiblingdocs/chinese-copy.md(no user-visible copy changes)中文
本 PR 为从 #1530 拆分的 stack 中的第 9 部分,请按顺序审核与合并。CI 只在以
master为目标的 PR 上运行,因此本层在本地验证(见下)。对照代码中全部 848 个事件名与 PostHog 近 90 天的数据,发现三类问题:访问量较大的区域没有事件(术语页约 9.9K 次 pageview 却没有任何事件,OperatorX 只有 2 种事件);分享与导出事件不带上下文;属性命名不一致(GPU 有 9 种键名,49 个键为 camelCase)。
useSearchTracking只发送query_length,不发送文本;useDialogCloseTracking发送带duration_ms的*_closed。chart、model、sequence、precision与gpu_count。view、route_template与model。inference_*_selected附带 model、sequence、precision 快照。placement。data-analytics-placement属性为outbound_link_clicked补充placement。inference_chart_view与inference_power_timeline_loaded每次页面浏览只触发一次;blog_read_milestone与inference_replay_export_unavailable每个会话只触发一次。data_query_failed(含endpoint、status、route_template),每次页面浏览中每个查询只发送一次。$process_person_profile: false;cli_api_request_received改为发送client(cli或skill)与route_template,取代source与route。gpu/gpus、gpu_count、metric、query_length、sort_key/sort_dir、file_name、placement、enabled;若追踪调用中出现 camelCase 或旧键名,测试会失败。规范已写入docs/architecture.md与 AGENTS.md。合并后需处理。 键名变更后,旧的 PostHog 查询将匹配不到新事件。已保存的 “most common y-axis metrics” 从
inference_gpu_selection_settled读取yAxisMetric,需改为metric;其他已保存的 insight 读取的键名未变。另有两个 insight 已在引用不再触发的事件:“feature usage” 使用eval_high_contrast_toggled与gpu_timeseries_high_contrast_toggled,“github star buttons” 使用github_star_modal_starred与footer_star_cta_clicked。验证:合入下层修复后,在 fixture 构建上用 Chrome 运行,75 个 E2E spec 中 74 个通过(902 个测试中 900 个通过),538 个组件测试全部通过。未通过的
powerx-compare在本地master基线(3907aac2)上同样失败,而在 #1545 的 CI 中通过,属于本地环境问题,与本 stack 无关。合入下层修复前,完整 E2E(75 个 spec)与组件测试套件均已通过。有两个 E2E 测试依靠 Cypress 内置重试通过:ttft-x-axis-toggle中 fixture 服务器返回 500,以及本 PR 未改动的collectivex提示框原有的不稳定问题。lint、格式、类型检查与完整单元测试(524 个文件)均通过。AI 模型使用说明:协调 agent 使用
anthropic/claude-opus-5-5(运行环境提供的标识),负责对照 PostHog 审计事件覆盖、规划并整合改动以及撰写提交与 PR 文本;委派的 worker 子 agent 在同一环境中实现追踪改动并运行验证,其确切模型标识无法获取,因此无法确认。Note
Medium Risk
Broad telemetry renames break existing PostHog queries, and visible share URLs change how filter state survives reload versus in-session edits.
Overview
This PR widens PostHog coverage and standardizes how events are shaped across the app, with docs and tests to keep new work aligned.
New and richer events. Previously silent areas (glossary filters/search, datasets search, CollectiveX KV controls, dialog closes, chart export/share, header/footer nav, etc.) now call
track()or shared hooks:useSearchTracking(query_lengthonly),useDialogCloseTracking(duration_ms), andselectionAnalyticsContextonChartButtons/ chart sections so exports and zoom actions carrychart,model,sequence,precision, andgpu_count.placementcomes fromanalyticsPlacement()/placementFor()on major regions (header, footer, blog, glossary, compare, chips). Compare page views and several mount-time events usetrackOncePerPageview/trackOncePerSessionto avoid StrictMode and remount double counts.Canonical property keys. Tracking calls migrate from camelCase and legacy names (
hw,expanded,yAxisMetric, …) to snake_case (gpu/gpus,metric,enabled,sort_key/sort_dir,file_name, …), enforced byevent-property-keys.test.ts. ServertrackServerpaths gainroute_templatewhere relevant.URL share state (documented behavior change). Architecture and state-ownership docs now describe keeping share query params in the address bar after load (no post-hydration strip), so reloads reopen the same view; E2E such as PowerX compare builds explicit chart URLs instead of relying on a clean bar.
Cypress adds analytics assertions and stabilizes Radix refocus flakes (wait for combobox/button focus before typing).
Reviewed by Cursor Bugbot for commit 8bd1b1c. Bugbot is set up for automated code reviews on this repo. Configure here.