fix(webviews): ui.animationSpeed off stops agent pane motion

Merged
TE
17d ago
+245-19

Summary

ui.animationSpeed: off reaches the agent pane as an all-zero motion policy (AgentPaneTheme sends every motion value as 0). Several surfaces already stop their motion when <html data-agent-motion="off"> is set: the changes tree, the files panel and the New Tab list all call isAgentMotionOff(). But nothing on feat-cmux-next ever set that attribute, so none of those guards ran.

  • applyAgentTheme sets data-agent-motion="off" when every motion value is 0 and cancels any animation already running. Reduce Motion keeps its short crossfade values, so it doesn't trip this.
  • One rule in acpmux/styles.css turns off CSS animations and transitions under data-agent-motion="off".
  • The transcript glide, the code-card handoff, the thought toggle and the tree title spring skip their Web Animations. The code handoff also finishes when the setting changes partway through, because its animationend never fires.
  • The old --acpmux-motion-hover/ease names now alias the host's --agent-motion-hover / --agent-ease-out tokens, so the New Tab and changes sheets follow the host speed. They no longer use a hard-coded 80ms.

This part of #21200 was never split out. It comes from d7d45cf149, acf0eea7ac, 29e41c6426 and 4236182e04, and the New Tab list test comes from 96afa7e285. The test's file is renamed to new-tab-list-motion-render.test.tsx because the browser-lane new-tab-list-motion.test.ts is a different file.

Testing

Run on Huge Blue (Linux):

  • bun test on agent-pane-terminal-font, transcript-output-copy, new-tab-list-motion-render, new-tab-list-motion, new-tab-motion-css, files-panel-coverage and ThoughtRow.test.tsx: 38 pass, 2 browser-lane skips.
  • With feat-cmux-next's sources and the new tests, the off-marker, code-handoff and thought-toggle tests fail. They pass with this change.
  • vp fmt --check, vp lint and tsc show nothing on the changed files. The remaining bun run check failures (text-focus, dialog-keys, fmt on settings files) are on the base and outside these files.

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the agent pane ignoring ui.animationSpeed: off: the setting arrives as an all-zero motion policy, but nothing set the data-agent-motion="off" attribute that the motion guards check for, so they never ran.

  • applyAgentTheme now sets the attribute when every motion value is 0 and cancels running animations; Reduce Motion's short crossfade doesn't trip it.
  • One CSS rule stops all animations and transitions under the attribute.
  • The transcript glide, code handoff, thought toggle, changes tree and tree titles skip their Web Animations; the code handoff also completes if the setting changes mid-fade because its animationend never fires.
  • --acpmux-motion-hover and --acpmux-motion-ease alias the host's motion tokens with an 80ms/ease-out fallback, so the New Tab and changes sheets follow the configured speed.