Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Nov 24, 2025

Proposed changes (including videos or screenshots)

Issue(s)

VGA-81

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Refactor
    • Reorganized internal module structure and consolidated import paths across the VOIP package to improve code organization and maintainability.
    • Streamlined component and hook exports through centralized barrel modules.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 24, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.14.0, but it targets 7.13.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Nov 24, 2025

⚠️ No Changeset found

Latest commit: 8556828

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 24, 2025

Walkthrough

Reorganizes the ui-voip package structure by consolidating imports through barrel files. Moves context-related exports to a dedicated context/index.ts, views to views/index.ts, and updates import paths across 35+ files to resolve dependencies from these centralized locations instead of nested relative paths.

Changes

Cohort / File(s) Change Summary
Context Barrel Consolidation
packages/ui-voip/src/context/index.ts
Adds public re-exports for useMediaCallContext, useMediaCallExternalContext, MediaCallContext (default), types PeerInfo and ConnectionState, isFirstPeerAutocompleteOption, and MockedMediaCallProvider
Context Module Updates
packages/ui-voip/src/context/MediaCallContext.ts, packages/ui-voip/src/context/MediaCallProvider.tsx, packages/ui-voip/src/context/useDesktopNotifications.ts
Updates import paths to use new module locations (../components, ../views, ../utils); adjusts where PeerAutocompleteOptions, MediaCallWidget, TransferModal, and utility imports resolve from
Components Index Export
packages/ui-voip/src/components/index.ts
Adds new named exports: useKeypad from ./Keypad/useKeypad and useInfoSlots from ./PeerInfo/useInfoSlots
Components Import Path Updates
packages/ui-voip/src/components/DevicePicker.tsx, packages/ui-voip/src/components/PeerAutocomplete.tsx, packages/ui-voip/src/components/PeerInfo/InternalUser.tsx, packages/ui-voip/src/components/PeerInfo/useInfoSlots.ts, packages/ui-voip/src/components/Keypad/useKeypad.tsx, packages/ui-voip/src/components/Keypad/Keypad.stories.tsx, packages/ui-voip/src/components/Widget/Widget.tsx
Consolidates imports to use centralized barrel paths (../context, ../hooks) instead of nested relative imports; changes Keypad import from named to default export
Hooks Barrel and Updates
packages/ui-voip/src/hooks/index.ts, packages/ui-voip/src/hooks/useDevicePermissionPrompt.tsx, packages/ui-voip/src/hooks/useMediaCallAction.ts, packages/ui-voip/src/hooks/VoipPopupDraggable/DraggableCore.ts
Exports useDraggable and useMediaCallAction; updates import sources to use ../context and ../views barrel locations; converts OffCallbackHandler to type-only import
Views Index Consolidation
packages/ui-voip/src/views/index.ts
Adds exports for TransferModal (default), wildcard re-export from ./MediaCallWidget, and PermissionFlowModal with its type
Views Module Index
packages/ui-voip/src/views/MediaCallWidget/index.ts
Adds export MediaCallWidget (default) from ./MediaCallWidget
Views Component Updates
packages/ui-voip/src/views/MediaCallWidget/*.tsx, packages/ui-voip/src/views/MediaCallWidget/*.stories.tsx, packages/ui-voip/src/views/TransferModal.tsx (all 11 files in MediaCallWidget and TransferModal)
Updates import paths to resolve context hooks from ../../context, components from ../../components, and MockedMediaCallProvider as named import from ../../context; adjusts module dependency sources throughout
Top-Level Package Exports
packages/ui-voip/src/index.ts
Moves MediaCallProvider export source to ./context; replaces bulk ./hooks re-export with selective exports from ./context (MediaCallContext, useMediaCallExternalContext as useMediaCallContext, type PeerInfo); keeps useMediaCallAction from ./hooks
v2 Module Deprecation
packages/ui-voip/src/v2/index.ts
Removes public re-exports for useMediaCallContext, useMediaCallExternalContext, MediaCallContext (default), type PeerInfo, MediaCallWidget (default), and useMediaCallAction (consolidates to context/components barrels)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Consistency validation: Verify all 35+ files have consistent import path updates following the new barrel structure. Check that no broken import references remain after the consolidation.
  • Export surface correctness: Confirm that the main src/index.ts, src/context/index.ts, and src/views/index.ts exports are complete and correct, and that the removal of exports from v2/index.ts does not break external consumers if this is part of a stable public API.
  • Stories and test files: Validate that all .stories.tsx files correctly import MockedMediaCallProvider from the new ../../context location.
  • Type import handling: Verify type-only imports are properly converted in files like VoipPopupDraggable/DraggableCore.ts where the import style changed.

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo
  • tassoevan

Poem

🐰 Bunny's Refactor Song

Imports once scattered, now gathered with care,
Barrels consolidated, clean structure to share,
Context and views in their organized place,
Module paths tidied, no nested disgrace,
Hop to the future—a cleaner codebase! 🌟

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main objective of the PR: reorganizing the ui-voip package folder structure.
Linked Issues check ✅ Passed The PR reorganizes the ui-voip package folder structure, consolidating imports, centralizing context exports, and restructuring module paths, which aligns with the VGA-81 objective.
Out of Scope Changes check ✅ Passed All changes are focused on refactoring import paths and module organization within the ui-voip package to improve folder structure; no unrelated functionality modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ui-voip/folderOrg

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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 346MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -1.2KiB
queue-worker-service 132MiB 132MiB -596B
ddp-streamer-service 127MiB 127MiB +353B
account-service 114MiB 114MiB +2.5KiB
stream-hub-service 111MiB 111MiB +588B
authorization-service 111MiB 111MiB +628B
presence-service 111MiB 111MiB +372B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/25 15:21 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 7 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37593
  • Baseline: develop
  • Timestamp: 2025-11-25 15:21:47 UTC
  • Historical data points: 7

Updated: Tue, 25 Nov 2025 15:21:48 GMT

@gabriellsh gabriellsh marked this pull request as ready for review November 25, 2025 14:55
@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Nov 25, 2025
@gabriellsh gabriellsh added this to the 7.14.0 milestone Nov 25, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 25, 2025
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.83%. Comparing base (ccc06a1) to head (8556828).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #37593   +/-   ##
========================================
  Coverage    68.83%   68.83%           
========================================
  Files         3361     3361           
  Lines       114341   114340    -1     
  Branches     20619    20619           
========================================
+ Hits         78704    78707    +3     
+ Misses       33541    33538    -3     
+ Partials      2096     2095    -1     
Flag Coverage Δ
e2e 57.33% <ø> (+<0.01%) ⬆️
e2e-api 42.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

♻️ Duplicate comments (1)
packages/ui-voip/src/views/MediaCallWidget/OutgoingCall.stories.tsx (1)

5-5: Verify MockedMediaCallProvider is exported as a named export.

Same as in IncomingCallTransfer.stories.tsx - the import style changed from default to named. This should be verified along with the previous file to ensure consistency.

🧹 Nitpick comments (1)
packages/ui-voip/src/index.ts (1)

1-5: Public API aliasing and backward compatibility for media call hooks

This top-level barrel looks clean, and aliasing useMediaCallExternalContext as useMediaCallContext is a reasonable public API choice. The only risk is existing consumers that might still import useMediaCallExternalContext from this package or from the old ./v2 paths.

If you want to keep top-level BC while standardizing on useMediaCallContext for new code, you could additionally re-export the original name:

-export { MediaCallContext, useMediaCallExternalContext as useMediaCallContext, type PeerInfo } from './context';
+export {
+  MediaCallContext,
+  useMediaCallExternalContext,
+  useMediaCallExternalContext as useMediaCallContext,
+  type PeerInfo,
+} from './context';

And please double-check that all internal callers were updated off ./v2/* paths and, if any external packages import from @rocket.chat/ui-voip, that their expectations still match this surface.

📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 95741a6 and 2b93eee.

⛔ Files ignored due to path filters (2)
  • packages/ui-voip/src/views/MediaCallWidget/__snapshots__/MediaCallWidget.spec.tsx.snap is excluded by !**/*.snap
  • packages/ui-voip/src/views/PermissionFlow/__snapshots__/PermissionFlowModal.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (35)
  • packages/ui-voip/src/components/DevicePicker.tsx (1 hunks)
  • packages/ui-voip/src/components/Keypad/Keypad.stories.tsx (1 hunks)
  • packages/ui-voip/src/components/Keypad/useKeypad.tsx (1 hunks)
  • packages/ui-voip/src/components/PeerAutocomplete.tsx (1 hunks)
  • packages/ui-voip/src/components/PeerInfo/InternalUser.tsx (1 hunks)
  • packages/ui-voip/src/components/PeerInfo/useInfoSlots.ts (1 hunks)
  • packages/ui-voip/src/components/Widget/Widget.tsx (1 hunks)
  • packages/ui-voip/src/components/index.ts (1 hunks)
  • packages/ui-voip/src/context/MediaCallContext.ts (1 hunks)
  • packages/ui-voip/src/context/MediaCallProvider.tsx (1 hunks)
  • packages/ui-voip/src/context/index.ts (1 hunks)
  • packages/ui-voip/src/context/useDesktopNotifications.ts (1 hunks)
  • packages/ui-voip/src/hooks/VoipPopupDraggable/DraggableCore.ts (1 hunks)
  • packages/ui-voip/src/hooks/index.ts (1 hunks)
  • packages/ui-voip/src/hooks/useDevicePermissionPrompt.tsx (1 hunks)
  • packages/ui-voip/src/hooks/useMediaCallAction.ts (1 hunks)
  • packages/ui-voip/src/index.ts (1 hunks)
  • packages/ui-voip/src/v2/index.ts (0 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCall.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCall.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/MediaCallWidget.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/MediaCallWidget.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/NewCall.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/NewCall.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/OngoingCall.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/OngoingCall.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCall.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCall.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.stories.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.tsx (1 hunks)
  • packages/ui-voip/src/views/MediaCallWidget/index.ts (1 hunks)
  • packages/ui-voip/src/views/TransferModal.tsx (1 hunks)
  • packages/ui-voip/src/views/index.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/ui-voip/src/v2/index.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • packages/ui-voip/src/components/PeerInfo/InternalUser.tsx
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCall.tsx
  • packages/ui-voip/src/views/MediaCallWidget/index.ts
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.stories.tsx
  • packages/ui-voip/src/views/MediaCallWidget/MediaCallWidget.stories.tsx
  • packages/ui-voip/src/components/DevicePicker.tsx
  • packages/ui-voip/src/context/useDesktopNotifications.ts
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCall.tsx
  • packages/ui-voip/src/hooks/useMediaCallAction.ts
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCall.stories.tsx
  • packages/ui-voip/src/views/index.ts
  • packages/ui-voip/src/components/Widget/Widget.tsx
  • packages/ui-voip/src/views/TransferModal.tsx
  • packages/ui-voip/src/views/MediaCallWidget/NewCall.stories.tsx
  • packages/ui-voip/src/context/index.ts
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.tsx
  • packages/ui-voip/src/hooks/useDevicePermissionPrompt.tsx
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.stories.tsx
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCall.stories.tsx
  • packages/ui-voip/src/context/MediaCallContext.ts
  • packages/ui-voip/src/hooks/VoipPopupDraggable/DraggableCore.ts
  • packages/ui-voip/src/components/PeerAutocomplete.tsx
  • packages/ui-voip/src/views/MediaCallWidget/MediaCallWidget.tsx
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.tsx
  • packages/ui-voip/src/components/Keypad/Keypad.stories.tsx
  • packages/ui-voip/src/views/MediaCallWidget/OngoingCall.stories.tsx
  • packages/ui-voip/src/context/MediaCallProvider.tsx
  • packages/ui-voip/src/views/MediaCallWidget/NewCall.tsx
  • packages/ui-voip/src/components/PeerInfo/useInfoSlots.ts
  • packages/ui-voip/src/views/MediaCallWidget/OngoingCall.tsx
  • packages/ui-voip/src/components/index.ts
  • packages/ui-voip/src/index.ts
  • packages/ui-voip/src/hooks/index.ts
  • packages/ui-voip/src/components/Keypad/useKeypad.tsx
🧠 Learnings (4)
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • packages/ui-voip/src/views/MediaCallWidget/IncomingCall.tsx
📚 Learning: 2025-11-19T18:20:37.116Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: apps/meteor/server/services/media-call/service.ts:141-141
Timestamp: 2025-11-19T18:20:37.116Z
Learning: In apps/meteor/server/services/media-call/service.ts, the sendHistoryMessage method should use call.caller.id or call.createdBy?.id as the message author, not call.transferredBy?.id. Even for transferred calls, the message should appear in the DM between the two users who are calling each other, not sent by the person who transferred the call.

Applied to files:

  • packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.stories.tsx
  • packages/ui-voip/src/hooks/useMediaCallAction.ts
  • packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.tsx
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.stories.tsx
  • packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.tsx
📚 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:

  • packages/ui-voip/src/context/useDesktopNotifications.ts
📚 Learning: 2025-10-28T19:39:58.182Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37328
File: packages/ui-voip/src/v2/useTonePlayer.ts:29-30
Timestamp: 2025-10-28T19:39:58.182Z
Learning: In packages/ui-voip/src/v2/useTonePlayer.ts, the DTMF tones generated by TonePlayer are for local auditory feedback to the user only. The actual DTMF signals are transmitted separately through the WebRTC channel. Therefore, filter configurations should prioritize user comfort and audio quality over technical DTMF frequency accuracy.

Applied to files:

  • packages/ui-voip/src/components/Keypad/Keypad.stories.tsx
🔇 Additional comments (32)
packages/ui-voip/src/context/useDesktopNotifications.ts (1)

7-7: LGTM! Import path updated correctly.

The relative path adjustment aligns with the folder structure reorganization.

packages/ui-voip/src/components/Keypad/Keypad.stories.tsx (1)

4-4: LGTM! Import path updated correctly.

The path adjustment correctly resolves useTonePlayer from the centralized context module.

packages/ui-voip/src/components/PeerInfo/useInfoSlots.ts (1)

5-5: LGTM! Import path updated correctly.

The ConnectionState type is now imported from the centralized context barrel, consistent with the folder reorganization.

packages/ui-voip/src/hooks/useMediaCallAction.ts (1)

5-6: LGTM! Import paths updated correctly.

Both imports now resolve from the centralized context barrel, consistent with the folder reorganization.

packages/ui-voip/src/context/MediaCallContext.ts (1)

7-7: LGTM! Import path updated correctly.

The relative path adjustment correctly resolves PeerAutocompleteOptions from the components module.

packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.stories.tsx (1)

5-5: Code changes verified as correct.

The import change from default to named is consistent across the codebase. The context/index.ts properly exports MockedMediaCallProvider as a named export (export { default as MockedMediaCallProvider }), and all seven story files—including IncomingCallTransfer.stories.tsx—correctly import it using the named import syntax from ../../context.

packages/ui-voip/src/components/Keypad/useKeypad.tsx (1)

6-6: Import change verified as correct.

Keypad is properly exported as default from Keypad.tsx (line 43), and the updated import in useKeypad.tsx (line 6) is consistent with other files like Keypad.stories.tsx. No orphaned or inconsistent imports were found. The change is correctly implemented.

packages/ui-voip/src/views/MediaCallWidget/IncomingCall.tsx (1)

4-5: Import path consolidation looks correct

Switching to the ../../components and ../../context barrels keeps usage unchanged and improves structure; all imported identifiers are referenced in this component.

packages/ui-voip/src/views/MediaCallWidget/OutgoingCall.tsx (1)

4-5: Consistent use of shared barrels for widget and context

The updated imports from ../../components and ../../context match the new organization and keep runtime behavior intact.

packages/ui-voip/src/views/MediaCallWidget/index.ts (1)

7-7: MediaCallWidget barrel export fits existing pattern

Adding MediaCallWidget as a named export from this barrel is consistent with the other view exports and should make consumption from views cleaner, assuming ./MediaCallWidget continues to expose a default export.

packages/ui-voip/src/hooks/VoipPopupDraggable/DraggableCore.ts (1)

1-3: Good use of import type for OffCallbackHandler

Converting OffCallbackHandler to a type-only import matches its usage (types only) and avoids unnecessary runtime coupling to @rocket.chat/emitter.

packages/ui-voip/src/components/PeerAutocomplete.tsx (1)

6-6: Context utility import re-pointed correctly

Importing isFirstPeerAutocompleteOption from the ../context barrel aligns with the new context structure and leaves the autocomplete behavior unchanged.

packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.tsx (1)

4-5: Barrel-based imports for transfer view are consistent

Using ../../components and ../../context here matches the rest of the MediaCallWidget views, with all imported symbols used as before.

packages/ui-voip/src/components/PeerInfo/InternalUser.tsx (1)

4-4: Slot type import localized to PeerInfo subtree

Pointing Slot to the sibling ./useInfoSlots keeps types local to the PeerInfo module and doesn’t affect runtime behavior.

packages/ui-voip/src/views/MediaCallWidget/IncomingCall.stories.tsx (1)

5-5: Story now uses context barrel for MockedMediaCallProvider

Switching to the named MockedMediaCallProvider from ../../context keeps the story API identical while centralizing test providers under the context barrel. Just ensure the barrel re-exports this provider under the same name.

packages/ui-voip/src/views/MediaCallWidget/OngoingCall.tsx (1)

4-19: LGTM! Import reorganization aligns with barrel file structure.

The import paths have been correctly updated to use centralized barrel exports from ../../components and ../../context, which improves maintainability and provides a cleaner public API surface.

packages/ui-voip/src/views/MediaCallWidget/IncomingCallTransfer.tsx (1)

4-5: LGTM! Consistent barrel import pattern.

Import paths correctly updated to use centralized exports, maintaining consistency with the broader refactoring effort.

packages/ui-voip/src/views/TransferModal.tsx (1)

15-16: LGTM! Import paths correctly updated.

The imports now properly reference the centralized barrel exports from ../components and ../context, maintaining consistency with the package restructuring.

packages/ui-voip/src/views/MediaCallWidget/NewCall.tsx (1)

4-15: LGTM! Barrel imports properly configured.

The import paths correctly resolve to the centralized barrel exports, consistent with the package-wide refactoring to consolidate module access points.

packages/ui-voip/src/components/Widget/Widget.tsx (1)

8-8: LGTM! Hook import consolidated through barrel.

The useDraggable import now correctly uses the centralized hooks barrel, improving code organization.

packages/ui-voip/src/views/MediaCallWidget/MediaCallWidget.tsx (1)

1-2: LGTM! View imports consolidated through parent barrel.

The import paths correctly leverage the views barrel export (..) and the context barrel (../../context), completing the centralized import pattern across the package.

packages/ui-voip/src/hooks/index.ts (1)

2-3: LGTM! Hooks barrel extended appropriately.

Verification confirms both exported modules exist and no circular dependencies are present:

  • DraggableCore.ts imports from @rocket.chat/emitter, @rocket.chat/ui-client, and React
  • useMediaCallAction.ts imports from @rocket.chat/icons, React, react-i18next, and the context module
  • Neither module imports from the hooks barrel, preventing circular dependencies
packages/ui-voip/src/components/index.ts (1)

8-9: LGTM! Barrel exports verified safe.

Verification confirms neither hook file imports from the parent barrel export, eliminating circular dependency risk. Both useKeypad and useInfoSlots only depend on external packages and local siblings; no back-references to components/index exist.

packages/ui-voip/src/views/MediaCallWidget/MediaCallWidget.stories.tsx (1)

6-6: Context barrel import is consistent and correctly used

Importing useMediaCallContext and MockedMediaCallProvider from ../../context matches the new context barrel and aligns with their usage in this story; no behavior change introduced.

packages/ui-voip/src/components/DevicePicker.tsx (1)

11-12: Import path updates match the new folder layout

../context and ../hooks/useDevicePermissionPrompt correctly target the shared context barrel and hooks location from src/components; symbol names and usages remain unchanged.

packages/ui-voip/src/views/MediaCallWidget/OutgoingCallTransfer.stories.tsx (1)

5-5: Story now correctly consumes MockedMediaCallProvider from the context barrel

Switching to import { MockedMediaCallProvider } from '../../context'; is consistent with the centralized context exports and keeps the story logic intact.

packages/ui-voip/src/views/MediaCallWidget/OngoingCall.stories.tsx (1)

5-5: Consistent use of context barrel in ongoing-call stories

Importing MockedMediaCallProvider from ../../context aligns this file with the shared context barrel pattern and keeps the stories’ behavior unchanged.

packages/ui-voip/src/views/MediaCallWidget/NewCall.stories.tsx (1)

5-5: NewCall story correctly sources MockedMediaCallProvider from the context barrel

The switch to ../../context for MockedMediaCallProvider is consistent with the rest of the MediaCallWidget stories and does not alter runtime behavior.

packages/ui-voip/src/views/index.ts (1)

1-3: Views barrel exports line up with new consumer imports

This index groups TransferModal, all MediaCallWidget exports, and PermissionFlowModal (+ its type) behind a single ../views entry point, matching the updated imports elsewhere and improving structure without changing behavior.

packages/ui-voip/src/hooks/useDevicePermissionPrompt.tsx (1)

5-5: PermissionFlowModal now correctly imported via the views barrel

Using import { PermissionFlowModal, type PermissionFlowModalType } from '../views'; matches the new views/index.ts exports and keeps the hook’s behavior identical.

packages/ui-voip/src/context/MediaCallProvider.tsx (1)

28-29: MediaCallProvider imports are aligned with the new views structure

Importing MediaCallWidget from the ../views barrel and TransferModal from ../views/TransferModal matches the reorganized views layout and keeps the provider’s rendering logic unchanged.

packages/ui-voip/src/context/index.ts (1)

1-4: Context barrel looks good; verify underlying exports and consumer updates

The context barrel cleanly centralizes exports (MediaCallContext, both media call hooks, autocomplete helpers, types, and MockedMediaCallProvider) and matches the intended public surface.

Two things to confirm:

  1. ./MediaCallContext and ./MockedMediaCallProvider actually export all of these symbols with the exact names used here (including usePeerAutocomplete and isFirstPeerAutocompleteOption), to avoid silent export-undefined issues.
  2. All updated consumers now import from ../../context (or the package root where appropriate) rather than reaching into deeper paths, so future structure changes remain localized to this barrel.

If both are true, this file is in good shape.

@kodiakhq kodiakhq bot merged commit f5eedbe into develop Nov 25, 2025
48 checks passed
@kodiakhq kodiakhq bot deleted the ui-voip/folderOrg branch November 25, 2025 15:44
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants