fix(stream-monitor): CSS Module 关键帧名统一走变量转发,19 处动画恢复播放(BLF-1433) #180
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.40) × (1 − Review Confidence (0.26)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 304 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 51% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.342
Real PR Conversation Timeline
1 comments
"Review active on #180"
general
weight: 0.35
chatgpt-codex-connector[bot]
做了什么
CSS Modules 会把
animation里的帧名一起本地化成<模块>_<名字>__hash,而app/globals.css的@keyframes av是全局作用域。名字对不上时浏览器不报错,动画静默停在首帧。本 PR 把动效层里 19 处裸帧名统一改成var(--av-kf-):AvUI.module.css(3 处):一级告警呼吸、空态上浮、状态徽标弹入AvPages.module.css(12 处):时间范围切换、热力脉冲、抽屉/遮罩开合、event 时间线、capability 卡片、audio 频谱擦除AvShell.module.css(1 处):窄屏侧栏遮罩motion/AvMotion.module.css(3 处):骨架屏高光、骨架交叉淡入、顶栏时钟秒跳globals.css:--av-kf-段补齐 12 个转发变量(fade-in/fade-out/rise-in/breathe/dot-pop/grow-y/wipe-up/drawer-in/drawer-out/range-swap/heat-pulse/skeleton)AvMotion.module.css里pageInFrames/riseInFrames的模块内副本保留(当初修「面板整块空白」的应急例外,理由已写在文件注释里)。新增两道防线:
1. 源码守卫
web/lib/av/avKeyframes.vitest.test.ts:扫 5 个 CSS 模块的全部animation/animation-name,帧名只允许var(--av-kf-)或本文件@keyframes;反向校验每个--av-kf-x指向的帧名在globals.css里真的有@keyframes。带负向自检(裸帧名 / 拼错令牌必须报错)。2. 运行时审计
scripts/av-keyframes-audit.mjs:打开 7 页 × 1440/390,遍历所有元素及::before/::after/::backdrop,把getComputedStyle().animationName与CSSKeyframesRule.name集合比对;带负向自检(插入一个不存在的帧名必须报出 1 条);同时校验?static=1三连拍 MD5、prefers-reduced-motion: reduce冻结、半透明面板。逐帧证据脚本
scripts/av-keyframes-evidence.mjs产出artifacts/blf1433/:8 组动画的animationstart事件、currentTime轨迹与逐帧截图(overview 切范围、一级告警呼吸、骨架屏高光、event 时间线、audio 频谱、capability 卡片、抽屉开合、顶栏时钟)。验证结果
| 检查 | 结果 |
| --- | --- |
|
npm test| 74 files / 626 tests 全绿(含新守卫 9 条) ||
npm run lint| 0 error(仅存量 warning) ||
npm run build| 通过 ||
node scripts/av-keyframes-audit.mjs|pass: true,未解析帧名 0 条;719 个动画节点、428 条currentTime在推进;负向自检捕获 1 条;?static=114/14 三连拍 MD5 一致;reduced-motion 14/14 在跑动画为 0、半透明面板为 0;16 条期望全部命中 ||
node scripts/av-layout-overflow.mjs| 无溢出 / 裁切 / 横向滚动 || 8 组证据 | 每组 ≥3 帧且 MD5 不同;旧版时间线此前整块不可见,现在
settled.minOpacity = 1|重点回归过的「修好之后真的开始播」风险点:
backwards + --av-i延迟:EventView.tsx的--av-i有Math.min(index, 10)上限,5 个节点全部结束后minOpacity = 1;::backdrop的both填充:data-closing摘除后dialog[open]消失,遮罩无残留;?static=1/ reduced-motion:14 页次全部冻结,无半透明面板。影响面与风险
animation声明 +globals.css的--av-kf-变量段),不碰业务逻辑、文案、间距 / 字号 / 行高 / 图表高度令牌;animation时长仍全部取var(--av-dur-)。EventView.tsx的Math.min上限是既有实现)。TESTING.md属「人工按需」的浏览器验收。关联
Closes BLF-1433。父 issue 的收尾项,需在 Stage 8 最终截图之前合入。