fix(canvas): 初始默认视口不再落盘(否则打开画布会跳过 doFit)
根因(iwb-picker 8 条超时的真因,实测确认):
useViewportPersistence 在首帧就把 useState 的初始视口 {x:40,y:30,scale:1} 写进
iwb_viewport / iwb_viewport_<ws>。之后打开画布时 loadWsInto 读到这份「已保存视口」,
就跳过了 doFit ⇒ 节点停在默认位置(实测 g1 在屏幕 x=120,被 318px 左停靠栏盖住),
点击落到浏览器插件的空状态层 .iwb-cwv-empty 上,Playwright 一直重试到 30s 超时。
修法:
- 首帧 effect 只标记 mounted,不落盘;只有发生真实视口变化(fit / 用户平移缩放)后才写
- flushViewport(beforeunload 兜底)同样要求「发生过真实变化」
验证:
- iwb-picker 9/9 全绿(此前 8 红)
- verify:ci 全绿(facts 数字已 sync)
- 已知红基线同步:33 → 25 条(picker 移出)
This commit is contained in:
1 parent
50accf6e4d
commit
42c9df52da
3 files changed
+10
-11
No files matched your search
Vendored
+2
-10
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$comment": "e2e 已知失败清单。用途:把「长期红」与「新红」分开,避免门禁信号被噪声淹没。维护:修好一条就删一条;新红由 scripts/e2e-known-red-report.js 报出来。kind=unknown 表示尚未逐条判定。退役清单见 retired。",
|
||||
"$comment": "e2e 已知失败清单。用途:把「长期红」与「新红」分开,避免门禁信号被噪声淹没。维护:修好一条就删一条;新红由 scripts/e2e-known-red-report.js 报出来。kind=unknown 表示尚未逐条判定。退役清单见 retired。 2026-11-27 追记:iwb-picker 9/9 已修复(初始默认视口被误持久化导致 doFit 被跳过),已移出清单。",
|
||||
"measuredAt": "2026-11-27",
|
||||
"measuredVersion": "3.26.107",
|
||||
"measuredCommit": "64f37e1",
|
||||
@@ -7,7 +7,7 @@
|
||||
"specs": 52,
|
||||
"tests": 195,
|
||||
"passed": 162,
|
||||
"failed": 33
|
||||
"failed": 25
|
||||
},
|
||||
"baseUrl": {
|
||||
"clipboard-audit": "http://127.0.0.1:8799",
|
||||
@@ -78,14 +78,6 @@
|
||||
"reason": "LOD 阈值相关断言失败,可能与取景缩放变化有关,待判定",
|
||||
"since": "2026-11-27 实测"
|
||||
},
|
||||
{
|
||||
"spec": "tests/iwb-picker.spec.js",
|
||||
"knownFailures": 8,
|
||||
"total": 9,
|
||||
"kind": "unknown",
|
||||
"reason": "模型设置浮层 9 条里 8 条超时,未定位(疑似浮层入口/挂载方式变更)",
|
||||
"since": "2026-11-27 实测"
|
||||
},
|
||||
{
|
||||
"spec": "tests/iwb-private-gate.spec.js",
|
||||
"knownFailures": 4,
|
||||
|
||||
Reference in new issue
Block a user