Skip to content

add voice input to agent chat - #564

Merged
izadoesdev merged 10 commits into
databuddy-analytics:stagingfrom
swamimalode07:feat/voice-mode
Jul 26, 2026
Merged

add voice input to agent chat#564
izadoesdev merged 10 commits into
databuddy-analytics:stagingfrom
swamimalode07:feat/voice-mode

Conversation

@swamimalode07

@swamimalode07 swamimalode07 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

  • Added a mic button to the agent chat that opens a voice dialog and transcribes speech live using the browser's Web Speech API -> no new deps, nothing sent to servers
  • Animated fluid orb that reacts to your voice level, breathes when idle, and opens in a random brand color each time
  • Transcript appends to whatever you already typed; confirm with Enter or the Done button
  • Handles unsupported browsers cleanly - button hidden in Firefox, clear error message in Brave, mic permission errors have their own message, all animations respect reduced motion
  • Fixed Permissions-Policy header to allow same-origin microphone and added a MicrophoneIcon to the shared icon set
Checklist
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by cubic

Adds voice input to agent chat via a mic button and dialog that transcribes speech on-device using the Web Speech API. No new deps and no audio sent to servers.

  • New Features

    • Voice dialog with live transcription; transcript appends to the current input and can be confirmed with Enter or Done. Button hides when unsupported; clear permission/unsupported-browser errors; respects reduced motion.
    • Fluid orb visual that breathes when idle and scales with mic volume; random brand color each open. Added MicrophoneIcon to @databuddy/ui.
  • Bug Fixes

    • Prevented stale voice recognition sessions when reopening the dialog.
    • Fixed Permissions-Policy to allow same-origin microphone: microphone=(self).

Written for commit 03ff434. Summary will update on new commits.

Review in cubic

swamimalode07 and others added 6 commits July 15, 2026 02:33
- Voice dialog with live Web Speech API transcription and fluid orb visual
- MicrophoneIcon added to nucleo icon set
- Allow same-origin microphone in Permissions-Policy

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

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

@swamimalode07 is attempting to deploy a commit to the Databuddy OSS Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4e10ba89-543b-4983-936f-66cfac1ca7fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds browser-based voice input to agent chat. The main changes are:

  • Voice dialog with live speech transcription.
  • Microphone-level orb animation and shared icon.
  • Same-origin microphone permission policy.
  • Reduced-motion support for shimmer text.

Confidence Score: 4/5

The speech-recognition restart path can leave an old session active after a rapid dialog reopen.

  • A queued onend callback can restart a recognizer that belongs to the previous dialog session.
  • The input wiring, icon export, reduced-motion rendering, and header change otherwise match existing patterns.

apps/dashboard/components/agent/hooks/use-speech-transcription.ts

Important Files Changed

Filename Overview
apps/dashboard/components/agent/hooks/use-speech-transcription.ts Adds continuous Web Speech transcription, including restart and error handling.
apps/dashboard/components/agent/agent-voice-dialog.tsx Adds the voice-input dialog, transcript confirmation flow, and animated microphone feedback.
apps/dashboard/components/agent/hooks/use-mic-level.ts Adds microphone-level sampling with media-stream and audio-context cleanup.
apps/dashboard/components/agent/agent-input.tsx Connects confirmed voice transcripts to the existing controlled chat input.
apps/dashboard/next.config.ts Permits same-origin microphone access while retaining other feature restrictions.
packages/ui/src/components/icons/nucleo.tsx Adds the shared microphone icon using the existing icon export pattern.

Reviews (1): Last reviewed commit: "added brand colors for the orb" | Re-trigger Greptile

Comment thread apps/dashboard/components/agent/hooks/use-speech-transcription.ts
…taging

Release: durable investigations, analytics correctness, and platform hardening
…taging

Release: actionable intelligence, DQL, and platform cleanup
Copilot AI review requested due to automatic review settings July 26, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI review requested due to automatic review settings July 26, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@izadoesdev
izadoesdev changed the base branch from main to staging July 26, 2026 09:11
@izadoesdev
izadoesdev merged commit f342eb5 into databuddy-analytics:staging Jul 26, 2026
14 of 17 checks passed
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