fix(webviews): ui.animationSpeed off stops agent pane motion
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.
applyAgentThemesetsdata-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.cssturns off CSS animations and transitions underdata-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
animationendnever fires. - The old
--acpmux-motion-hover/easenames now alias the host's--agent-motion-hover/--agent-ease-outtokens, 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 testonagent-pane-terminal-font,transcript-output-copy,new-tab-list-motion-render,new-tab-list-motion,new-tab-motion-css,files-panel-coverageandThoughtRow.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 lintandtscshow nothing on the changed files. The remainingbun run checkfailures (text-focus, dialog-keys, fmt on settings files) are on the base and outside these files.
š¤ Generated with Claude Code
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.
applyAgentThemenow 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
animationendnever fires. --acpmux-motion-hoverand--acpmux-motion-easealias the host's motion tokens with an 80ms/ease-out fallback, so the New Tab and changes sheets follow the configured speed.