AGENT SKILL

cometchat-react-native-migration

Migrate a React Native app from CometChat UI Kit v4 to v5 — the 16 removed components, what replaces each, the composite-to-modular rewrite, and the theming change from setter objects to a provider. Triggers: upgrade CometChat React Native v4 to v5, CometChatConversationsWithMessages removed, migrate RN chat uikit, CometChatDetails not found, v4 to v5 breaking changes.

使用场景前端开发
License 许可
MIT
最近更新
2026-11-14
Stars
★ 1.6k
Forks
491

01 前言 Front Matter

name
cometchat-react-native-migration
license
MIT
metadata
{ "tags": "chat cometchat react-native migration upgrade v4 v5 breaking-changes", "author": "CometChat", "version": "1.0.0" }
description
Migrate a React Native app from CometChat UI Kit v4 to v5 — the 16 removed components, what replaces each, the composite-to-modular rewrite, and the theming change from setter objects to a provider. Triggers: upgrade CometChat React Native v4 to v5, CometChatConversationsWithMessages removed, migrate RN chat uikit, CometChatDetails not found, v4 to v5 breaking changes.
compatibility
migrating @cometchat/chat-uikit-react-native ^4 → ^5.4.0

03 SKILL.md 正文

Ground truth: the public-export diff between kit v4 and @cometchat/chat-uikit-react-native@5.4.0, verified against catalogs/rn-v5.json (216 symbols) — every removal below is confirmed absent, not assumed. Docs: /ui-kit/react-native/upgrading-from-v4 · property-changes.

Companion skills (read first)

  • cometchat-react-native-core — the v5 install, provider chain and ordering you are migrating to.

Use this skill when

  • "upgrade our chat from v4 to v5" · "CometChatConversationsWithMessages is gone" · "CometChatDetails not found"

Prerequisites & install

v5 changes the peer set as well as the API — reinstall from core's list rather than bumping one package.

What actually changed: composites became parts

v4 shipped end-to-end components. One tag gave you a list, a message view, details and threads. v5 removes them so each piece is customizable — which is better, and is also a rewrite of your chat screen, not a version bump. Budget accordingly.

16 components removed — each verified absent from the v5 catalog

Composites → stitch the parts yourself

v4 v5
CometChatConversationsWithMessages CometChatConversations + a message screen
CometChatUsersWithMessages CometChatUsers + a message screen
CometChatGroupsWithMessages CometChatGroups + a message screen
CometChatMessages CometChatMessageHeader + CometChatMessageList + CometChatMessageComposer
CometChatThreadedMessages CometChatThreadHeader on its own screen

The message screen is three components in a flex: 1 container — see core. Navigation between list and pane is placement.

Detail & management screens → no replacement component

CometChatDetails · CometChatContacts · CometChatAddMembers · CometChatBannedMembers · CometChatTransferOwnership · CometChatUserMemberWrapper

⚠️ This is the migration's real cost. v5 ships nothing equivalent. You build these screens on the SDK:

Screen SDK
user / group details CometChat.getUser · getGroup · updateGroup
add members addMembersToGroup
banned members BannedMembersRequestBuilder · unbanGroupMember
transfer ownership transferGroupOwnership

CometChatGroupMembers lists active members only. If your v4 app could ban, it could also show and unban — keep that pair, or you ship a one-way door.

Do not invent a layout: the official sample app has real implementations — github.com/cometchat/cometchat-uikit-react-native/tree/v5/examples/SampleApp. Those are sample-app directory paths, never imports.

Call-log detail screens → list only

CometChatCallLogDetails · CometChatCallLogHistory · CometChatCallLogParticipants · CometChatCallLogRecordings · CometChatCallLogsWithDetails are gone. CometChatCallLogs (the list) remains; details come from CometChatCalls.CallLogRequestBuilder in the calls SDK.

Theming: setter objects → provider

- let myTheme = new CometChatTheme({});
- myTheme.palette.setMode("dark");
+ <CometChatThemeProvider theme={{ mode: "dark" }}>

CometChatContext / CometChatProvider are gone. Read the active theme with useTheme(). Details in customization.

Migration order that avoids a broken middle

  1. Upgrade the packages and the peer set; get it building before touching UI.
  2. Replace composites with the three-part message screen (core).
  3. Add navigation so each surface is its own screen (placement).
  4. Rebuild the detail/management screens on the SDK — the longest step; scope it explicitly.
  5. Move theming to the provider (customization).
  6. Re-check calls and push on real devices; the native layer changed too.

Common pitfalls

  1. Treating it as a version bump — the chat screen is rewritten.
  2. Looking for a v5 details component — there isn't one.
  3. Dropping banned-members because there is no component — you lose the unban path.
  4. Porting v4 theming setters — replaced by the provider.
  5. Keeping v4's single-screen conditional rendering — v5 apps want a navigator.
  6. Skipping the device pass — peers and native config changed.

Verify it works

  • No removed symbol appears anywhere: grep for WithMessages, CometChatDetails, CometChatMessages.
  • Every emitted symbol is in catalogs/rn-v5.json.
  • npm run verify:fences:rn-v5 is green.
  • On device: every v4 flow still exists — including viewing and unbanning banned members.

04 同仓库更多 Skills

hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-review-with-annotations

Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-find-and-synthesize-context

Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-create-or-update-docs

Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-create-or-manage-records

Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-create-or-manage-interactive-html

Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-collaborate-threads

Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.

★ 1.6k