Skip to content

feat(shadcn): add AgentAudioVisualizerOrbit component - #1421

Draft
thomasyuill-livekit wants to merge 2 commits into
mainfrom
ty/extract-visualizer-to-agents-ui
Draft

feat(shadcn): add AgentAudioVisualizerOrbit component#1421
thomasyuill-livekit wants to merge 2 commits into
mainfrom
ty/extract-visualizer-to-agents-ui

Conversation

@thomasyuill-livekit

@thomasyuill-livekit thomasyuill-livekit commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Issue

No linked Linear ticket.

Overview

Extracts the canvas-based "orbiting orbs" audio visualizer from an internal expressive-agent demo into a reusable agents-ui component, AgentAudioVisualizerOrbit. Unlike the existing five visualizers (all shader-based via ReactShaderToy), this one stays plain canvas 2D — the additive-blend orb math doesn't benefit from a shader rewrite.

Summary of changes

Area Change
packages/shadcn/components/agents-ui/agent-audio-visualizer-orbit.tsx New component: ports the Aura canvas-drawing class from the demo, driven by a persistent requestAnimationFrame loop + ResizeObserver
packages/shadcn/hooks/agents-ui/use-agent-audio-visualizer-orbit.ts New hook mapping AgentState + audio track to draw params, using useTrackVolume/useMultibandTrackVolume from @livekit/components-react instead of hand-rolled AnalyserNode code
packages/shadcn/index.ts, packages/shadcn/registry.json Registers the new component/hook alongside the existing visualizers (component entry, block bundle, all bundle)
packages/shadcn/tests/*.test.{ts,tsx} Unit tests for the component and hook
docs/storybook/stories/agents-ui/AgentAudioVisualizerOrbit.stories.tsx Storybook story with Default and OverrideVolume (simulated waveform) variants

Testing

/story/agents-ui-agentaudiovisualizerorbit--override-volume

Ports the canvas-based orbiting-orbs audio visualizer from the expressive-agent
demo into a reusable agents-ui component/hook pair, using useTrackVolume and
useMultibandTrackVolume from @livekit/components-react for audio analysis
instead of hand-rolled AnalyserNode code. Registered alongside the existing
shader-based visualizers in the shadcn registry, package index, and Storybook.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
components-js-storybook-5kld Ready Ready Preview Aug 13, 2026 6:59pm

Request Review

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 94b9ad5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@thomasyuill-livekit
thomasyuill-livekit marked this pull request as draft August 13, 2026 18:52
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
LiveKitRoom only 7.91 KB (0%)
LiveKitRoom with VideoConference 32.5 KB (0%)
All exports 44.57 KB (0%)

…izerOrbit

Mirrors AgentExpression.stories.tsx's LiveAgent story, wiring useAgentExpression's
mood into the orbit visualizer's color prop against a real expressive agent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant