Skip to content

Conversation

@thomasyuill-livekit
Copy link
Contributor

@thomasyuill-livekit thomasyuill-livekit commented Jan 20, 2026

Summary by CodeRabbit

  • Features

    • Visualizers now default to a larger size (Aura, Wave, Grid, Radial) for improved visibility.
    • Wave visualizer prop renamed from "smoothing" to "blur" with updated controls.
    • AgentTrackToggle gains explicit size variants (sm/default/lg) for consistent sizing.
  • Bug Fixes

    • Agent control: Enter-to-send implemented with proper disabled/loading and message-trim behavior.
  • Documentation

    • README and Storybook examples updated to reflect size and prop name changes.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2026

⚠️ No Changeset found

Latest commit: 6608457

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

Defaults and prop names updated across agents-ui visualizers and controls: visualizer size defaults changed from 'md' → 'lg', Wave's smoothing prop renamed to blur (with shader uniform updated), storybook/docs adjusted, Grid/Radial styles tweaked, AgentControlBar send flow refactored, and AgentTrackToggle gained size variants.

Changes

Cohort / File(s) Summary
Visualizer defaults & docs
packages/shadcn/components/agents-ui/agent-audio-visualizer-aura.tsx, packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx
Default size changed from 'md''lg' in JSDoc and component defaults.
Wave shader prop rename
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx, docs/storybook/stories/agents-ui/AgentAudioVisualizerWave.stories.tsx
Public prop renamed smoothingblur (prop, JSDoc, shader uniform binding, story arg/control); default blur value set in shader.
Storybook & READMEs
docs/storybook/stories/agents-ui/AgentAudioVisualizerGrid.stories.tsx, docs/storybook/stories/agents-ui/AgentAudioVisualizerWave.stories.tsx, README.md, packages/shadcn/README.md
Story args adjusted (size default, counts), new story export added; removed template tag in README; package README entries updated.
Grid & Radial styling
packages/shadcn/components/agents-ui/agent-audio-visualizer-grid.tsx, packages/shadcn/components/agents-ui/agent-audio-visualizer-radial.tsx
Grid size tokens/gaps adjusted; radial per-item classes simplified and state durations normalized.
Control bar send flow
packages/shadcn/components/agents-ui/agent-control-bar.tsx
Replaced form submit with explicit handlers (handleSend, handleKeyDown, handleButtonClick), added isDisabled derived state, removed <form>, enabled Enter-to-send behavior, trimmed outgoing message.
Track toggle variants & API
packages/shadcn/components/agents-ui/agent-track-toggle.tsx
Added `size?: 'sm'

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • lukasIO
  • 1egoman
  • mattherzog

Poem

🐰 I hopped through props and docs today,
I nudged the sizes to a larger way.
I turned smoothing soft into a blur,
Tuned toggles, sends — a tiny whir.
A carrot cheer for tidy change, hooray!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive language ('updates') that doesn't convey meaningful information about the specific changes made. Replace with a more specific title summarizing the main changes, such as 'refactor(shadcn): update audio visualizer defaults and wave shader prop names' or 'refactor(shadcn): update agent audio visualizer components'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a314873 and 6608457.

📒 Files selected for processing (2)
  • packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx
  • packages/shadcn/components/agents-ui/agent-control-bar.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
packages/shadcn/components/agents-ui/agent-control-bar.tsx (2)
packages/shadcn/lib/utils.ts (1)
  • cn (4-6)
packages/shadcn/components/ui/button.tsx (1)
  • Button (57-57)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (9)
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (6)

161-164: LGTM!

The prop rename from smoothing to blur is appropriate—it better describes the visual effect of edge softening in the shader. Documentation is clear with the correct default value.


174-174: LGTM!

The prop destructuring and uniform binding are correctly updated. Keeping the internal shader uniform name as uSmoothing while exposing blur as the public prop is a reasonable approach—internal implementation details don't need to leak into the public API.

Also applies to: 192-192


209-222: LGTM!

The size variants follow a logical 2× scaling progression, and changing the default to 'lg' aligns with the broader effort to standardize defaults across visualizer components.


224-258: LGTM!

The interface documentation is correctly updated: size default reflects 'lg', and the blur prop replaces smoothing with consistent documentation.


267-276: JSDoc example correctly updated.

The example now uses blur={0.5} instead of the old smoothing={0.5}, addressing the issue flagged in the previous review.


278-328: LGTM!

The component implementation correctly propagates the blur prop to WaveShader, and the default values are consistent with the documentation.

packages/shadcn/components/agents-ui/agent-control-bar.tsx (3)

74-90: Good gating + trimming before send.

isDisabled plus trimming before dispatch keeps empty sends out, and the success reset is clear. Nice cleanup.


99-102: Button click path cleanly funnels through handleSend.

Centralizing send logic here keeps behavior consistent.


111-135: Explicit UI wiring after form removal looks solid.

Switching to a div with explicit key handling and disabling the textarea while sending/chat-closed is coherent; type="button" avoids accidental submit behavior.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2026

size-limit report 📦

Path Size
LiveKitRoom only 6 KB (0%)
LiveKitRoom with VideoConference 32.46 KB (0%)
All exports 43.37 KB (0%)

interval: 100,
rowCount: 10,
columnCount: 10,
rowCount: 9,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

odd numbers ensure s we can have a center row/column

export const AgentAudioVisualizerRadialVariants = cva(
[
'relative flex items-center justify-center',
'[&_[data-lk-index]]:bg-current/10',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ensures that dots are visible in every agent state

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/shadcn/components/agents-ui/agent-control-bar.tsx (1)

74-99: Prevent empty/duplicate sends from the Enter key path.

handleKeyDown always calls handleSend, and handleSend doesn’t guard against empty or in‑flight sends. This bypasses isDisabled, so pressing Enter can send empty messages or double‑send while isSending is true.

🐛 Proposed fix
-  const handleSend = async () => {
+  const handleSend = async () => {
+    const trimmed = message.trim();
+    if (isSending || trimmed.length === 0) return;
     try {
       setIsSending(true);
-      await onSend(message);
+      await onSend(trimmed);
       setMessage('');
     } catch (error) {
       console.error(error);
     } finally {
       setIsSending(false);
     }
   };
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (1)

267-275: Update the JSDoc example to use blur.

The example still uses smoothing, which no longer exists.

✏️ Suggested doc fix
 * <AgentAudioVisualizerWave
 *   size="lg"
 *   state="speaking"
 *   color="#1FD5F9"
 *   lineWidth={2}
- *   smoothing={0.5}
+ *   blur={0.5}
 *   audioTrack={audioTrack}
 * />
🤖 Fix all issues with AI agents
In `@packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx`:
- Around line 246-249: Update the JSDoc example for the AgentAudioVisualizerWave
component to use the renamed prop "blur" instead of the old "smoothing" prop:
locate the JSDoc block that shows the example usage of AgentAudioVisualizerWave
and replace smoothing={0.5} with blur={0.5} so the example matches the
component's current API (AgentAudioVisualizerWave, prop blur).
🧹 Nitpick comments (2)
packages/shadcn/components/agents-ui/agent-audio-visualizer-radial.tsx (1)

19-22: Remove the duplicated duration-300 utility.

Line 22 repeats the same class token twice, which is redundant. Consider removing the duplicate for clarity.

♻️ Suggested cleanup
-    'has-data-[lk-state=listening]:[&_[data-lk-index]]:duration-300 has-data-[lk-state=listening]:[&_[data-lk-index]]:duration-300',
+    'has-data-[lk-state=listening]:[&_[data-lk-index]]:duration-300',
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (1)

224-230: Align variant defaults with the new documented default.

The JSDoc now says the default is 'lg', but AgentAudioVisualizerWaveVariants still defaults to 'md' (Line 220). Consider aligning these to avoid confusion for consumers using the variants directly.

♻️ Suggested update
  defaultVariants: {
-   size: 'md',
+   size: 'lg',
  },
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9eaac85 and 87138ac.

📒 Files selected for processing (9)
  • README.md
  • docs/storybook/stories/agents-ui/AgentAudioVisualizerGrid.stories.tsx
  • docs/storybook/stories/agents-ui/AgentAudioVisualizerWave.stories.tsx
  • packages/shadcn/README.md
  • packages/shadcn/components/agents-ui/agent-audio-visualizer-grid.tsx
  • packages/shadcn/components/agents-ui/agent-audio-visualizer-radial.tsx
  • packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx
  • packages/shadcn/components/agents-ui/agent-control-bar.tsx
  • packages/shadcn/components/agents-ui/agent-track-toggle.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
docs/storybook/stories/agents-ui/AgentAudioVisualizerGrid.stories.tsx (3)
docs/storybook/stories/agents-ui/AgentAudioVisualizerWave.stories.tsx (1)
  • Default (61-63)
docs/storybook/stories/agents-ui/AgentAudioVisualizerRadial.stories.tsx (1)
  • Default (57-59)
packages/shadcn/components/agents-ui/agent-audio-visualizer-grid.tsx (1)
  • AgentAudioVisualizerGridProps (195-219)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (4)
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (1)

167-193: Blur prop wiring looks consistent.

Defaulting blur to 0.5 and mapping it into the shader uniforms is clear and consistent with the new prop name.

docs/storybook/stories/agents-ui/AgentAudioVisualizerGrid.stories.tsx (2)

17-24: Story args update looks good.

Switching to size: 'lg' and using a 9x9 grid is consistent with the updated visuals.


66-70: Default story export looks good.

Matches the pattern used by other visualizer stories.

docs/storybook/stories/agents-ui/AgentAudioVisualizerWave.stories.tsx (1)

17-48: Storybook args now match the blur API.

The args and controls line up with the renamed prop.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (1)

219-221: CVA defaultVariants is inconsistent with the component's actual default.

The CVA definition at line 220 specifies size: 'md' as the default variant, but the component function (line 279) defaults to size = 'lg', and the JSDoc (line 227) documents 'lg' as the default.

While the component works correctly because the function parameter default takes precedence, this inconsistency could confuse consumers who use the CVA variants directly.

🔧 Suggested fix
   defaultVariants: {
-    size: 'md',
+    size: 'lg',
   },

Also applies to: 227-229

♻️ Duplicate comments (1)
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (1)

246-249: LGTM! Past review feedback addressed.

The JSDoc example at line 273 now correctly uses blur={0.5} instead of the old smoothing prop, resolving the issue flagged in the previous review.

Also applies to: 273-273

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 87138ac and b4e0b79.

📒 Files selected for processing (1)
  • packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (3)
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (3)

161-164: LGTM!

The smoothingblur rename is correctly applied in both the interface definition and the destructuring with the preserved default value.

Also applies to: 174-174


192-192: LGTM!

The uniform binding correctly passes the renamed blur prop value to the shader's internal uSmoothing uniform.


283-283: LGTM!

The blur prop is correctly destructured and passed through to the WaveShader component.

Also applies to: 318-318

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@thomasyuill-livekit thomasyuill-livekit changed the title fix(shadcn): agents ui shader defaults fix(shadcn): agents ui updates Jan 21, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/shadcn/components/agents-ui/agent-control-bar.tsx (1)

74-90: Prevent draft loss while send is in-flight.
While isSending is true, the textarea remains editable but setMessage('') clears the input on success. That can wipe new text typed during the send. Easiest fix: disable the textarea while sending (or preserve draft on change).

✅ Suggested fix (disable input while sending)
-        disabled={!chatOpen}
+        disabled={!chatOpen || isSending}

Also applies to: 114-123

🤖 Fix all issues with AI agents
In `@packages/shadcn/components/agents-ui/agent-control-bar.tsx`:
- Around line 92-97: The Enter-to-send handler (handleKeyDown) needs to ignore
Enter events during IME composition; update handleKeyDown to first check the
native event's isComposing flag (e.nativeEvent.isComposing) and return early if
true, so that when e.key === 'Enter' and !e.shiftKey you only call
e.preventDefault() and handleSend() when not composing. Ensure you reference the
handleKeyDown function and the React.KeyboardEvent<HTMLTextAreaElement>
nativeEvent.isComposing property in your change.
🧹 Nitpick comments (1)
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (1)

161-164: Confirm public API break for smoothingblur.

If this component is public, the rename is a breaking change. Consider a temporary smoothing alias (with deprecation) or confirm a major version bump/migration note.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4e0b79 and a314873.

📒 Files selected for processing (2)
  • packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx
  • packages/shadcn/components/agents-ui/agent-control-bar.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
packages/shadcn/components/agents-ui/agent-control-bar.tsx (1)
packages/shadcn/components/ui/button.tsx (1)
  • Button (57-57)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (6)
packages/shadcn/components/agents-ui/agent-audio-visualizer-wave.tsx (5)

167-193: Blur defaults are wired consistently.

Defaulting blur and passing it into the shader uniforms looks coherent.


209-221: Size variants & default updated cleanly.

Variant map and the new default size align well.


224-249: Prop docs match new defaults and blur naming.

JSDoc updates reflect the new default size and blur prop correctly.


260-276: Example updated to blur.

Usage snippet is now consistent with the renamed prop.


278-318: Blur is threaded through to the shader.

Prop wiring from AgentAudioVisualizerWave into WaveShader looks correct.

packages/shadcn/components/agents-ui/agent-control-bar.tsx (1)

99-102: LGTM — explicit send handler + type="button" wiring.
Cleaner flow and avoids implicit form submit behavior.

Also applies to: 124-135

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +92 to +97
const handleKeyDown = async (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
handleSend();
}
};
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Skip Enter-to-send during IME composition.
Keydown should ignore Enter while the user is composing (CJK/IME), otherwise partial text can be sent.

✅ Suggested fix
-    if (e.key === 'Enter' && !e.shiftKey) {
+    if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
       e.preventDefault();
       handleSend();
     }
🤖 Prompt for AI Agents
In `@packages/shadcn/components/agents-ui/agent-control-bar.tsx` around lines 92 -
97, The Enter-to-send handler (handleKeyDown) needs to ignore Enter events
during IME composition; update handleKeyDown to first check the native event's
isComposing flag (e.nativeEvent.isComposing) and return early if true, so that
when e.key === 'Enter' and !e.shiftKey you only call e.preventDefault() and
handleSend() when not composing. Ensure you reference the handleKeyDown function
and the React.KeyboardEvent<HTMLTextAreaElement> nativeEvent.isComposing
property in your change.

@thomasyuill-livekit thomasyuill-livekit merged commit de7ce9b into main Jan 21, 2026
7 checks passed
@thomasyuill-livekit thomasyuill-livekit deleted the ty/shadcn-tweaks-4 branch January 21, 2026 19:19
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