Commit Graph
5 Commits
Author SHA1 Message Date
zhangxiang f23500ff07 docs(grammar): 落 ADR-0008 并改掉说谎的那一方,含四条经验教训与台账 §11
对标实测证伪了 ADR-0004 的两条视觉判据,所以本笔的主体是**改文档**:
判据错在文档里,而不是错在代码里,不一起改就是文档变成说谎的那一方。

新增 `docs/adr/0008-benchmark-grammar-takeover.md`(取证方法、实测对照表、
四项裁定、已知偏差 6 条、验证契约):
- Bain 走 archive.org 快照 2026-08-31(1600×846)绕开 Cloudflare,
  Porsche 取 live 国际站 + 中国站导航,逐元素 `getComputedStyle`。
- **被证伪 ①**(决策四)「关键数字 = 超大字号 + 品牌色」:
  Bain 成果数字实测 **40px / 字重 500 / 纯黑**;
  本仓 `--font-size-5xl: 2.25rem` 在桌面根字号 18px 下 = 40.5px ⇒ 现档正好命中,零新增令牌。
- **被证伪 ②**(决策一)「4px 色条为辅」:两家**都不用颜色给内容分类**,
  饱和红用作"面"的次数为 **0**(Bain #CC0000 出现 65 次全是字与线,
  Porsche 红出现 4 次全是按钮)。
  ADR-0004 决策一、决策四两处就地加 ⚠️ 修订块并指向 ADR-0008。
  ADR 不重写历史,但必须让读者不会把已废判据当现状。

`DESIGN.md`:front-matter 的 `rounded:` 改成 0–4px 记档 + 新增 `cta: "0px"`;
`components.cta-*/badge-pill/card-bain/input-field` 的 `rounded` 从
  `{rounded.full}` 改 `{rounded.cta}` 或 `{rounded.md}`,
padding 按实测 `14px 28px`;Elevation 段删掉「hover 升至 card-shadow-hover + translateY(-4px)」;
数据条段把「font-black + 品牌红」改为「text-5xl / 500 / text-ink」并注明是被实测推翻的那条;
Navigation 段写入双轴与「真源是代码、CMS 行须满足 IA 契约才采纳」。

`CONTEXT.md` 关键决策表 +9 行:对标双轴导航 / 导航真源=代码 / 视觉语法记档 /
僵尸令牌 / 彩色编码适用面 / 成果槽 ResultsSlot / 替代信号槽 / 承诺单一真源 /
「注释写在 JSX children 位 = 页面文字」。

`docs/development/quality-gates.md`:
- §1 的 lint warning **权威计数就地更新**:本树 `EXIT=0 / 0 error / 81 warning`,
  分项相加必须等于总数(55+12+8+4+1+1 = 81 ✓),
  并给出与 2026-09-23 那 104 条的逐项对账(`no-explicit-any` 25→4 等,净 −23 ✓)。
  归因**已实证到文件**而不是只看方向一致:逐个 `git show da9a5cb6:<被删文件>` 数出
  33 处 `any` 命中(v15.test 12 / NewsDetailClient.test 8 / v15 4 / …),
  并说明命中数 ≠ 告警数的差额来源,附可复算命令。
- §5.1 `check:motion` 现状 23 处 → **8 处 / 4 文件**,
  并写明残留 8 处全部经 `git show` 自证为基线 `da9a5cb6` 既有红、非本轮引入。
- 新增 §5.2 记录 `check:visual`(R1–R11 每条的分母口径与两条闸的**适用边界**),
  §7 的 `test:all` 组成改为八段并注明自证先跑。
- 另记一条:这条计数一度被读成 0 error,是因为管道吞掉了 EXIT=1(见 §5.38)。

`docs/lessons-learned.md` 四条(§5.38–§5.41)+ 更新记录 4 行:
管道吞退出码复犯 / 合法 JSX 的注释渲染成页面文字而三道门禁全绿 /
仪器只在被复用时才坏(module 层累加器 + 互斥前提塞进同一份夹具)/
僵尸令牌(删了值没删引用,R5 与 R7 各看一侧所以两条都绿)。

`docs/acceptance/qa-tracker.md` §11:四台仪器表(每台的可失败证据)、
本轮 5 条缺陷与根因、6 个 spec 的重锚对照表、
新登记 4 条待拍(DEC-N1 彩色编码第二通道 / N2 stagger 默认值 /
N3 motion 残留 8 处 / N4 既有案例区无门槛)+ 2 条待授权(AUTH-VISUAL / AUTH-NAV)。

`config/test/lighthouserc.json`:URL 集补 `/insights`(新的一级轴)与
`/solutions/manufacturing`(本批 tracer-bullet 承载页)——
不补就是新页没有任何 Lighthouse 覆盖。

`README.md`:加本批进度条目,并把「check:motion 仍 23 处」的旧数改为指向
quality-gates §5.1 的现取口径。

探针 7 份入库 `docs/acceptance/2026-10-17-ia-e2e/`(导航结构 / 面板链接 /
首页 testid 与文案 / 段序文档坐标 / 页脚入口),是本批所有 E2E 断言的取证来源。

本笔纯文档 + 配置,不改运行时代码;同树已跑过的验证仍成立:
`npm run test:all` EXIT=0、`type-check` EXIT=0、`lint` EXIT=0(0/81)、
`test:unit` 141 套件 / 1747 例、`check:visual` 11/11 + accents 成立、`build` EXIT=0。
2026-10-17 01:08:45 +08:00
zhangxiang 6bb7c557ee test(qa): e2e 装配修正 + 集成/门禁测试与工具链重构
- e2e:修死选择器与蜜罐误命中、补断言、GA4/security-headers 用例诚实标注
  skip 边界;新增 assert-helpers/fixtures/hydrated/primary-nav/touch-targets
  等复用桩。
- 集成层:config/test/jest.integration.config.js + tests-integration/ 真库
  一次性 SQLite 用例,teardown 守卫开发库指纹。
- 门禁工具链:jest.setup 归位到根、scripts/accessibility 全站 axe 节点计数、
  check-brand-text-token/check-motion-constraints 机械守卫、stryker/lighthouse
  配置收敛。
2026-09-28 10:48:08 +08:00
zhangxiang 5a4d3106ca chore(test): harden e2e/lighthouse tooling and ignore tool cache
- Playwright:firefox/webkit 使用空 storageState,消除 newContext 阶段浏览器
  兼容噪声;路径以配置目录为基准兼容多种调用方式
- Lighthouse:lighthouserc 补 chromeFlags(--disable-crash-reporter --no-sandbox
  --headless=new),规避 TRAE 沙箱对 Crashpad 目录的拦截
- .gitignore:忽略 .impeccable 评审工具缓存
2026-08-19 14:43:53 +08:00
张翔 2f45818724 feat(analytics): enhance Google Analytics with privacy compliance and comprehensive tracking
- Add automatic route change tracking for SPA navigation
- Implement Cookie consent banner for GDPR compliance
- Add performance tracking (LCP, FID, CLS Web Vitals)
- Add outbound link click tracking
- Integrate contact form submission tracking with conversion events
- Add CTA button click tracking in hero section
- Integrate error tracking in ErrorBoundary component
- Extend analytics utility library with 15+ tracking functions
- Configure IP anonymization and privacy settings
- Remove unused test files and deployment scripts
- Update case studies to include only specified cases
- Fix mobile navigation active state issues
- Fix lint errors in test files and components

BREAKING CHANGE: Google Analytics now requires user consent before tracking
2026-04-22 07:19:29 +08:00
张翔 498bb3a3c8 refactor: reorganize project structure and improve code quality
- Move CI/CD configs to config/ci/ directory
- Reorganize scripts into categorized directories (deployment, monitoring, testing, utils)
- Consolidate documentation into docs/ directory with proper structure
- Update linting and testing configurations
- Remove obsolete test reports and performance summaries
- Add new documentation for code quality tools and contact form security
- Improve project organization and maintainability
- Fix lint-staged config to only lint JS/TS files
- Disable react/react-in-jsx-scope rule for Next.js compatibility
- Ignore scripts and test config directories in ESLint
2026-03-24 13:38:58 +08:00