Skip to content

feat(chat): add live voice input waveform - #7146

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/voice-input-waveform
Aug 27, 2026
Merged

feat(chat): add live voice input waveform#7146
waleedlatif1 merged 2 commits into
stagingfrom
codex/voice-input-waveform

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

What

  • replace the active microphone glyph with a compact five-bar live waveform clipped to the existing circular control
  • use neutral EMCN active-state tokens, reduced-motion handling, and ref-driven SVG updates
  • add an actionable desktop recovery path that opens native microphone privacy settings after access is denied

Why

Voice input should visibly confirm captured speech without expanding the composer or introducing an off-system alert color. A denied desktop permission should also have a direct recovery action.

How

  • derive smoothed RMS levels from the existing PCM callback and expose them through a stable ref
  • animate five SVG lines with requestAnimationFrame, avoiding React rerenders on audio frames
  • gate a fixed native settings URL behind trusted-origin desktop IPC and preserve backward compatibility for older shells

Test Plan

  • bun run lint:check
  • bun run check:audits
  • bun run apps/sim/scripts/check-block-registry.ts origin/staging
  • bunx turbo run type-check
  • bun run test
  • bun run check:desktop-bridge
  • bun run check:desktop-ipc
  • visual verification in dark theme with live waveform samples

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 27, 2026 1:54am

Request Review

@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a ref-driven live microphone waveform and a desktop recovery action for denied microphone access.

  • Derives smoothed audio levels from captured PCM data and animates five SVG waveform bars without React frame-by-frame rendering.
  • Adds reduced-motion behavior and updates the microphone control’s active styling and accessibility state.
  • Adds an origin-gated desktop IPC operation for opening native microphone privacy settings on macOS and Windows.
  • Hides the recovery action on unsupported platforms and preserves compatibility with older desktop shells.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the Linux preload omits the unsupported capability, the renderer preserves that absence, and the recovery action is rendered only when the capability is available.

Important Files Changed

Filename Overview
apps/desktop/src/main/ipc.ts Adds an app-origin-gated IPC handler that opens fixed native microphone-settings URLs only on supported operating systems.
apps/desktop/src/preload/index.ts Exposes the optional microphone-settings capability only on macOS and Windows, resolving the previously reported Linux no-op action.
apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx Adds the recovery action only when the desktop bridge exposes the corresponding platform capability.
apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/mic-button/mic-button.tsx Replaces the active microphone glyph with an accessible, reduced-motion-aware SVG waveform animated through refs.
apps/sim/hooks/use-speech-to-text.ts Computes and exposes five smoothed RMS audio levels through a stable ref while retaining the existing PCM capture flow.
packages/desktop-bridge/src/index.ts Adds the microphone-settings operation as an optional bridge capability for backward compatibility.

Reviews (2): Last reviewed commit: "fix(desktop): hide unsupported microphon..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 force-pushed the codex/voice-input-waveform branch from 097f4e7 to 9014399 Compare August 27, 2026 01:54
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 10 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 0d30c6d into staging Aug 27, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/voice-input-waveform branch August 27, 2026 02:01
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