-
Notifications
You must be signed in to change notification settings - Fork 13k
feat: Media call notifications on desktop app #37492
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
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 8170d16 The changes in this PR will be included in the next version bump. This PR includes changesets to release 42 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds desktop notification support for VoIP: new hook to dispatch desktop notifications on ringing, avatar→PNG conversion utility, desktop-api dependency and Window typing, session shape extended with callId, provider integration, story/provider renames, and a new English localization key. Changes
Sequence Diagram(s)sequenceDiagram
participant Provider as MediaCallProvider
participant Hook as useDesktopNotifications
participant Session as Session State
participant Util as convertAvatarUrlToPng
participant API as RocketChatDesktop
Provider->>Hook: useDesktopNotifications(session)
Hook->>Session: subscribe to session changes
alt session.state == "ringing"
Hook->>Util: convertAvatarUrlToPng(avatarUrl)
Util-->>Hook: pngDataUrl or ""
Hook->>API: dispatchCustomNotification({type:"voice", title, body, avatar: png, requireInteraction:true})
API-->>Hook: notification displayed
else state != "ringing"
Hook->>Hook: clear previous notification if present
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (12)
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. Comment |
f844808 to
39377f3
Compare
… in i18n files" This reverts commit 75cbec9.
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/ui-voip/src/v2/useMediaSession.ts (1)
9-19: Address the unmapped 'hangup' CallState and add conditional state dispatchThe core concern is valid:
deriveWidgetStateFromCallStatelacks a case for the'hangup'CallState value (which exists in the media-signaling union), causing it to returnundefined. When dispatched into the reducer payload, this creates a transientstate: undefined, which violates theSessionInfodiscriminated union type despite theas SessionInfoassertion.While
getMainCall()filters out'hangup'calls before they reachupdateSessionState, the type inconsistency and implicit undefined handling remain fragile. Two practical fixes:
Explicitly map
'hangup'in the switch:case 'hangup': return undefined; // or map to a sensible state like 'closed'Conditionally dispatch state only when derived:
const state = deriveWidgetStateFromCallState(callState, role); dispatch({ type: 'instance_updated', payload: { ..., ...(state && { state }), ... } });The
callIdplumbing is correct and properly leveraged byuseDesktopNotifications—it extractssessionInfo.callIdonly whenstate === 'ringing', which the discriminated union guarantees to be a string. The caller/callee mapping for'none'/'ringing'is accurate.
🧹 Nitpick comments (4)
packages/ui-voip/src/v2/useMediaSessionInstance.ts (1)
22-33: callId threading at the SessionInfo level is consistentDefining
callId: undefinedonEmptySessionandcallId: stringonCallSessionyields the expectedstring | undefinedsurface forSessionInfo.callIdand matches howdefaultSessionInfoinitializes it inuseMediaSession.If you later need to access
callIdirrespective of session subtype, consider moving it ontoBaseSessionascallId: string | undefinedto avoid repeating it in the subinterfaces.packages/ui-voip/src/v2/utils/convertAvatarUrlToPng.ts (1)
1-36: Avatar → PNG conversion is robust with safe fallbacksThe utility cleanly handles missing URLs, canvas/context failures, and
toDataURLerrors by resolving to'', and usingcrossOrigin = 'anonymous'avoids tainted canvas crashes when CORS isn’t configured.If you expect slow or broken avatar endpoints, consider adding a simple timeout (e.g., via
setTimeout) that resolves to''if neitheronloadnoronerrorfires, so callers aren’t left awaiting a promise indefinitely.packages/i18n/src/locales/en.i18n.json (1)
2559-2563: Verify trailing comma after the new entryLooks good copy-wise and matches sentence case and "..." style used elsewhere. Please double‑check there’s a trailing comma after the new line to keep the JSON valid. If it’s missing, apply:
- "Incoming_call_ellipsis": "Incoming call..." + "Incoming_call_ellipsis": "Incoming call...",Also, keep sentence case for related notification strings as per prior guidance. Based on learnings.
packages/ui-voip/src/v2/useDesktopNotifications.ts (1)
56-65: Conditionally set notificationidand track it only when definedYou currently pass
id: sessionInfo.callIdand always assignpreviousCallId.current = sessionInfo.callId, which means you might sendid: undefinedand never store an ID for closing ifcallIdis absent. Given the desktop API’s contract thatCustomNotificationOptions.idis optional and notifications without an ID can’t be closed programmatically, it would be cleaner to only set and track the ID when it’s actually present. Based on learnings.A small refactor could look like:
- window.RocketChatDesktop?.dispatchCustomNotification({ - type: 'voice', - id: sessionInfo.callId, - payload: { - title: displayInfo.title, - body: t('Incoming_call_ellipsis'), - avatar: avatarAsPng || undefined, - requireInteraction: true, - }, - }); + const callId = sessionInfo.callId; + + window.RocketChatDesktop?.dispatchCustomNotification({ + type: 'voice', + ...(callId && { id: callId }), + payload: { + title: displayInfo.title, + body: t('Incoming_call_ellipsis'), + avatar: avatarAsPng || undefined, + requireInteraction: true, + }, + });And then only update the ref when you have a real ID:
- notifyDesktop(); - previousCallId.current = sessionInfo.callId; + notifyDesktop(); + if (sessionInfo.callId) { + previousCallId.current = sessionInfo.callId; + }This keeps the close logic aligned with the desktop API semantics and avoids passing
undefinedas an ID.Also applies to: 68-70
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (8)
packages/i18n/src/locales/en.i18n.json(1 hunks)packages/ui-voip/package.json(1 hunks)packages/ui-voip/src/global.d.ts(1 hunks)packages/ui-voip/src/v2/MediaCallProvider.tsx(2 hunks)packages/ui-voip/src/v2/useDesktopNotifications.ts(1 hunks)packages/ui-voip/src/v2/useMediaSession.ts(5 hunks)packages/ui-voip/src/v2/useMediaSessionInstance.ts(1 hunks)packages/ui-voip/src/v2/utils/convertAvatarUrlToPng.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37505
File: packages/i18n/src/locales/en.i18n.json:3765-3765
Timestamp: 2025-11-17T22:38:48.594Z
Learning: Rocket.Chat i18n copy: Keep sentence case for the value of "Notification_Desktop_show_voice_calls" in packages/i18n/src/locales/en.i18n.json (“Show desktop notifications for voice calls”) per design directive; do not change to Title Case even if nearby labels differ.
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 37491
File: packages/desktop-api/src/index.ts:17-27
Timestamp: 2025-11-17T14:30:36.246Z
Learning: In the Rocket.Chat desktop API (`packages/desktop-api/src/index.ts`), the `CustomNotificationOptions` type has an optional `id` field by design. Custom notifications dispatched without an ID cannot be closed programmatically using `closeCustomNotification`, and this is intentional.
📚 Learning: 2025-11-17T22:38:48.594Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37505
File: packages/i18n/src/locales/en.i18n.json:3765-3765
Timestamp: 2025-11-17T22:38:48.594Z
Learning: Rocket.Chat i18n copy: Keep sentence case for the value of "Notification_Desktop_show_voice_calls" in packages/i18n/src/locales/en.i18n.json (“Show desktop notifications for voice calls”) per design directive; do not change to Title Case even if nearby labels differ.
Applied to files:
packages/ui-voip/src/v2/useDesktopNotifications.tspackages/i18n/src/locales/en.i18n.json
📚 Learning: 2025-11-17T14:30:36.246Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 37491
File: packages/desktop-api/src/index.ts:17-27
Timestamp: 2025-11-17T14:30:36.246Z
Learning: In the Rocket.Chat desktop API (`packages/desktop-api/src/index.ts`), the `CustomNotificationOptions` type has an optional `id` field by design. Custom notifications dispatched without an ID cannot be closed programmatically using `closeCustomNotification`, and this is intentional.
Applied to files:
packages/ui-voip/src/v2/useDesktopNotifications.tspackages/ui-voip/src/global.d.ts
🧬 Code graph analysis (5)
packages/ui-voip/src/v2/useMediaSessionInstance.ts (1)
packages/ui-voip/src/v2/MediaCallContext.ts (1)
State(26-26)
packages/ui-voip/src/v2/useDesktopNotifications.ts (2)
packages/ui-voip/src/v2/useMediaSessionInstance.ts (1)
SessionInfo(33-33)packages/ui-voip/src/v2/utils/convertAvatarUrlToPng.ts (1)
convertAvatarUrlToPng(1-36)
packages/ui-voip/src/v2/useMediaSession.ts (2)
packages/media-signaling/src/definition/call/IClientMediaCall.ts (2)
CallState(21-27)CallRole(17-17)packages/ui-voip/src/v2/MediaCallContext.ts (1)
State(26-26)
packages/ui-voip/src/v2/MediaCallProvider.tsx (1)
packages/ui-voip/src/v2/useDesktopNotifications.ts (1)
useDesktopNotifications(22-75)
packages/ui-voip/src/global.d.ts (2)
packages/desktop-api/src/index.ts (1)
IRocketChatDesktop(29-66)apps/meteor/client/definitions/global.d.ts (1)
Window(5-29)
⏰ 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). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (5)
packages/ui-voip/package.json (1)
21-28: Desktop API dependency addition looks correctAdding
@rocket.chat/desktop-apias a workspace dependency aligns with the newIRocketChatDesktoptyping in ui-voip and keeps this package ready for desktop integration.Please confirm that the workspace builds/tests are passing with this new dependency resolved for
@rocket.chat/ui-voip.packages/ui-voip/src/global.d.ts (1)
1-7: Window augmentation for RocketChatDesktop is well‑formedType‑only importing
IRocketChatDesktopand augmentingWindowviadeclare globalmatches the desktop API shape and lets ui-voip safely referencewindow.RocketChatDesktopin this package.Ensure this
global.d.tsis picked up by the ui-voip tsconfig (e.g., viainclude/files) so theWindowaugmentation is visible whereverwindow.RocketChatDesktopis used.packages/ui-voip/src/v2/MediaCallProvider.tsx (2)
22-22: LGTM!The import statement is correct and follows the established pattern for local imports.
41-42: The original review comment is incorrect; no actionable issue exists.The code properly uses TypeScript's discriminated union pattern.
SessionInfois typed asEmptySession | CallSession, where:
EmptySessionhascallId: undefined(when state is 'closed' or 'new')CallSessionhascallId: string(when state is 'calling', 'ringing', or 'ongoing')The notification dispatch at line 58 is guarded by the check at line 50 (
if (sessionInfo.state !== 'ringing')), which ensures the code only reaches the dispatch whenstate === 'ringing'. At that point, the type system guarantees we're in aCallSessionstate, sosessionInfo.callIdis always astring, never undefined.The notification is therefore always dispatched with a valid ID and can be closed programmatically, as required.
packages/ui-voip/src/v2/useDesktopNotifications.ts (1)
22-74: Desktop notification hook wiring looks solidThe overall flow (deriving display info, guarding on
ringingstate and desktop API presence, async avatar PNG conversion, and closing the previous notification when the call leavesringing) is coherent and matches the media-call notification requirements. I don’t see correctness issues in the lifecycle handling here.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/ui-voip/src/v2/useMediaSession.ts (1)
52-65: Add explicit default case for clarity.The switch statement implicitly returns
undefinedfor unhandledCallStatevalues, which matches the return type. However, adding an explicitdefaultcase would improve code clarity and maintainability.Apply this diff:
const deriveWidgetStateFromCallState = ( callState: CallState, callRole: CallRole, ): Extract<State, 'ongoing' | 'ringing' | 'calling'> | undefined => { switch (callState) { case 'active': case 'accepted': case 'renegotiating': return 'ongoing'; case 'none': case 'ringing': return callRole === 'callee' ? 'ringing' : 'calling'; + default: + return undefined; } };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (4)
.changeset/sixty-numbers-tan.md(1 hunks)packages/ui-voip/src/v2/MediaCallProvider.tsx(2 hunks)packages/ui-voip/src/v2/useMediaSession.ts(5 hunks)packages/ui-voip/src/v2/useMediaSessionInstance.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/ui-voip/src/v2/MediaCallProvider.tsx
- packages/ui-voip/src/v2/useMediaSessionInstance.ts
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37505
File: packages/i18n/src/locales/en.i18n.json:3765-3765
Timestamp: 2025-11-17T22:38:48.631Z
Learning: Rocket.Chat i18n copy: Keep sentence case for the value of "Notification_Desktop_show_voice_calls" in packages/i18n/src/locales/en.i18n.json (“Show desktop notifications for voice calls”) per design directive; do not change to Title Case even if nearby labels differ.
📚 Learning: 2025-11-17T22:38:48.631Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37505
File: packages/i18n/src/locales/en.i18n.json:3765-3765
Timestamp: 2025-11-17T22:38:48.631Z
Learning: Rocket.Chat i18n copy: Keep sentence case for the value of "Notification_Desktop_show_voice_calls" in packages/i18n/src/locales/en.i18n.json (“Show desktop notifications for voice calls”) per design directive; do not change to Title Case even if nearby labels differ.
Applied to files:
.changeset/sixty-numbers-tan.md
📚 Learning: 2025-11-17T14:30:36.271Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 37491
File: packages/desktop-api/src/index.ts:17-27
Timestamp: 2025-11-17T14:30:36.271Z
Learning: In the Rocket.Chat desktop API (`packages/desktop-api/src/index.ts`), the `CustomNotificationOptions` type has an optional `id` field by design. Custom notifications dispatched without an ID cannot be closed programmatically using `closeCustomNotification`, and this is intentional.
Applied to files:
.changeset/sixty-numbers-tan.md
⏰ 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). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (5)
.changeset/sixty-numbers-tan.md (1)
1-6: LGTM! Changeset is well-formed.The changeset correctly declares minor version bumps for the affected packages and provides a clear description of the feature.
packages/ui-voip/src/v2/useMediaSession.ts (4)
11-11: LGTM! callId field added to default session state.The addition of
callId: undefinedtodefaultSessionInfocorrectly establishes the default value for the new session identifier field used by desktop notifications.
150-161: LGTM! callId properly extracted from mainCall.The destructuring correctly extracts
callIdfrom the main call object, making it available for inclusion in the session state updates.
167-182: LGTM! callId correctly included in SIP contact state updates.The
callIdis properly threaded through to the dispatch payload for SIP contacts, maintaining consistency with the session state structure.
206-209: SessionInfo type and callId integration verified—no issues found.The
SessionInfotype correctly includes thecallIdfield in bothEmptySession(asundefined) andCallSession(asstring). The desktop notification integration inuseDesktopNotifications.tsalready properly handlescallIdacross lines 58, 69, and 74. The dispatch change at lines 206-209 is type-safe and consistent with existing patterns.
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/ui-voip/src/v2/MediaCallProvider.tsx (1)
45-46: Consider error handling for desktop notifications.The integration looks correct. However, reviewing
useDesktopNotifications.ts(lines 27-46), the asyncnotifyDesktop()function lacks error handling. IfconvertAvatarUrlToPngthrows or the notification dispatch fails, errors will be silently swallowed.Consider wrapping the async logic in a try-catch block in
useDesktopNotifications.ts:const notifyDesktop = async () => { try { const avatarAsPng = await convertAvatarUrlToPng(displayInfo.avatar); if (!isMounted) { return; } window.RocketChatDesktop?.dispatchCustomNotification({ type: 'voice', id: sessionInfo.callId, payload: { title: displayInfo.title, body: t('Incoming_call_ellipsis'), avatar: avatarAsPng || undefined, requireInteraction: true, }, }); } catch (error) { console.error('Failed to dispatch desktop notification:', error); } };Would you like me to open an issue to track adding error handling to the notification hook?
packages/ui-voip/src/v2/MockedMediaCallProvider.tsx (1)
10-18: Props typing and defaults are consistent with MediaCallContextStateThe new
MockedMediaCallProviderPropstype and the destructured defaults (state = 'closed', boolean flags defaulting tofalse) align with theStateunion and the existing context usage, while keepingtransferredByoptional. This makes the mock safer and clearer to use in stories without changing runtime behavior.If the mock is meant to stay in sync with the real
MediaCallProviderprops, consider deriving this type from that one (e.g., viaPick/Partialor a shared base interface) to avoid future drift.Also applies to: 20-28
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (11)
packages/ui-voip/src/v2/MediaCallProvider.tsx(2 hunks)packages/ui-voip/src/v2/MediaCallWidget.stories.tsx(2 hunks)packages/ui-voip/src/v2/MockedMediaCallProvider.tsx(2 hunks)packages/ui-voip/src/v2/components/Widget/Widget.tsx(2 hunks)packages/ui-voip/src/v2/useKeypad.tsx(1 hunks)packages/ui-voip/src/v2/views/IncomingCall.stories.tsx(2 hunks)packages/ui-voip/src/v2/views/IncomingCallTransfer.stories.tsx(2 hunks)packages/ui-voip/src/v2/views/NewCall.stories.tsx(2 hunks)packages/ui-voip/src/v2/views/OngoingCall.stories.tsx(3 hunks)packages/ui-voip/src/v2/views/OutgoingCall.stories.tsx(2 hunks)packages/ui-voip/src/v2/views/OutgoingCallTransfer.stories.tsx(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/ui-voip/src/v2/views/OutgoingCallTransfer.stories.tsx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37505
File: packages/i18n/src/locales/en.i18n.json:3765-3765
Timestamp: 2025-11-17T22:38:48.631Z
Learning: Rocket.Chat i18n copy: Keep sentence case for the value of "Notification_Desktop_show_voice_calls" in packages/i18n/src/locales/en.i18n.json (“Show desktop notifications for voice calls”) per design directive; do not change to Title Case even if nearby labels differ.
📚 Learning: 2025-11-17T15:07:13.273Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37398
File: packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx:357-363
Timestamp: 2025-11-17T15:07:13.273Z
Learning: In packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx, IconElement is a presentational, non-actionable element that does not require wrapping in AppIdProvider, similar to plain_text and mrkdwn renderers. Only actionable elements (those with actions, actionId, or interactive behavior) should be wrapped in AppIdProvider.
Applied to files:
packages/ui-voip/src/v2/useKeypad.tsx
🧬 Code graph analysis (3)
packages/ui-voip/src/v2/views/OngoingCall.stories.tsx (1)
packages/ui-voip/src/v2/MediaCallWidget.stories.tsx (1)
OngoingCall(86-90)
packages/ui-voip/src/v2/MockedMediaCallProvider.tsx (1)
packages/ui-voip/src/v2/MediaCallContext.ts (1)
State(26-26)
packages/ui-voip/src/v2/MediaCallProvider.tsx (1)
packages/ui-voip/src/v2/useDesktopNotifications.ts (1)
useDesktopNotifications(22-75)
⏰ 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). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🔇 Additional comments (11)
packages/ui-voip/src/v2/useKeypad.tsx (1)
2-8: LGTM! Type import modernization.The change from
React.ReactNodeto directly importedReactNodeis correct and follows modern React TypeScript conventions. This is functionally equivalent with no runtime or type-safety impact.packages/ui-voip/src/v2/components/Widget/Widget.tsx (1)
3-3: LGTM: Type import standardization.The change from
React.ReactNodetoReactNodeis an idiomatic improvement that reduces reliance on the React namespace.Also applies to: 31-31
packages/ui-voip/src/v2/MediaCallProvider.tsx (1)
14-14: LGTM: Type improvements and API clarification.Extracting
MediaCallProviderPropsas a named type and standardizing onReactNodeimproves type clarity and follows React best practices.Also applies to: 29-31, 33-33
packages/ui-voip/src/v2/views/OutgoingCall.stories.tsx (1)
5-5: LGTM: Consistent provider rename.The rename from
MediaCallProviderMocktoMockedMediaCallProviderimproves naming clarity and is consistently applied across all story files.Also applies to: 20-22
packages/ui-voip/src/v2/views/OngoingCall.stories.tsx (1)
5-5: LGTM: Consistent provider rename across all story variants.All story variants correctly use
MockedMediaCallProviderwith appropriate props.Also applies to: 15-17, 28-30, 36-38, 44-46, 52-54, 60-62
packages/ui-voip/src/v2/views/NewCall.stories.tsx (1)
5-5: LGTM: Consistent provider rename.The story correctly uses
MockedMediaCallProvider.Also applies to: 21-23
packages/ui-voip/src/v2/views/IncomingCall.stories.tsx (1)
5-5: LGTM: Consistent provider rename.The story correctly uses
MockedMediaCallProvider.Also applies to: 21-23
packages/ui-voip/src/v2/views/IncomingCallTransfer.stories.tsx (1)
5-5: LGTM: Consistent provider rename with correct props.The story correctly uses
MockedMediaCallProviderwith thetransferredByprop.Also applies to: 22-24
packages/ui-voip/src/v2/MediaCallWidget.stories.tsx (1)
7-7: LGTM: Consistent provider rename with dynamic props.The story correctly uses
MockedMediaCallProviderwith spread props from story args, enabling flexible story configuration.Also applies to: 29-31
packages/ui-voip/src/v2/MockedMediaCallProvider.tsx (2)
2-2: ImportingReactNodefor typed children looks correct
ReactNodeis correctly imported and used to typechildren, matching common React patterns; no issues here.
152-152: Verification confirms successful migrationThe search found no remaining references to
MediaCallProviderMockin the codebase, confirming all imports and usages have been properly updated to the newMockedMediaCallProvidername. The rename is complete and consistent throughout the project.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37492 +/- ##
===========================================
+ Coverage 68.97% 68.99% +0.01%
===========================================
Files 3359 3359
Lines 114224 114213 -11
Branches 20535 20535
===========================================
+ Hits 78788 78801 +13
+ Misses 33345 33324 -21
+ Partials 2091 2088 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Dispatch desktop notifications for incoming calls.
Consumes the API declared here
Issue(s)
VGA-61
Steps to test or reproduce
Further comments
Summary by CodeRabbit