Commit 25fb7c4
fix(test): 同步 compact 轮盘半径与历史命中区契约到当前源码 (Project-N-E-K-O#1616)
* fix(test): 同步 compact 轮盘半径与历史命中区契约到当前源码
test_react_chat_window_static.py 两处断言落后于源码,导致 clean checkout 上预先失败:
- 轮盘 slot transform 的 translateX(91.92px) 已在 Project-N-E-K-O#1599 抽成
var(--compact-tool-wheel-orbit-radius),Project-N-E-K-O#1605 又把值回调到 80px。
断言改为匹配变量形式,旋转角度不变。
- 历史消息/操作栏的 data-compact-hit-region-id 已在 Project-N-E-K-O#1604 用
historyInteractive 三元门控(关闭态不再占命中区),断言同步加门控;
history:preview 仍为静态字面量,保持不变。
源码均为有意改动,仅测试漏更新,与本次 compact surface drag 无关。
uv run pytest tests/unit/test_react_chat_window_static.py -> 25 passed
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test: 补强 compact 轮盘半径与历史命中区契约断言
回应 Codex review 的两条 P2:
- orbit 半径变量化后丢失了对数值的保护:补
--compact-tool-wheel-orbit-radius: 80px 在 fan_block 的直接断言,
防止变量值回退(如 45.96px)而测试仍通过。
- 命中区真正的门是 data-compact-hit-region 属性(collector 用
querySelectorAll('[data-compact-hit-region="true"]') 选元素,id 缺失时
合成),仅断言 id 门控不够:补断言 messages / controls 块的
data-compact-hit-region 与 -kind 也被 historyInteractive 门控。
uv run pytest tests/unit/test_react_chat_window_static.py -> 25 passed
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Hongzhi Wen <cartabio.coder1@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a1d1ce9 commit 25fb7c4
1 file changed
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| |||
776 | 777 | | |
777 | 778 | | |
778 | 779 | | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
779 | 788 | | |
780 | 789 | | |
781 | 790 | | |
| |||
789 | 798 | | |
790 | 799 | | |
791 | 800 | | |
792 | | - | |
793 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
794 | 807 | | |
795 | 808 | | |
796 | 809 | | |
| |||
0 commit comments