Skip to content

feat(listen-button): add scrolling waveform for audio amplitude#2234

Merged
yujonglee merged 2 commits intomainfrom
feat/scrolling-waveform-audio-amplitude
Dec 12, 2025
Merged

feat(listen-button): add scrolling waveform for audio amplitude#2234
yujonglee merged 2 commits intomainfrom
feat/scrolling-waveform-audio-amplitude

Conversation

@ComputelessComputer
Copy link
Collaborator

No description provided.

@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 4b52dd4
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/693bda9eb6dc0400084385d4
😎 Deploy Preview https://deploy-preview-2234--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 4b52dd4
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/693bda9e169fe800088d0b6b
😎 Deploy Preview https://deploy-preview-2234--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 12, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Replaces the exported SoundIndicator with an internal ScrollingWaveform used by ListenButton/InMeetingIndicator. listen.tsx adds a canvas-based ScrollingWaveform and changes hover/non-hover UI to show waveform (and optional MicOff) vs a "Stop" label. shared.tsx removes SoundIndicator and its types.

Changes

Cohort / File(s) Summary
ScrollingWaveform & InMeetingIndicator refactor
apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx
Adds an internal canvas-based ScrollingWaveform component and updates InMeetingIndicator/listen button rendering to show the waveform (with optional MicOff) when not hovered and a "Stop" label when hovered; replaces prior SoundIndicator usage and adds useRef/useEffect imports.
SoundIndicator removal
apps/desktop/src/components/main/body/shared.tsx
Removes the exported SoundIndicator component and SoundIndicatorProps type, deletes amplitude state and derived useEffect logic, removes the DancingSticks import, and cleans up code paths that depended on it.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect ScrollingWaveform canvas rendering and animation loop for proper cleanup and no memory leaks (requestAnimationFrame cancellation).
  • Verify hover-state layout and accessibility/labels for the "Stop" state in listen.tsx.
  • Search codebase for any remaining references to SoundIndicator or its props/type.

Possibly related PRs

Suggested reviewers

  • duckduckhero

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the motivation, implementation details, and any testing performed for the new scrolling waveform feature.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a scrolling waveform component for audio amplitude visualization in the listen button.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e8b457 and 4b52dd4.

📒 Files selected for processing (1)
  • apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx (3 hunks)

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 and usage tips.

Copy link
Contributor

@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

🧹 Nitpick comments (1)
apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx (1)

111-147: Consider using className and theme colors for better maintainability.

The component uses inline styles and hardcoded RGB values. Consider refactoring to use Tailwind classes or CSS variables for better maintainability and consistency with the rest of the codebase.

Example refactor:

   return (
-    <div
-      style={{
-        position: "relative",
-        width,
-        height,
-        minWidth: width,
-        minHeight: height,
-      }}
-    >
+    <div className="relative" style={{ width, height, minWidth: width, minHeight: height }}>
       <canvas ref={canvasRef} style={{ width, height }} />
-      <div
-        style={{
-          position: "absolute",
-          top: 0,
-          left: 0,
-          width: 12,
-          height: "100%",
-          background:
-            "linear-gradient(to right, rgb(254 242 242), transparent)",
-          pointerEvents: "none",
-        }}
-      />
+      <div 
+        className="absolute top-0 left-0 h-full pointer-events-none"
+        style={{ 
+          width: 12, 
+          background: "linear-gradient(to right, rgb(254 242 242 / 1), transparent)" 
+        }}
+      />
-      <div
-        style={{
-          position: "absolute",
-          top: 0,
-          right: 0,
-          width: 12,
-          height: "100%",
-          background: "linear-gradient(to left, rgb(254 242 242), transparent)",
-          pointerEvents: "none",
-        }}
-      />
+      <div 
+        className="absolute top-0 right-0 h-full pointer-events-none"
+        style={{ 
+          width: 12, 
+          background: "linear-gradient(to left, rgb(254 242 242 / 1), transparent)" 
+        }}
+      />
     </div>
   );

Note: The hardcoded rgb(254 242 242) appears to match the red-50 background. You might want to extract this to a CSS variable or use a Tailwind color reference to maintain consistency if the theme changes.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d31cbe3 and 265407a.

📒 Files selected for processing (2)
  • apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx (3 hunks)
  • apps/desktop/src/components/main/body/shared.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx
  • apps/desktop/src/components/main/body/shared.tsx
🧬 Code graph analysis (1)
apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx (1)
packages/utils/src/cn.ts (1)
  • cn (20-22)
⏰ 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). (7)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: desktop_ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: fmt
  • GitHub Check: desktop_ci (linux, depot-ubuntu-22.04-8)
  • GitHub Check: desktop_ci (macos, depot-macos-14)
🔇 Additional comments (4)
apps/desktop/src/components/main/body/shared.tsx (1)

2-2: LGTM!

Clean import update following the removal of SoundIndicator component.

apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx (3)

3-3: LGTM!

Import additions are necessary for the new ScrollingWaveform component's canvas rendering and animation logic.


23-41: LGTM!

Props are appropriately inlined for this internal component, following the coding guidelines for non-shared types.


263-290: LGTM!

The updated two-panel layout (waveform when not hovered, stop label when hovered) provides good UX. The cn usage follows the coding guidelines by using array syntax with logical grouping.

@ComputelessComputer ComputelessComputer force-pushed the feat/scrolling-waveform-audio-amplitude branch from 265407a to 7e8b457 Compare December 12, 2025 07:49
Copy link
Contributor

@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

🧹 Nitpick comments (2)
apps/desktop/src/components/main/body/shared.tsx (2)

48-49: Hover-only UI can be inaccessible for keyboard/touch users (close affordance never appears).

Consider also revealing the close button on focus (:focus-visible / group-focus-within) and/or always rendering it with visually-hidden text.

Also applies to: 72-74, 101-121


122-140: Add type="button" + aria-label on the icon-only close button; verify no nested interactive elements.

  • Without type="button", this can accidentally submit if used inside a <form>.
  • Icon-only button needs an accessible name (e.g. aria-label="Close tab").
  • With InteractiveButton asChild, double-check we’re not ending up with <button><button/></button> (invalid HTML) depending on how InteractiveButton renders.
               <button
+                type="button"
+                aria-label="Close tab"
                 onClick={(e) => {
                   e.stopPropagation();
                   handleCloseThis();
                 }}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 265407a and 7e8b457.

📒 Files selected for processing (2)
  • apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx (3 hunks)
  • apps/desktop/src/components/main/body/shared.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src/components/main/body/sessions/outer-header/listen.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/desktop/src/components/main/body/shared.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). (10)
  • GitHub Check: Redirect rules - hyprnote-storybook
  • GitHub Check: Header rules - hyprnote-storybook
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Pages changed - hyprnote-storybook
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: fmt
  • GitHub Check: desktop_ci (macos, depot-macos-14)
  • GitHub Check: desktop_ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: desktop_ci (linux, depot-ubuntu-22.04-8)
🔇 Additional comments (1)
apps/desktop/src/components/main/body/shared.tsx (1)

2-2: Prefer import * as React from "react" (or explicitly import React) if relying on React.ReactNode type.

This file uses React.ReactNode/React.MouseEvent but only imports useState; ensure the project’s TS config provides global React types (otherwise this becomes a type error).

@yujonglee yujonglee merged commit e963a3d into main Dec 12, 2025
11 of 15 checks passed
@yujonglee yujonglee deleted the feat/scrolling-waveform-audio-amplitude branch December 12, 2025 09:05
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.

2 participants