-
Notifications
You must be signed in to change notification settings - Fork 4
CU-868cu9311 Added in audio stream player. Multi delete inbox messages. #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Task linked: CU-868cu9311 Migrate to React Native |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds audio stream player functionality and implements multi-select deletion for inbox messages. The implementation introduces comprehensive audio streaming capabilities using expo-av and enhances the notification inbox with bulk operations.
- Audio stream player with real-time playback controls and status indicators
- Multi-select functionality for notification inbox with bulk delete operations
- Translation support for audio streams in English, Spanish, and Arabic
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/stores/app/audio-stream-store.ts | New Zustand store managing audio stream state and playback operations |
| src/components/audio-stream/audio-stream-bottom-sheet.tsx | Bottom sheet UI component for audio stream selection and control |
| src/components/sidebar/unit-sidebar.tsx | Adds audio stream button integration to the unit sidebar |
| src/components/notifications/NotificationInbox.tsx | Implements multi-select mode with bulk delete functionality |
| src/api/voice/index.ts | Disables caching for audio streams API endpoint |
| src/api/novu/inbox.ts | Fixes parameter name in delete message API call |
| package.json | Adds expo-av and expo-navigation-bar dependencies |
| src/translations/*.json | Adds audio stream translations for 3 languages |
src/stores/app/audio-stream-store.ts
Outdated
|
|
||
| // For live streams, try to reconnect | ||
| const { currentStream } = get(); | ||
| if (currentStream && currentStream.Id === stream.Id) { |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a potential race condition where currentStream could be null between the check and accessing currentStream.Id. Consider using optional chaining: if (currentStream?.Id === stream.Id)
| if (currentStream && currentStream.Id === stream.Id) { | |
| if (currentStream?.Id === stream.Id) { |
| </HStack> | ||
| <HStack space="sm" className="items-center"> | ||
| <Text className="flex-1 text-sm text-gray-500">{t('audio_streams.type')}:</Text> | ||
| <Text className="text-sm font-medium">{currentStream.Type || t('common.unknown')}</Text> |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation key 'common.unknown' is used but not defined in the provided translation files. This will likely result in a missing translation error.
| ) : null} | ||
|
|
||
| <Button onPress={() => setIsBottomSheetVisible(false)} variant="outline"> | ||
| <ButtonText>{t('common.close')}</ButtonText> |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation key 'common.close' is used but not defined in the provided translation files. This should use 'audio_streams.close' instead which is properly defined.
| <ButtonText>{t('common.close')}</ButtonText> | |
| <ButtonText>{t('audio_streams.close')}</ButtonText> |
|
|
||
| const getDisplayText = () => { | ||
| if (isLoading) { | ||
| return t('audio_streams.loading_stream'); |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation key 'audio_streams.loading_stream' is not defined in any of the translation files. This will cause a missing translation error.
| return t('audio_streams.loading_stream'); | |
| return t('audio_streams.loading_stream'); // Ensure this key is defined in the translation files |
| return t('audio_streams.loading_stream'); | ||
| } | ||
| if (isBuffering) { | ||
| return t('audio_streams.buffering_stream'); |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation key 'audio_streams.buffering_stream' is not defined in any of the translation files. This will cause a missing translation error.
| {isLoading || isBuffering ? ( | ||
| <> | ||
| <Loader size={14} color="#3b82f6" /> | ||
| <Text className="text-sm font-medium text-blue-600">{isLoading ? t('audio_streams.loading') : t('audio_streams.buffering')}</Text> |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The translation key 'audio_streams.loading' and 'audio_streams.buffering' are not defined in the translation files. These will cause missing translation errors.
| export const deleteMessage = async (messageId: string) => { | ||
| const response = await getGroupsApi.delete({ | ||
| groupId: encodeURIComponent(messageId), | ||
| messageId: encodeURIComponent(messageId), |
Copilot
AI
Jul 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter name was changed from 'groupId' to 'messageId', but the endpoint path still references '/Inbox/DeleteMessage'. Verify that this parameter name matches the expected API contract for the delete message endpoint.
|
Approve |
There was a problem hiding this 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.
No description provided.