Skip to content

Develop#101

Merged
ucswift merged 2 commits intomasterfrom
develop
Jan 28, 2026
Merged

Develop#101
ucswift merged 2 commits intomasterfrom
develop

Conversation

@ucswift
Copy link
Member

@ucswift ucswift commented Jan 28, 2026

Summary by CodeRabbit

  • New Features

    • Added audio device selection functionality supporting Bluetooth devices, microphones, and speakers with availability indicators.
    • Implemented error notifications when audio stream loading fails.
  • UI/UX Improvements

    • Optimized control button layout distribution and spacing in bottom sheet interfaces.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

This PR improves error handling and UI polish across multiple components. It adds toast-based error notifications for audio stream loading failures, adjusts button layout spacing in the LiveKit bottom sheet, simplifies conditional rendering logic in personnel components, and expands translation strings to support audio device selection UI and error messages across Arabic, English, and Spanish.

Changes

Cohort / File(s) Summary
Audio Stream Error Handling
src/components/audio-stream/audio-stream-bottom-sheet.tsx
Adds toast notification for stream loading failures; updates UI imports from relative to absolute paths; adds useToast hook and includes toast in dependency array
Layout Refinements
src/components/livekit/livekit-bottom-sheet.tsx
Updates control button distribution from space-around to space-evenly and adds width: '100%' to ensure full container span
Avatar Rendering Simplification
src/components/personnel/personnel-card.tsx, src/components/personnel/personnel-details-sheet.tsx
Consolidates conditional avatar rendering into inline JSX; preserves error state handling and fallback behavior while reducing nesting
Formatting
src/stores/app/audio-stream-store.ts
Whitespace-only changes in catch block; no functional modifications
Translation Additions
src/translations/ar.json, src/translations/en.json, src/translations/es.json
Adds error_loading_stream key under audio_streams for stream error messages; introduces new audio_device_selection object under settings with device-related UI strings (bluetooth, microphone, speaker, availability states)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Syncing #94: Modifies audio-stream-bottom-sheet.tsx for stream-selection UI enhancements with currentStream value binding
  • Develop #100: Updates personnel-card.tsx and personnel-details-sheet.tsx avatar component utilities

Poem

🐰 A toast for errors caught with grace,
Audio streams now have their place.
Avatars simplified, layouts spread wide,
Translations bloom on every side! 🎵
Polish and care in every line—
Our responder app will surely shine! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The pull request title 'Develop' is vague and does not convey meaningful information about the changeset, which includes audio stream error handling, layout adjustments, avatar rendering refactoring, and translation additions. Provide a more descriptive title that summarizes the main changes, such as 'Add audio stream error handling and audio device selection UI' or 'Refactor audio components with improved error handling and translations'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@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)
src/stores/app/audio-stream-store.ts (1)

185-193: Remove the extra blank lines in the catch block.

Static analysis flags the stray empty lines; trimming them avoids lint noise.

🧹 Suggested cleanup
       set({
         soundObject: null,
         currentStream: null,
         isPlaying: false,
         isLoading: false,
         isBuffering: false,
       });
-
-
     }
   },
🤖 Fix all issues with AI agents
In `@src/components/audio-stream/audio-stream-bottom-sheet.tsx`:
- Line 248: Remove the stray trailing newline at the end of the
audio-stream-bottom-sheet.tsx file (the AudioStreamBottomSheet component file)
to satisfy lint/formatter; either delete the extra blank line at EOF or run the
project's formatter (e.g., prettier/clang-format) to normalize file endings so
there is a single newline at EOF per project settings.
🧹 Nitpick comments (2)
src/components/personnel/personnel-card.tsx (1)

41-44: Use a ternary for conditional rendering here.

This aligns with the project’s rendering style rule.

♻️ Suggested refactor
-            {!imageError && <AvatarImage source={{ uri: avatarUrl }} onError={() => setImageError(true)} />}
-            {imageError && <AvatarFallbackText className="text-white">{initials}</AvatarFallbackText>}
+            {imageError ? (
+              <AvatarFallbackText className="text-white">{initials}</AvatarFallbackText>
+            ) : (
+              <AvatarImage source={{ uri: avatarUrl }} onError={() => setImageError(true)} />
+            )}

As per coding guidelines, use ternary operator ? : for conditional rendering and not &&.

src/components/personnel/personnel-details-sheet.tsx (1)

96-99: Use a ternary for conditional rendering here.

This aligns with the project’s rendering style rule.

♻️ Suggested refactor
-              {!imageError && <AvatarImage source={{ uri: avatarUrl }} onError={() => setImageError(true)} />}
-              {imageError && <AvatarFallbackText className="text-white">{initials}</AvatarFallbackText>}
+              {imageError ? (
+                <AvatarFallbackText className="text-white">{initials}</AvatarFallbackText>
+              ) : (
+                <AvatarImage source={{ uri: avatarUrl }} onError={() => setImageError(true)} />
+              )}

As per coding guidelines, use ternary operator ? : for conditional rendering and not &&.

</Actionsheet>
);
};

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

Resolve the lint warning about the trailing newline.

Static analysis flags a stray newline at EOF; please run the formatter or remove the extra line.

🧰 Tools
🪛 GitHub Check: test

[warning] 248-248:
Delete

🤖 Prompt for AI Agents
In `@src/components/audio-stream/audio-stream-bottom-sheet.tsx` at line 248,
Remove the stray trailing newline at the end of the
audio-stream-bottom-sheet.tsx file (the AudioStreamBottomSheet component file)
to satisfy lint/formatter; either delete the extra blank line at EOF or run the
project's formatter (e.g., prettier/clang-format) to normalize file endings so
there is a single newline at EOF per project settings.

@ucswift
Copy link
Member Author

ucswift commented Jan 28, 2026

Approve

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift ucswift merged commit 3354d61 into master Jan 28, 2026
13 of 14 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 28, 2026
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