Skip to content

Conversation

@OnestarLee
Copy link
Collaborator

@OnestarLee OnestarLee commented Dec 22, 2025

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team developer-advocates@sendbird.com with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

[CLNP-7758](https://sendbird.atlassian.net/browse/CLNP-7758)

Description Of Changes

  • Update @types/react from ^18 to ^19.1.1
  • Fix useRef calls to include explicit initial value for React 19 compatibility
  • Fix React.cloneElement type casting with explicit props type
  • Fix forwardRef type casting for generic components

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 30.76923% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 10.85%. Comparing base (a4888f7) to head (f8860df).

Files with missing lines Patch % Lines
...it-react-native-foundation/src/ui/Dialog/index.tsx 0.00% 3 Missing ⚠️
...ct-native-foundation/src/ui/Avatar/AvatarGroup.tsx 0.00% 2 Missing ⚠️
...groupChannel/component/GroupChannelMessageList.tsx 0.00% 2 Missing ⚠️
...tion/src/components/ImageWithPlaceholder/index.tsx 0.00% 1 Missing ⚠️
...ct-native-foundation/src/ui/Avatar/AvatarStack.tsx 0.00% 1 Missing ⚠️
...ve/src/components/FileViewer/FileViewerContent.tsx 0.00% 1 Missing ⚠️
...actionBottomSheets/ReactionUserListBottomSheet.tsx 0.00% 1 Missing ⚠️
...rc/fragments/createGroupChannelMembersFragment.tsx 0.00% 1 Missing ⚠️
...ragments/createOpenChannelParticipantsFragment.tsx 0.00% 1 Missing ⚠️
...ikit-react-native/src/hooks/useMentionTextInput.ts 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #283      +/-   ##
==========================================
- Coverage   10.85%   10.85%   -0.01%     
==========================================
  Files         360      360              
  Lines        9049     9050       +1     
  Branches     2574     2574              
==========================================
  Hits          982      982              
- Misses       7991     7992       +1     
  Partials       76       76              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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

Copilot AI left a 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 updates the codebase for React 19 compatibility by updating useRef type signatures and forwardRef patterns to align with stricter type requirements in React 19.

  • Updated @types/react from v18 to v19.2.7
  • Modified all useRef calls that had implicit undefined to explicit T | undefined type annotations with undefined as initial value
  • Updated forwardRef type casts in ChannelMessageList and ChannelThreadMessageList components
  • Removed unnecessary ReactElement imports and replaced with React.ReactElement with proper generic constraints

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updated @types/react resolution from ^18 to ^19.1.1
yarn.lock Updated @types/react to v19.2.7, csstype to v3.2.3, removed @types/prop-types dependency, and reorganized package declarations
packages/uikit-utils/src/hooks/react-native.ts Updated resolveRef type from implicit undefined to explicit ((value: void) => void) | undefined with undefined initial value
packages/uikit-utils/src/hooks/index.ts Updated timeoutRef type from implicit undefined to explicit NodeJS.Timeout | undefined with undefined initial value
packages/uikit-react-native/src/hooks/useVoiceMessageInput.ts Updated recordingPath ref type to explicitly include undefined
packages/uikit-react-native/src/hooks/usePushTokenRegistration.ts Updated refreshListener ref type to explicitly include undefined
packages/uikit-react-native/src/hooks/useMentionTextInput.ts Updated textInputRef type to explicitly include undefined
packages/uikit-react-native/src/fragments/createOpenChannelParticipantsFragment.tsx Updated refreshSchedule ref type to explicitly include undefined
packages/uikit-react-native/src/fragments/createGroupChannelMembersFragment.tsx Updated refreshSchedule ref type to explicitly include undefined
packages/uikit-react-native/src/domain/groupChannel/component/GroupChannelMessageList.tsx Updated viewableMessages and unreadMessagesFloatingPropsRef types to explicitly include undefined
packages/uikit-react-native/src/components/ReactionBottomSheets/ReactionUserListBottomSheet.tsx Updated scrollRef type to explicitly include undefined
packages/uikit-react-native/src/components/FileViewer/FileViewerContent.tsx Updated imageSize ref type to explicitly include undefined
packages/uikit-react-native/src/components/ChannelThreadMessageList/index.tsx Updated forwardRef type cast for React 19 compatibility with explicit generic function signature
packages/uikit-react-native/src/components/ChannelMessageList/index.tsx Updated forwardRef type cast for React 19 compatibility with explicit generic function signature
packages/uikit-react-native-foundation/src/ui/Dialog/index.tsx Updated waitDismissTimeout, waitDismissPromise, and workingDialogJob ref types to explicitly include undefined
packages/uikit-react-native-foundation/src/ui/Avatar/AvatarStack.tsx Removed ReactElement import, added AvatarChildProps type definition, and updated cloneElement to use React.ReactElement with generic constraints
packages/uikit-react-native-foundation/src/ui/Avatar/AvatarGroup.tsx Removed ReactElement import, added AvatarChildProps type definition, and updated cloneElement to use React.ReactElement with generic constraints
packages/uikit-react-native-foundation/src/components/ImageWithPlaceholder/index.tsx Updated retryTimeoutRef type to explicitly include undefined
packages/uikit-chat-hooks/src/handler/useConnectionHandler.ts Updated handlerRef type to explicitly include undefined
packages/uikit-chat-hooks/src/common/useUserList.ts Updated query ref type to explicitly include undefined
packages/uikit-chat-hooks/src/channel/useOpenChannelMessages/useOpenChannelMessagesWithQuery.ts Updated queryRef type to explicitly include undefined
packages/uikit-chat-hooks/src/channel/useOpenChannelList/useOpenChannelListWithQuery.ts Updated queryRef type to explicitly include undefined
packages/uikit-chat-hooks/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.ts Updated queryRef type to explicitly include undefined
packages/uikit-chat-hooks/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.ts Updated collectionRef type to explicitly include undefined
packages/uikit-chat-hooks/src/channel/useGroupChannelList/useGroupChannelListWithQuery.ts Updated queryRef type to explicitly include undefined
packages/uikit-chat-hooks/src/channel/useGroupChannelList/useGroupChannelListWithCollection.ts Updated collectionRef type to explicitly include undefined

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@OnestarLee OnestarLee requested a review from bang9 December 23, 2025 01:20
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.

3 participants