diff --git a/client/electron/test/animation-audit.test.mjs b/client/electron/test/animation-audit.test.mjs index 21e12a2..a3335a1 100644 --- a/client/electron/test/animation-audit.test.mjs +++ b/client/electron/test/animation-audit.test.mjs @@ -22,25 +22,25 @@ * 3. 不得再出现"整档控件一起动"的 view-switch 规则(③)。 * 4. 挂载即播那档(.rise-in)必须被 prefers-reduced-motion 显式关掉。 */ -import { readdirSync, readFileSync } from 'node:fs'; -import { join } from 'node:path'; -import { fileURLToPath } from 'node:url'; +import { readdirSync } from 'node:fs'; import { check, finish } from './lib/checks.mjs'; +import { code } from './lib/read.mjs'; -const HERE = fileURLToPath(new URL('.', import.meta.url)); -const css = readFileSync(join(HERE, '..', 'src', 'index.css'), 'utf8').replace(/\/\*[\s\S]*?\*\//g, ''); +// 判"规则/代码里有没有这个东西"一律走剥注释版(code):解释性注释里会原样引用被禁的写法, +// 读原文会把它当成"还在用"(criteria-hygiene 就是这么抓到本文件第一版裸用 readFileSync 的)。 +const css = code('src/index.css'); /** 组件源码全文:判"这个类有没有人穿"必须看代码,不是看我们的记忆 */ function componentsSrc() { const out = []; const walk = dir => { for (const e of readdirSync(dir, { withFileTypes: true })) { - const p = join(dir, e.name); + const p = `${dir}/${e.name}`; if (e.isDirectory()) walk(p); - else if (/\.tsx?$/.test(e.name) && !/\.test\./.test(e.name)) out.push(readFileSync(p, 'utf8')); + else if (/\.tsx?$/.test(e.name) && !/\.test\./.test(e.name)) out.push(code(p)); } }; - walk(join(HERE, '..', 'src')); + walk('src'); return out.join('\n'); } const src = componentsSrc(); diff --git a/client/electron/test/run-all.mjs b/client/electron/test/run-all.mjs index 52a4f28..090f26b 100644 --- a/client/electron/test/run-all.mjs +++ b/client/electron/test/run-all.mjs @@ -61,6 +61,7 @@ const SUITE = [ ['test/markdown-xss.test.mjs', [], 9], ['test/narrow-layout.test.mjs', [], 64], ['test/nav-merge.test.mjs', [], 8], + ['test/animation-audit.test.mjs', [], 4], // 动画全量盘点:死动画/过宽作用域/弹层接线/reduced-motion ['test/theme.test.mjs', [], 30], ['test/background.test.mjs', [], 42], ['test/cross-client-theme.test.mjs', [], 15], diff --git a/docs/ALIGN-REFS.json b/docs/ALIGN-REFS.json index 073e92c..8b32fc0 100644 --- a/docs/ALIGN-REFS.json +++ b/docs/ALIGN-REFS.json @@ -10,10 +10,10 @@ { "id": "calendar-view", "path": "client/electron/src/components/CalendarView.tsx", - "blob": "641c67615a36fcd904ed0c6d7d96b16211369ff9", - "atCommit": "e3b7f8f", - "atCommitSubject": "perf(webui): 动画卡顿三处治理 + 覆盖列表/日历", - "note": "P6 日历骨架的对齐目标。**2026-09-15 重新核对过一次**:本次差异只有根节点多了一个 `rise-in`(局部入场动画类)—— 而**鸿蒙侧日历本来就没有动效实现**(grep client/harmony 的 calendar 相关 .ets,animate/transition/animation 全无),所以这次不产生新的对齐义务:骨架结构、布局类、圆角来源都没变。若将来鸿蒙侧要加入场动效,这里必须重新核对一次(届时差异就不只是 className 了)。此前一笔:上面那笔日历圆角修复。" + "blob": "31a62fffd75c076ca86dc065ec7d6eec47fce985", + "atCommit": "bb8201f", + "atCommitSubject": "feat(webui): 回复/转发动画真的会播了 + 写邮件改成「按钮长成整页」", + "note": "P6 日历骨架的对齐目标。**2026-09-15 第二次重新核对**:本次差异只有根节点的动画类 rise-in → pane-rise(拆「挂载即播」与「窗口触发」两档时改的名,见 436de6e)——骨架结构、布局类、圆角来源全都未变;鸿蒙侧日历本来就没有动效实现(grep 无 animate/transition),所以仍不产生新的对齐义务。此前两笔:日历圆角修复、根节点加 rise-in。" } ], "radius": [