feat(desktop): add state-driven live turn motion - #367
Conversation
waterbro-8
left a comment
There was a problem hiding this comment.
Review — Comment
Head d01b42be。motion 绑在现有 running / 终态上,prefers-reduced-motion 关掉 rail/orbit/step-in,没有发明假进度。测试加了 10 个 progress interaction。
非 CODEOWNER。PeterGuy326 无钉钉映射,只留 GitHub 评论。不合并(#321 仍等 Bindy-lbb)。
waterbro-8
left a comment
There was a problem hiding this comment.
Independent review — Approve
Head d01b42beb33b64495d7a8a025721a58b6ea1d2f0(按 胡奕舟 23:26 指定)。3 文件。hosted CI 全绿(Node 24 ubuntu/macOS、Windows/macOS smoke、layout parity、CodeQL、Scorecard)。
核对过:
- 不虚构工具步骤。
data-motion="live"只在现有running上;步骤仍来自 turnprogress[]。没有新的 fake kind。 - 终态停动画。 completed 后去掉
data-motion,.owb-turn-progress__activity卸掉。测试覆盖 running → completed。 prefers-reduced-motion。 spinner / orbit / step-in / rail::after全部animation: none,装饰层display: none。- 错峰进入 用
--progress-step+ 70ms delay;当前步才有 orbit+spinner。
Non-blocking:rail 的 translateY(104px) 是写死的,步骤很多时高光走不完整条边;暗色主题 color-mix(..., white) 可能偏亮。都不挡合。
非 CODEOWNER,未合并。作者 PeterGuy326。
waterbro-8
left a comment
There was a problem hiding this comment.
Independent review — Request changes
Head d01b42beb33b64495d7a8a025721a58b6ea1d2f0(与指定 SHA 一致)。3 文件,+95/−6。作者 PeterGuy326,本账号可独立审。CI 全绿属实。
状态驱动本身是对的:running = status === "running" && !awaitingApproval,data-motion="live" 只在这时出现;active 只绑最后一步,完成/失败/等待审批后 spinner+orbit 卸掉、rail 选择器不匹配。进度仍走真实 turn.progress / fallbackProgress,测试也断言没有「执行工具」。没有虚构内部工具步骤。
阻塞:prefers-reduced-motion 声明了 animation: none,但特异性压不过主题选择器,错峰进入动画在系统「减少动态效果」下仍会跑。 这和 PR 声称的完整 reduced-motion 不符。CSS 字符串测试也测不出特异性。请把 reduce 规则至少写到与 live 规则同级(带 :is([data-theme=...]) .owb-app),或给 step-in 同样 display/animation 覆盖。
其余是非阻塞:rail left: -1px + overflow: hidden 可能把高光裁掉;translateY(104px) 写死,步数一多轨就扫不完;完成态展开仍会重放 step-in;没有 status: running + approvalRequest 的 motion 断言。
sun-970
left a comment
There was a problem hiding this comment.
Independent review — Approve
Head d01b42beb33b64495d7a8a025721a58b6ea1d2f0(按指定 SHA)。3 文件。hosted CI 全绿(Node 24 ubuntu/macOS、Windows/macOS smoke、unsigned installers、layout parity、CodeQL、Scorecard)。
核对过:
- 不虚构内部工具步骤。
data-motion="live"仅当turn.status === "running" && !awaitingApproval。步骤仍来自turn.progress[](或既有 fallback),没有新的 fake kind。 - 处理中才有旋转/光环。
active = running && last step;ProgressIcon只在此时挂.owb-turn-progress__activity+ spinner。 - 终态停动画。 completed / failed / indeterminate / awaiting_approval 时
running为假,去掉data-motion,activity 卸掉。测试覆盖 running → completed。 prefers-reduced-motion。 spinner、orbit、step-in、rail::after全部animation: none;装饰层display: none。- 错峰进入
--progress-step+ 70ms delay。
Non-blocking:rail translateY(104px) 写死,步骤多时高光走不完整条边;暗色 color-mix(..., white) 可能偏亮。都不挡合。
非 CODEOWNER,未合并。
|
更正:同 head
|
|
已处理 review 阻塞项:
本地复验:定向 11/11;Renderer typecheck 与生产构建通过;完整 Renderer 首轮仅出现 2 个 App 并行时序波动,单独重跑 App 84/84 通过。 请按新 head |
waterbro-8
left a comment
There was a problem hiding this comment.
Independent review — Approve
Head 275de186f74fcfef9e8f00a0e43d71c33a3cf19f(按 胡奕舟 23:44 指定)。先前 blocker 已修:
prefers-reduced-motion特异性对齐。 reduce 规则现为:is([data-theme]) .owb-app前缀,覆盖 step / spinner / orbit / live::after,并带animation-delay: 0ms;orbit 与 rail 另display: none。step-in 不再压过 reduce。running + approvalRequest不启动 live motion。running = status === "running" && !awaitingApproval;新测试断言无data-motion、无 activity。- 状态驱动与不虚构工具步骤仍成立。CSS 测试现在要求 reduce 选择器带主题前缀。
hosted CI 在本 review 时仍有若干 job pending(ubuntu/macOS Node、smoke、installers)。非 CODEOWNER,未合并。
Summary
prefers-reduced-motionfallbackThis is deliberately driven by the existing turn lifecycle (
running/ terminal states); it does not invent tool activity or fake progress steps.Verification
git diff --check: passedFollow-up to #294 and complements #321.