feat(ui): 保时捷语法复刻收尾(ADR-0008/0009/0011/0012/0013) #65
No files matched your search
@@ -0,0 +1,53 @@
|
||||
# 2026-11-03 · 首页 v17(保时捷语法)视觉基线重采 — AUTH-1 记录
|
||||
|
||||
## 授权边界
|
||||
|
||||
只重采 `9f8d780a`(首页 v17)实际影响的快照,**不是**全量 132 张。
|
||||
先只读复跑拿到真实失败集,再按失败集更新 —— 这是「132 张全部过期」那个旧假设的收窄更正。
|
||||
|
||||
## 只读复跑的失败集(重采前)
|
||||
|
||||
`E2E_TARGET=production npx playwright test visual-regression.spec.ts --update-snapshots=none`
|
||||
|
||||
**20 failed / 105 passed**,失败集恰是 4 个用例 × 5 个 project:
|
||||
|
||||
| 用例 | 性质 |
|
||||
|---|---|
|
||||
| `首页 (/) - 全页截图对比` | 真变化:v16 → v17 重写(5 张) |
|
||||
| `浅色主题 - 首页视觉` / `深色主题 - 首页视觉` | 真变化:同上(10 张) |
|
||||
| `页脚区域 - 视觉一致性` | **不是回归**:亚像素级文字重渲染(5 张) |
|
||||
|
||||
## 页脚那 5 张为什么不是回归(实测判定,不是推断)
|
||||
|
||||
- 像素差 **1.13%**(14245 / 1259520),差异包围盒 = 整张图,且**全部落在字形边缘**。
|
||||
- 同页的 `header-navigation.png` 在同一轮里**像素全等通过** ⇒ 排除渲染器/字体版本变化。
|
||||
- 页脚文案、列数、QR 码、间距逐项目视一致;2× 放大裁切对照,字形位置逐字重合。
|
||||
|
||||
机理:v17 让页面显著变高,`toHaveScreenshot` 对元素截图时滚动到位的位置落在**非整数像素**上,
|
||||
整块文字因此以半像素重新栅格化。这是「页面高度变化 → 元素截图基线需要重采」的已知签名,
|
||||
不是设计或实现回归。处置:随同批重采,之后稳定。
|
||||
|
||||
## 负对照(判据必须咬得住)
|
||||
|
||||
把 `--radius-cta` 临时改为 `12px` → 重建 → 只读复跑:
|
||||
|
||||
```
|
||||
3 failed(/about · /contact · /products)→ 触发 --max-failures=3 提前停止
|
||||
⇒ N = 3 ≥ 1,基线不是瞎的
|
||||
```
|
||||
|
||||
随后还原 `--radius-cta: 0px`,`git diff --stat src/app/globals.css` **为空** ⇒ 树回到
|
||||
125/125 那一次的同一状态,因此该轮绿灯成立、无需重跑。
|
||||
|
||||
## 重采后复验
|
||||
|
||||
```
|
||||
E2E_TARGET=production ... --update-snapshots=none → 125 passed / 0 failed
|
||||
```
|
||||
|
||||
## 一条运维读数(不是缺陷,但会咬 CI)
|
||||
|
||||
4 worker 并行跑时,`chromium-tablet` 的“浅色主题 - 首页视觉”**超时 45s**;单跑 13.2s 通过。
|
||||
原因是 v17 首页更重(4 屏舞台 + 7 张图)。若 CI 的 `timeout` 仍为 45s,建议改为 60s,
|
||||
或把 visual project 的 worker 数压到 2 —— **不要**用提高超时去掩盖真实的性能回归,
|
||||
但这一条已确认为并发放大而非单页慢。
|
||||
|
After Width: | Height: | Size: 353 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 314 KiB |
|
After Width: | Height: | Size: 833 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 593 KiB |
|
After Width: | Height: | Size: 605 KiB |
|
After Width: | Height: | Size: 630 KiB |
|
After Width: | Height: | Size: 550 KiB |
|
After Width: | Height: | Size: 689 KiB |
|
After Width: | Height: | Size: 699 KiB |
|
After Width: | Height: | Size: 610 KiB |
|
After Width: | Height: | Size: 593 KiB |
|
After Width: | Height: | Size: 588 KiB |
|
After Width: | Height: | Size: 769 KiB |
|
After Width: | Height: | Size: 791 KiB |
|
After Width: | Height: | Size: 773 KiB |
|
After Width: | Height: | Size: 783 KiB |
|
After Width: | Height: | Size: 791 KiB |
|
After Width: | Height: | Size: 897 KiB |
|
Before Width: | Height: | Size: 3.2 MiB After Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 599 KiB After Width: | Height: | Size: 598 KiB |
|
Before Width: | Height: | Size: 10 MiB After Width: | Height: | Size: 12 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 3.8 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 10 MiB After Width: | Height: | Size: 12 MiB |
|
Before Width: | Height: | Size: 10 MiB After Width: | Height: | Size: 12 MiB |
|
After Width: | Height: | Size: 932 KiB |
|
Before Width: | Height: | Size: 422 KiB After Width: | Height: | Size: 421 KiB |
|
Before Width: | Height: | Size: 9.0 MiB After Width: | Height: | Size: 6.8 MiB |
|
After Width: | Height: | Size: 824 KiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 161 KiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 9.0 MiB After Width: | Height: | Size: 6.8 MiB |
|
Before Width: | Height: | Size: 9.0 MiB After Width: | Height: | Size: 6.8 MiB |
|
After Width: | Height: | Size: 479 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 4.2 MiB After Width: | Height: | Size: 3.2 MiB |
|
After Width: | Height: | Size: 401 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 812 KiB |
|
After Width: | Height: | Size: 830 KiB |
|
After Width: | Height: | Size: 853 KiB |
|
After Width: | Height: | Size: 726 KiB |
|
After Width: | Height: | Size: 919 KiB |
|
After Width: | Height: | Size: 929 KiB |
|
After Width: | Height: | Size: 812 KiB |
|
After Width: | Height: | Size: 788 KiB |
|
After Width: | Height: | Size: 789 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 923 KiB |
|
Before Width: | Height: | Size: 4.2 MiB After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 4.2 MiB After Width: | Height: | Size: 3.2 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 462 KiB After Width: | Height: | Size: 456 KiB |
|
Before Width: | Height: | Size: 11 MiB After Width: | Height: | Size: 9.7 MiB |