Skip to content

fix(agents-ui): respect reduced motion in AgentChatIndicator and popup trigger - #1527

Open
bganderson95 wants to merge 1 commit into
livekit:mainfrom
bganderson95:fix/agents-ui-reduced-motion
Open

bganderson95 wants to merge 1 commit into
livekit:mainfrom
bganderson95:fix/agents-ui-reduced-motion

Conversation

@bganderson95

@bganderson95 bganderson95 commented Nov 24, 2026 •

Copy link
Copy Markdown

Issue

Follow-up to #1528. That PR covered the audio visualizers, but AgentChatIndicator still pulses forever and the popup trigger's connecting ring still spins with prefers-reduced-motion on. This rebases on main and moves both onto useAgentMotion, so they follow the same setting (and <MotionConfig reducedMotion="always">) as the visualizers.

Screenshots

Videos are clearer than stills here, since the difference is in how things move.

Default:

indicators-no-preference.mp4

prefers-reduced-motion: reduce:

indicators-reduce.mp4

Overview

AgentChatIndicator takes the same motion prop as the visualizers.

  • full is unchanged.
  • calm, which is what auto uses under reduced motion, drops the scale pulse and keeps a slow, shallow opacity fade from pulseForMotion. The dot still reads as "working" without moving.
  • still holds a steady dot.

Popup trigger: the connecting ring stops spinning unless motion is full, the same way the Radial's thinking spin stops. The conic gradient still reads as in-progress when it's static. The trigger doesn't take a motion prop because it's internal to the block, so it uses auto.

Summary of changes

File Change
agent-chat-indicator.tsx Add motion prop. calm and still swap the pulse for pulseForMotion opacity only.
trigger.tsx (agent-popup-01) Only spin the connecting ring when useAgentMotion() is full.
registry.json Ship use-agent-motion.ts with agent-chat-indicator and agent-popup-01, same as the visualizers.
agent-chat-indicator.test.tsx, trigger.test.tsx still settles on a steady dot with no transform; the ring doesn't spin under <MotionConfig reducedMotion="always">.
.changeset/ patch changeset for @livekit/agents-ui.

Testing

  • pnpm --filter @livekit/agents-ui test: 377 tests pass.
  • In Storybook with reduced motion emulated, I sampled the computed styles over 3s:
    • Default: the dot pulses opacity 0.5–1 and scale 0.9–1, and the ring spins.
    • Reduced motion: the dot fades between 0.68 and 0.82 with no transform, and the ring doesn't move.
    • motion="still": the dot sits at 0.75.

@CLAassistant

CLAassistant commented Nov 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown

@bganderson95 is attempting to deploy a commit to the LiveKit Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
components-js-storybook-5kld Ready Ready Preview Dec 2, 2026 9:48pm UTC

Request Review

@thomasyuill-livekit

Copy link
Copy Markdown
Contributor

Thanks @bganderson95 for the contribution, we've been meaning to button this up.
Do you mind including some screen shots of the various states in your description?

@bganderson95

Copy link
Copy Markdown
Author

Thanks @bganderson95 for the contribution, we've been meaning to button this up. Do you mind including some screen shots of the various states in your description?

Added screenshots to the description, thanks for taking a look!

@bganderson95

Copy link
Copy Markdown
Author

@thomasyuill-livekit a couple of updates since adding the screenshots:

  • The grid now holds a chosen frame under reduced motion (top-center of the ring while connecting, center while thinking). Holding its first frame left a lone dot in a corner, which looked like a bug. The screenshots in the description show the new frames.
  • Added motion to the registry dependencies for the bar, grid and radial visualizers, since their hooks import it now.

One thing I left alone on purpose: without motion, thinking and listening look the same on the bar and grid, because speed is the only difference today. That felt like your design call. More detail in the description.

@thomasyuill-livekit

Copy link
Copy Markdown
Contributor

@bganderson95 we recently merged the approach to prefers-reduced-motion in #1528

I think there are still somethings missing that are addressed in your PR, like the AgentChatIndicator, and Popup Indicator

Do you mind rebasing on main and refactoring to address the missing peices?

Thank you for your contributions

@bganderson95
bganderson95 force-pushed the fix/agents-ui-reduced-motion branch from 8b5c4ea to a2e5d0a Compare December 4, 2026 17:38
@bganderson95 bganderson95 changed the title fix(agents-ui): respect prefers-reduced-motion in visualizers and indicators fix(agents-ui): respect reduced motion in AgentChatIndicator and popup trigger Dec 4, 2026
@bganderson95

Copy link
Copy Markdown
Author

@bganderson95 we recently merged the approach to prefers-reduced-motion in #1528

I think there are still somethings missing that are addressed in your PR, like the AgentChatIndicator, and Popup Indicator

Do you mind rebasing on main and refactoring to address the missing peices?

Thank you for your contributions

@thomasyuill-livekit Thanks! Rebased on main and slimmed this down to the two pieces #1528 didn't cover. AgentChatIndicator now uses useAgentMotion and takes the same motion prop as the visualizers: with reduced motion on it drops the scale pulse and keeps a slow, shallow fade (still holds a steady dot). The popup trigger's connecting ring stops spinning, same as the Radial. Both also ship the use-agent-motion hook in the registry.

@thomasyuill-livekit

Copy link
Copy Markdown
Contributor

@bganderson95 we recently merged the approach to prefers-reduced-motion in #1528
I think there are still somethings missing that are addressed in your PR, like the AgentChatIndicator, and Popup Indicator
Do you mind rebasing on main and refactoring to address the missing peices?
Thank you for your contributions

@thomasyuill-livekit Thanks! Rebased on main and slimmed this down to the two pieces #1528 didn't cover. AgentChatIndicator now uses useAgentMotion and takes the same motion prop as the visualizers: with reduced motion on it drops the scale pulse and keeps a slow, shallow fade (still holds a steady dot). The popup trigger's connecting ring stops spinning, same as the Radial. Both also ship the use-agent-motion hook in the registry.

@bganderson95 thanks!
can you update the PR description too?

@bganderson95

Copy link
Copy Markdown
Author

@bganderson95 we recently merged the approach to prefers-reduced-motion in #1528
I think there are still somethings missing that are addressed in your PR, like the AgentChatIndicator, and Popup Indicator
Do you mind rebasing on main and refactoring to address the missing peices?
Thank you for your contributions

@thomasyuill-livekit Thanks! Rebased on main and slimmed this down to the two pieces #1528 didn't cover. AgentChatIndicator now uses useAgentMotion and takes the same motion prop as the visualizers: with reduced motion on it drops the scale pulse and keeps a slow, shallow fade (still holds a steady dot). The popup trigger's connecting ring stops spinning, same as the Radial. Both also ship the use-agent-motion hook in the registry.

@bganderson95 thanks! can you update the PR description too?

@thomasyuill-livekit Done, the description is updated to match the new scope.

This branch has not been deployed

No deployments
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