Repository navigation
fix(ux): remove layout shifts and explain blocked legend toggles / 消除布局偏移并说明被禁用的图例切换 - #1551
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 28, 2026
Merged
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6411061. Configure here.
adibarra
force-pushed
the
fix/client-bundle-weight
branch
from
October 29, 2026 02:06
eff686b to
c090b03
Compare
adibarra
force-pushed
the
fix/layout-shift-ux
branch
from
October 29, 2026 02:06
8f5aa4e to
35b6d15
Compare
adibarra
force-pushed
the
fix/client-bundle-weight
branch
from
October 29, 2026 05:54
c090b03 to
aade255
Compare
adibarra
force-pushed
the
fix/layout-shift-ux
branch
from
October 29, 2026 05:54
35b6d15 to
ef3f544
Compare
adibarra
force-pushed
the
fix/client-bundle-weight
branch
from
October 29, 2026 06:03
aade255 to
4023e11
Compare
adibarra
force-pushed
the
fix/layout-shift-ux
branch
from
October 29, 2026 06:03
ef3f544 to
51da156
Compare
adibarra
force-pushed
the
fix/client-bundle-weight
branch
from
October 29, 2026 06:15
4023e11 to
96b2e47
Compare
adibarra
force-pushed
the
fix/layout-shift-ux
branch
from
October 29, 2026 06:15
51da156 to
4e92f3d
Compare
adibarra
force-pushed
the
fix/client-bundle-weight
branch
from
October 29, 2026 06:19
96b2e47 to
5e40569
Compare
adibarra
force-pushed
the
fix/layout-shift-ux
branch
from
October 29, 2026 06:19
4e92f3d to
1ce3c49
Compare
…nd toggles Loading states keep the height of the content they replace. CollectiveX fills its stats row and chart area before data arrives and tolerates missing percentiles. The agentic point detail, the calculator and profit displays and the evaluation table get placeholders of their final height, and useHeldHeight holds a section's last height through a refetch. OperatorX defers its heavy comparison inputs and keeps the last selected GPU selected. When the engine exclusion blocks enabling a hardware entry, the legend item shows why with a not-allowed cursor and an accessible description, and its checkbox stays reachable by keyboard. 中文:加载状态保持所替换内容的高度。CollectiveX 在数据到达前预留统计行与 图表区域,并兼容缺失的分位数。智能体数据点详情、计算器与利润展示以及评测 表格使用与最终高度一致的占位,useHeldHeight 在重新请求期间保持区块上一次的 高度。OperatorX 延后处理开销较大的对比输入,并始终保留最后一个已选 GPU。 当引擎互斥规则阻止启用某个硬件时,图例项通过禁止光标与无障碍描述说明原因, 其复选框仍可通过键盘访问。
The 50px spacer on /inference/agentic/[id] only rendered while the metrics and request-chart queries loaded. For a point with one metric source and no warmup phase the toolbar never mounts, so the spacer unmounted on settle and the cards jumped up. Both inputs come from client queries and cannot be known earlier, so the slot now stays reserved whenever the toolbar is hidden. A production sample showed 46 of 46 points have a warmup phase, so the toolbar remains the usual outcome. The decision is extracted into showMetricSourceToolbar with a unit test. 中文:/inference/agentic/[id] 页面上的 50px 占位只在指标和请求图表查询加载期间显示。若数据点只有一个指标来源且没有 warmup 阶段,工具栏不会挂载,占位在查询完成后被移除,导致下方卡片上移。两项输入都来自客户端查询,无法提前得知,因此现在只要工具栏隐藏就保留该占位。生产数据抽样显示 46 个数据点全部带有 warmup 阶段,工具栏仍是常见情况。判断逻辑提取为 showMetricSourceToolbar 并补充单元测试。
The chart model memo still depended on the urgent GPU list, so a workload change rebuilt it during the urgent render. Every chart card then re-rendered with the old comparison view and a toggle bound to the new GPU list. The model now depends only on deferred inputs, and the legend toggle resolves clicks against the GPU list the charts show. A jsdom test records each model the charts receive across a workload switch. 中文:图表 model 的 memo 仍依赖紧急更新的 GPU 列表,切换工作负载时会在紧急渲染中 重建,所有图表卡片因此以旧的对比视图和绑定新 GPU 列表的 toggle 重新渲染。现在 model 只依赖延迟快照中的输入,图例切换也按图表当前展示的 GPU 列表处理点击。新增 jsdom 测试,记录切换工作负载时图表收到的每个 model。
Remove the useDeferredValue chart snapshot. Legend toggles, the GPU control, the charts and case detail mixed deferred and live selections, which could blank the charts or open the wrong case. Keep the min-h-svh loading card, memoized chart cards and the last-GPU toggle guard. Tests now cover workload switches, toggling and inspect against one state. 中文:移除 useDeferredValue 图表快照。图例切换、GPU 控件、图表和用例详情混用了延迟与实时的选择,可能导致图表空白或打开错误的用例。保留 min-h-svh 加载卡片、图表卡片的 memo 以及保留最后一个 GPU 的切换逻辑。测试改为验证切换负载、切换 GPU 和查看详情时使用同一状态。
adibarra
force-pushed
the
fix/layout-shift-ux
branch
from
October 29, 2026 06:24
1ce3c49 to
a257455
Compare
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 7 of the stack split from #1530. Review and merge in order. CI only runs on PRs that target
master, so each layer was verified locally; the combined change passed full CI on #1530.Stack (merge in order):
Vercel Speed Insights showed poor CLS on /collectivex (0.81), /inference/agentic/[id] (0.61), /calculator/[model] (0.32), /operatorx (0.30) and the profit estimator.
useHeldHeightkeeps the height during reloads. On agentic point detail, the metric-source toolbar slot is always reserved; when no toolbar mounts (single source, no warmup, which no current point has) a 50px gap remains instead of a jump.useDeferredValuesplit for interaction speed was removed after review found it let charts, legend and case detail read different snapshots.)aria-disabledandaria-describedby. The blocking rule is unchanged.Validation details
Targeted Cypress (Chrome): chart-legend component 26/26, collectivex 29/29, throughput-calculator 38/38, fleet-lifecycle 32/32. Lint, format, typecheck and the full unit suite pass on this layer.
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(Chinese maintainer review pending)中文
本 PR 为从 #1530 拆分的 stack 中的第 7 部分,请按顺序审核与合并。CI 只在以
master为目标的 PR 上运行,因此每一层都在本地验证;整体改动已在 #1530 上通过完整 CI。Vercel Speed Insights 显示 /collectivex(0.81)、/inference/agentic/[id](0.61)、/calculator/[model](0.32)、/operatorx(0.30)与 profit estimator 的 CLS 较差。
useHeldHeight在重新加载时保持高度。agentic 数据点详情始终为指标来源工具栏预留位置;不显示工具栏时(单一来源且无 warmup,目前没有数据点属于这种情况)保留 50px 空白,而不是发生跳动。useDeferredValue拆分已移除,因为审查发现它会让图表、图例与详情读取不同的状态快照。)aria-disabled与aria-describedby的 sr-only checkbox,在视觉上和屏幕阅读器中说明原因;禁用规则本身不变。验证:定向 Cypress(Chrome):chart-legend 组件 26/26、collectivex 29/29、throughput-calculator 38/38、fleet-lifecycle 32/32。本层的 lint、格式、类型检查与完整单元测试均通过。
AI 模型使用说明:协调 agent 使用
anthropic/claude-opus-5-5(运行环境提供的标识),负责审计、规划与整合改动、拆分 stack 以及撰写提交与 PR 文本;委派的子 agent 在同一环境中实现各部分、构建 stack 并运行验证,其确切模型标识无法获取,因此无法确认。Note
Medium Risk
Touches widely used loading UX and inference filter legend behavior, but changes are mostly presentational plus defensive chart formatting; OperatorX GPU selection logic could affect comparison workflows if mis-specified.
Overview
Targets poor CLS on calculator, CollectiveX, agentic detail, OperatorX, and profit views by reserving layout during loading. New
useHeldHeightpinsmin-heighton profit controls and root while data refetches; throughput calculator, evaluation table skeletons, and agentic detail (loading placeholders, always-reserved metric-source toolbar slot viashowMetricSourceToolbar) follow the same idea. CollectiveX and OperatorX loading cards usemin-h-svh, and CollectiveX stats show placeholders while runs load.Inference scatter legend now surfaces engine-comparison blocks:
blockedComparisonTogglesfeedsblockedReasonon legend items witharia-disabled,aria-describedby, tooltips, andcursor-not-allowedwhile clicks still fire for existing toast behavior; vLLM/SGLang consent paths stay unblocked.CollectiveX / swap charts move latency percentile formatting to
formatCollectiveXLatencyPercentiles(null percentiles render as-instead of crashing tooltips) and omit swap points when the selected percentile is missing or non-finite.OperatorX adds
toggleHardwareSelectionso the last selected GPU cannot be cleared (fixing empty selection after workload switches), with dashboard integration tests;VizCardis memoized.Reviewed by Cursor Bugbot for commit a257455. Bugbot is set up for automated code reviews on this repo. Configure here.