Skip to content

feat(desktop): add state-driven live turn motion - #367

Merged
PeterGuy326 merged 6 commits into
mainfrom
feat/live-turn-motion
Sep 18, 2026
Merged

PeterGuy326 merged 6 commits into
mainfrom
feat/live-turn-motion

Conversation

@PeterGuy326

Copy link
Copy Markdown
Contributor

Summary

  • animate newly received progress milestones with a short staggered entrance
  • show real running-state activity with a moving progress rail, spinner, and restrained pulse
  • stop all live motion when the turn reaches a terminal state
  • provide a complete prefers-reduced-motion fallback

This is deliberately driven by the existing turn lifecycle (running / terminal states); it does not invent tool activity or fake progress steps.

Verification

  • focused progress interaction tests: 10/10 passed
  • full renderer suite: 536/536 passed
  • full UI suite: 37/37 passed
  • renderer TypeScript check: passed
  • renderer production build: passed
  • git diff --check: passed

Follow-up to #294 and complements #321.

@waterbro-8 waterbro-8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — Comment

Head d01b42be。motion 绑在现有 running / 终态上,prefers-reduced-motion 关掉 rail/orbit/step-in,没有发明假进度。测试加了 10 个 progress interaction。

非 CODEOWNER。PeterGuy326 无钉钉映射,只留 GitHub 评论。不合并(#321 仍等 Bindy-lbb)。

@waterbro-8 waterbro-8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review — Approve

Head d01b42beb33b64495d7a8a025721a58b6ea1d2f0(按 胡奕舟 23:26 指定)。3 文件。hosted CI 全绿(Node 24 ubuntu/macOS、Windows/macOS smoke、layout parity、CodeQL、Scorecard)。

核对过:

  1. 不虚构工具步骤。 data-motion="live" 只在现有 running 上;步骤仍来自 turn progress[]。没有新的 fake kind。
  2. 终态停动画。 completed 后去掉 data-motion,.owb-turn-progress__activity 卸掉。测试覆盖 running → completed。
  3. prefers-reduced-motion。 spinner / orbit / step-in / rail ::after 全部 animation: none,装饰层 display: none。
  4. 错峰进入 用 --progress-step + 70ms delay;当前步才有 orbit+spinner。

Non-blocking:rail 的 translateY(104px) 是写死的,步骤很多时高光走不完整条边;暗色主题 color-mix(..., white) 可能偏亮。都不挡合。

非 CODEOWNER,未合并。作者 PeterGuy326。

@waterbro-8 waterbro-8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 断言。

Comment thread apps/desktop/renderer/src/roleweave-conversation.css
Comment thread apps/desktop/renderer/src/turns/TurnThread.tsx
sun-970
sun-970 previously approved these changes Sep 18, 2026

@sun-970 sun-970 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review — Approve

Head d01b42beb33b64495d7a8a025721a58b6ea1d2f0(按指定 SHA)。3 文件。hosted CI 全绿(Node 24 ubuntu/macOS、Windows/macOS smoke、unsigned installers、layout parity、CodeQL、Scorecard)。

核对过:

  1. 不虚构内部工具步骤。 data-motion="live" 仅当 turn.status === "running" && !awaitingApproval。步骤仍来自 turn.progress[](或既有 fallback),没有新的 fake kind。
  2. 处理中才有旋转/光环。 active = running && last step;ProgressIcon 只在此时挂 .owb-turn-progress__activity + spinner。
  3. 终态停动画。 completed / failed / indeterminate / awaiting_approval 时 running 为假,去掉 data-motion,activity 卸掉。测试覆盖 running → completed。
  4. prefers-reduced-motion。 spinner、orbit、step-in、rail ::after 全部 animation: none;装饰层 display: none。
  5. 错峰进入 --progress-step + 70ms delay。

Non-blocking:rail translateY(104px) 写死,步骤多时高光走不完整条边;暗色 color-mix(..., white) 可能偏亮。都不挡合。

非 CODEOWNER,未合并。

@waterbro-8

Copy link
Copy Markdown
Collaborator

更正:同 head d01b42be 上我先 Approve 过,随后核对 CSS 特异性后 Request changes 成立、仍然有效。

:is([data-theme]) .owb-app .owb-turn-progress__step 的 animation: owb-progress-step-in 是 (0,3,0),@media (prefers-reduced-motion: reduce) 里的 .owb-turn-progress__step { animation: none } 只有 (0,1,0),减动态效果下错峰进入仍会跑。请把 reduce 规则写到同样的 :is([data-theme]) .owb-app 前缀后再叫我复审。

@PeterGuy326

Copy link
Copy Markdown
Contributor Author

已处理 review 阻塞项:

  • 提升 prefers-reduced-motion 规则特异性,与主题动效规则同级,确保 step-in / spinner / orbit / rail 均真正停止
  • 同时清除 stagger delay
  • 新增 running + approvalRequest 不启用 live motion 的状态门测试
  • 已同步最新 main

本地复验:定向 11/11;Renderer typecheck 与生产构建通过;完整 Renderer 首轮仅出现 2 个 App 并行时序波动,单独重跑 App 84/84 通过。

请按新 head 275de186f74fcfef9e8f00a0e43d71c33a3cf19f 重新 review/approve。

@waterbro-8 waterbro-8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review — Approve

Head 275de186f74fcfef9e8f00a0e43d71c33a3cf19f(按 胡奕舟 23:44 指定)。先前 blocker 已修:

  1. prefers-reduced-motion 特异性对齐。 reduce 规则现为 :is([data-theme]) .owb-app 前缀,覆盖 step / spinner / orbit / live ::after,并带 animation-delay: 0ms;orbit 与 rail 另 display: none。step-in 不再压过 reduce。
  2. running + approvalRequest 不启动 live motion。 running = status === "running" && !awaitingApproval;新测试断言无 data-motion、无 activity。
  3. 状态驱动与不虚构工具步骤仍成立。CSS 测试现在要求 reduce 选择器带主题前缀。

hosted CI 在本 review 时仍有若干 job pending(ubuntu/macOS Node、smoke、installers)。非 CODEOWNER,未合并。

@PeterGuy326
PeterGuy326 merged commit c60f6f1 into main Sep 18, 2026
17 of 18 checks passed
@PeterGuy326
PeterGuy326 deleted the feat/live-turn-motion branch September 18, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants