Skip to content

fix: improve meeting button visibility in light mode for non-selected items#83

Merged
NotYuSheng merged 21 commits intomainfrom
fix/meeting-buttons-light-mode-visibility-non-selected
Aug 7, 2025
Merged

fix: improve meeting button visibility in light mode for non-selected items#83
NotYuSheng merged 21 commits intomainfrom
fix/meeting-buttons-light-mode-visibility-non-selected

Conversation

@NotYuSheng
Copy link
Copy Markdown
Owner

Summary

This PR fixes visibility issues with meeting buttons in light mode, specifically improving the appearance and contrast of non-selected meeting buttons to enhance usability and readability.


Changes Made

  • Enhanced meeting button styling for better visibility in light mode
  • Improved contrast and visual clarity for non-selected meeting buttons
  • Better color scheme for light mode user interface
  • Maintained dark mode functionality while fixing light mode issues

Context / Rationale

Meeting buttons in light mode had poor visibility and contrast issues that made it difficult for users to:

  1. Clearly distinguish between different meetings
  2. Read meeting names effectively
  3. Navigate the meetings list comfortably
  4. Have consistent visual experience across themes

This fix ensures meeting buttons are clearly visible and accessible in both light and dark modes.


Related Docs or References

  • UI fix for accessibility and usability improvements
  • Theme consistency enhancement

General Checklist

  • I have tested these changes locally
  • I have updated relevant documentation or added comments where needed
  • I have linked relevant issues and tagged reviewers
  • I have followed coding conventions and naming standards

NotYuSheng and others added 21 commits August 6, 2025 09:07
- Add CSS shadow variables for light and dark modes
- Apply shadows to header card, main cards, and buttons
- Add subtle hover animations with lift effect on buttons
- Style transcript entries with shadows and rounded corners
- Enhance visual hierarchy and modern design aesthetics

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add subtle opacity reduction (50%) for disabled buttons
- Include not-allowed cursor for better UX indication
- Prevent hover animations on disabled state
- Clean, minimal approach without color changes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Slow down particle movement speed from 6 to 2 for subtler motion
- Add organizational color variety to particles using brand palette
- Keep original white connecting lines with full opacity unchanged
- Particles now use: #2998D5, #265289, #75797C, #bba88e, #c42030, #FFFFFF

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed sun icon visibility in light mode (☀️)
- Corrected CSS logic for checked/unchecked states
- Light mode: sun icon on left with blue gradient
- Dark mode: moon icon on right with gray gradient
- Smooth transitions between states with proper icon positioning

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace flat colors with subtle linear gradients for visual depth
- Add gradient backgrounds to app container, cards, and components
- Enhance button styling with gradient backgrounds and hover effects
- Improve transcript entries with gradient backgrounds
- Maintain organizational color palette while adding modern visual appeal
- Keep accessibility and contrast standards intact

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add professional styling to model selector dropdown
- Implement proper focus and hover states with organizational colors
- Use solid backgrounds for better cross-browser compatibility
- Improve responsive layout with better spacing and alignment
- Add consistent typography using Barlow font family
- Support both light and dark theme modes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace plain #bba88e borders with subtle gradient border effects
- Use CSS pseudo-elements for sophisticated gradient border technique
- Fix rectangular shadow issue by moving shadows to pseudo-elements
- Apply proper border-radius calculations for clean rounded corners
- Add theme-aware gradient variations for light and dark modes
- Improve visual depth and premium appearance of all cards

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove ugly red color (#c42030) from particle palette
- Increase particle opacity from 1.0 to 0.9 for much sharper appearance
- Make connecting lines more prominent (opacity 0.8, width 2.5px)
- Use darker shade of #bba88e (#8a7c6b) for connecting lines
- Reduce app background opacity to 50-60% so particles show through
- Improve particle backgrounds with more contrasting gradients
- Clean color palette: #2998D5, #265289, #75797C, #bba88e, #FFFFFF

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Convert recording, upload, and transcription buttons to discrete red design
- Use #F4393B for discrete buttons with icon-only interface and tooltips
- Implement prominent transcription button (#D32F2F) when file is uploaded
- Add "Process Audio" text to transcription button for better UX clarity
- Fix CSS specificity issues with \!important to override gradient backgrounds
- Ensure consistent button sizing (2.5rem width) across all states
- Support both light and dark mode themes with proper red color scheme

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace confusing MicOff icon with Square icon for stop recording
- Fix recording timer vertical alignment with action buttons
- Move recording indicator inside button group for better layout
- Add smooth hover effects to transcript/summary tabs
- Implement tab-like appearance with rounded top corners
- Add subtle blue background and border hints on tab hover
- Improve overall controls container alignment and spacing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Implement pause/resume recording functionality with MediaRecorder API
- Add professional HTML5 audio player with timeline scrubbing and volume control
- Enable manual control over when to process recorded audio (no auto-processing)
- Add discard recording option for better user control
- Improve button state management for different recording phases:
  * Default: [Mic] [Upload] [Process Audio]
  * Recording: [Pause] [Stop] [Process Audio]
  * Preview: [Trash] [Upload] [Process Audio] + Audio Player
- Add visual feedback for paused recording state (orange dot, timer shows "(Paused)")
- Style audio player to match app theme with custom controls
- Handle proper cleanup of audio URLs to prevent memory leaks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Refactored Dockerfile to use multi-stage build with nginx
- Added nginx.conf with production-ready configuration including gzip, security headers, and API proxying
- Updated docker-compose.yml port mapping from 3000:3000 to 80:80
- Removed unnecessary volume mounts for frontend container
- This addresses HTTPS requirements for getUserMedia API and improves production deployment

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove invalid 'must-revalidate' value from gzip_proxied directive
- Change frontend port mapping from 80:80 to 3000:80
- Comment out GPU deployment configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add audio player that displays when file is uploaded
- Allow users to preview uploaded audio before processing
- Add discard functionality for uploaded files
- Integrate same audio controls as recording feature
- Auto-clear uploaded file after processing
- Update button states to handle upload workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace emoji trash icon with Trash2 React icon component
- Change button style from btn-danger to btn-discrete for consistency
- Add tooltip for better user experience
- Use btn-icon class for consistent icon styling
- Match visual style of other action buttons (mic, upload)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Automatically select meeting after successful audio processing
- Set selectedMeetingId in both uploadFile and processAudio functions
- Ensures transcript appears immediately without manual selection
- Improves user experience by eliminating extra click step

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add pollJobStatus function to handle asynchronous job processing
- Replace synchronous processing assumption with proper status checking
- Handle backend responses that return 200 but indicate errors
- Add user-friendly error messages for failed processing
- Implement timeout protection (60 seconds max polling)
- Support both immediate transcript and job polling workflows
- Auto-select processed meeting when job completes successfully

Fixes issue where loading bar didn't properly wait for job completion
and backend errors weren't properly detected despite 200 HTTP status.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add separate location block for /jobs/ to handle sub-paths
- Fix routing for endpoints like /jobs/{uuid}/status and /jobs/{uuid}/transcript
- Maintain existing /jobs endpoint for job creation
- Ensure proper proxy_pass URLs for both patterns
- Add CORS handling for all job-related endpoints

Previously only /jobs was routed to backend, causing 404s for
status polling and other job management endpoints.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add \!important declarations to meeting button styles (.btn-past-1 through .btn-past-4)
- Override both background-color and background properties to prevent base .btn interference
- Force white text color with \!important for proper contrast
- Update hover states with consistent darker shades
- Apply fixes to both light and dark mode variants

Previously meeting buttons were invisible in light mode due to CSS
inheritance conflicts between base .btn styles and specific button colors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add dark mode specific hover styling for model select dropdown
- Change hover border color from blue to gold (#bba88e) in dark mode
- Update focus state to match gold theme in dark mode
- Maintain blue hover in light mode for consistency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
… items

- Increase CSS specificity by using .btn.btn-past-X selectors
- Add \!important to color property in hover states
- Override base .btn hover styles that were making buttons invisible
- Ensure white text color is maintained in all states
- Fix issue where non-selected meeting items weren't visible in light mode

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @NotYuSheng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the application's frontend by overhauling its deployment infrastructure and introducing a comprehensive UI/UX redesign. While the initial intent was to improve meeting button visibility in light mode, the changes extend far beyond, encompassing a transition to a multi-stage Docker build with Nginx for serving the React app, a complete visual refresh with modern gradients and shadows, and substantial improvements to audio recording controls and processing. These updates collectively aim to provide a more robust, visually appealing, and user-friendly experience.

Highlights

  • Infrastructure and Deployment Overhaul: I've refactored the frontend deployment strategy by transitioning from a direct Node.js server to a multi-stage Docker build that leverages Nginx to serve the React application. This includes a new nginx.conf file for efficient static file serving, routing, and API proxying.
  • Extensive UI/UX Redesign: I've implemented a comprehensive visual refresh for the application's light mode, introducing modern linear gradients for backgrounds and buttons, and adding subtle box shadows. This significantly improves the overall aesthetic and contrast, addressing the original visibility concerns and enhancing the user experience across the board.
  • Improved Audio Handling and User Controls: I've enhanced the audio recording and processing workflow by adding pause/resume functionality, allowing users more control over their recordings. Additionally, I've introduced audio preview sections for both recorded and uploaded files, and refactored the backend communication to poll for job status, ensuring a more robust handling of transcription processes.
  • Dependency Updates and Code Refinements: I've updated the react-router-dom dependency to the latest version and made several minor adjustments to package metadata and CSS variables for consistency and maintainability.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly refactors the frontend to use a production-ready multi-stage Docker build with Nginx, which is a great improvement. It also overhauls the UI/UX with new themes, button styles, and a more robust audio processing flow that includes polling and audio previews. My review focuses on improving the new Nginx configuration for maintainability and security, refactoring the CSS to avoid !important, and cleaning up the JavaScript logic in MeetingTranscriptionApp.js to reduce duplication and improve readability. Overall, these are excellent changes that enhance both the user experience and the production-readiness of the application.

Comment thread frontend/nginx.conf
Comment on lines +41 to +78
location /jobs/ {
proxy_pass http://backend:8000/jobs/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# Handle preflight requests for CORS
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE, PATCH';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
}

# Also handle exact /jobs endpoint (without trailing slash)
location /jobs {
proxy_pass http://backend:8000/jobs;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# Handle preflight requests for CORS
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE, PATCH';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The location blocks for /jobs/ and /jobs are duplicative and can be consolidated into a single block. This will improve maintainability.

    # Proxy API requests to backend
    location /jobs {
        proxy_pass http://backend:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        # Handle preflight requests for CORS
        if ($request_method = 'OPTIONS') {
            add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE, PATCH';
            add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization';
            add_header 'Access-Control-Max-Age' 1728000;
            add_header 'Content-Type' 'text/plain; charset=utf-8';
            add_header 'Content-Length' 0;
            return 204;
        }
    }

Comment on lines +693 to 697
.btn.btn-past-1 {
background-color: #2998d5 !important;
background: #2998d5 !important;
color: #fff !important;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The use of !important should be avoided as it makes CSS difficult to maintain and override. It's better to increase selector specificity to achieve the desired styles. This applies to all .btn-past-* and .btn-discrete* rules in this file.

Comment on lines +420 to 500
const uploadFile = async () => {
if (!selectedFile) return;
speakerColorMap.current = {};
setLoading(true);
const formData = new FormData();
formData.append("file", selectedFile);

try {
const formData = new FormData();
formData.append("file", selectedFile);

fetch(`${API_BASE_URL}/jobs`, {
method: "POST",
body: formData,
})
.then((result) => result.json())
.then((data) => {
setTranscript(
Array.isArray(data.transcript)
? processTranscriptWithSpeakerIds(data.transcript)
: [],
);
const response = await fetch(`${API_BASE_URL}/jobs`, {
method: "POST",
body: formData,
});

const data = await response.json();

// Check if the response indicates success and has expected data
if (data.error || (!data.uuid && !data.transcript)) {
throw new Error(data.error || 'Invalid response from server');
}

// If we get a transcript immediately, use it
if (data.transcript && Array.isArray(data.transcript)) {
setTranscript(processTranscriptWithSpeakerIds(data.transcript));
setSelectedMeetingId(data.uuid);
fetchSummary(data.uuid);
fetchMeetingList();
setLoading(false);
})
.catch((err) => {
console.error("Failed to fetch transcription.", err);
setLoading(false);
});
} else if (data.uuid) {
// Otherwise, poll for status
await pollJobStatus(data.uuid);
} else {
throw new Error('No transcript or job ID returned');
}

setSelectedFile(null);
} catch (err) {
console.error("Failed to process uploaded file:", err);
alert(`Failed to process file: ${err.message}`);
} finally {
setLoading(false);
}
};

const processAudio = async (audioBlob) => {
setIsProcessing(true);
const formData = new FormData();
formData.append("file", audioBlob);

try {
const formData = new FormData();
formData.append("file", audioBlob);

fetch(`${API_BASE_URL}/jobs`, {
method: "POST",
body: formData,
})
.then((result) => result.json())
.then((data) => {
setTranscript(
Array.isArray(data.transcript)
? processTranscriptWithSpeakerIds(data.transcript)
: [],
);
const response = await fetch(`${API_BASE_URL}/jobs`, {
method: "POST",
body: formData,
});

const data = await response.json();

// Check if the response indicates success and has expected data
if (data.error || (!data.uuid && !data.transcript)) {
throw new Error(data.error || 'Invalid response from server');
}

// If we get a transcript immediately, use it
if (data.transcript && Array.isArray(data.transcript)) {
setTranscript(processTranscriptWithSpeakerIds(data.transcript));
setSelectedMeetingId(data.uuid);
fetchSummary(data.uuid);
fetchMeetingList();
setIsProcessing(false);
})
.catch((err) => {
console.error("Failed to fetch transcription -", err);
setIsProcessing(false);
});
} else if (data.uuid) {
// Otherwise, poll for status
await pollJobStatus(data.uuid);
} else {
throw new Error('No transcript or job ID returned');
}
} catch (err) {
console.error("Failed to process recorded audio:", err);
alert(`Failed to process recording: ${err.message}`);
} finally {
setIsProcessing(false);
}
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The functions uploadFile and processAudio contain a lot of duplicated logic for handling file processing, API calls, and polling. This can be refactored into a single function that accepts the audio data (either a File or a Blob) as an argument. This will make the code more maintainable and reduce redundancy.

For example, you could create a helper function like this:

const processAndPollAudio = async (audioData) => {
  // ... common logic from uploadFile and processAudio
};

Comment thread frontend/nginx.conf

# Handle preflight requests for CORS
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using a wildcard * for Access-Control-Allow-Origin is overly permissive and can pose a security risk. It's recommended to restrict this to the specific domain of your frontend application. You could use an Nginx variable or an environment variable to make this configurable for different environments (e.g., development vs. production).

Comment on lines 761 to +858
<div className="button-group">
<button
onClick={isRecording ? stopRecording : startRecording}
className={`btn ${isRecording ? "btn-danger" : "btn-primary"}`}
>
{isRecording ? (
<MicOff className="btn-icon" />
) : (
<Mic className="btn-icon" />
)}
{isRecording ? "Stop Recording" : "Start Recording"}
</button>
{!isRecording && !recordedAudio && !selectedFile ? (
<>
<button
onClick={startRecording}
className="btn btn-discrete"
title="Start Recording"
>
<Mic className="btn-icon" />
</button>

<button
onClick={() => fileInputRef.current?.click()}
className="btn btn-secondary"
>
<Upload className="btn-icon" />
{selectedFile ? "Change Audio File" : "Upload Audio File"}
</button>
<button
onClick={() => fileInputRef.current?.click()}
className="btn btn-discrete"
title="Upload Audio File"
>
<Upload className="btn-icon" />
</button>
</>
) : isRecording ? (
<>
<button
onClick={isPaused ? resumeRecording : pauseRecording}
className="btn btn-discrete"
title={isPaused ? "Resume Recording" : "Pause Recording"}
>
{isPaused ? (
<Play className="btn-icon" />
) : (
<Pause className="btn-icon" />
)}
</button>

<button
onClick={stopRecording}
className="btn btn-discrete"
title="Stop Recording"
>
<Square className="btn-icon" />
</button>
</>
) : recordedAudio ? (
<>
<button
onClick={discardRecording}
className="btn btn-discrete"
title="Discard Recording"
>
<Trash2 className="btn-icon" />
</button>

<button
onClick={() => fileInputRef.current?.click()}
className="btn btn-discrete"
title="Upload Audio File"
>
<Upload className="btn-icon" />
</button>
</>
) : selectedFile ? (
<>
<button
onClick={discardUpload}
className="btn btn-discrete"
title="Discard Upload"
>
<Trash2 className="btn-icon" />
</button>

<button
onClick={startRecording}
className="btn btn-discrete"
title="Start Recording"
>
<Mic className="btn-icon" />
</button>
</>
) : null}

<button
onClick={uploadFile}
disabled={!selectedFile || loading}
className={`btn ${selectedFile ? "btn-primary" : "btn-disabled"}`}
onClick={recordedAudio ? processRecordedAudio : uploadFile}
disabled={(!selectedFile && !recordedAudio) || loading}
className={`btn ${(selectedFile || recordedAudio) && !loading ? "btn-discrete-prominent" : "btn-discrete"}`}
title={loading ? "Processing..." : "Process Audio"}
>
<Send className="btn-icon" />
{loading ? "Transcribing..." : "Start Transcription"}
{((selectedFile || recordedAudio) && !loading) ? "Process Audio" : ""}
</button>
</div>

{isRecording && (
<div className="recording-indicator">
<div className="recording-dot"></div>
<span className="recording-time">
{formatTime(recordingTime)}
</span>
</div>
)}
{isRecording && (
<div className="recording-indicator">
<div className={`recording-dot ${isPaused ? 'paused' : ''}`}></div>
<span className="recording-time">
{formatTime(recordingTime)} {isPaused ? '(Paused)' : ''}
</span>
</div>
)}
</div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The conditional logic for rendering the audio control buttons is quite complex and nested within the JSX. This makes it difficult to read and understand the different states of the UI. Consider extracting this logic into a separate helper function or a dedicated component that returns the correct set of buttons based on the component's state (isRecording, isPaused, recordedAudio, selectedFile). This will improve readability and maintainability.

Comment on lines +46 to +49
// eslint-disable-next-line no-unused-vars
const [isPlayingRecording, setIsPlayingRecording] = useState(false);
// eslint-disable-next-line no-unused-vars
const [isPlayingUpload, setIsPlayingUpload] = useState(false);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The state variables isPlayingRecording and isPlayingUpload and their setters are defined and updated, but their values are never used. This suggests they might be leftover from a previous implementation. If they are not needed, they should be removed to clean up the code.

setSelectedFile(null);
} catch (err) {
console.error("Failed to process uploaded file:", err);
alert(`Failed to process file: ${err.message}`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using alert() for error handling provides a poor user experience. Consider implementing a more integrated notification system, such as toast messages or inline error displays, to inform the user about failures in a less disruptive way. This also applies to the error handling in processAudio.

@NotYuSheng NotYuSheng merged commit 0c6759c into main Aug 7, 2025
1 check failed
@NotYuSheng NotYuSheng deleted the fix/meeting-buttons-light-mode-visibility-non-selected branch August 7, 2025 02:42
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