@cometchat/skills 4.4.2 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (518) hide show
  1. package/.claude-plugin/marketplace.json +55 -0
  2. package/.claude-plugin/plugin.json +14 -0
  3. package/CHANGELOG.md +44 -0
  4. package/LICENSE +21 -0
  5. package/MIGRATING.md +187 -0
  6. package/README.md +52 -156
  7. package/RULES.md +125 -0
  8. package/bin/cometchat-skills.mjs +1280 -0
  9. package/bin/legacy-skills.json +95 -0
  10. package/catalogs/android-v6.json +1646 -0
  11. package/catalogs/flutter-v6.json +651 -0
  12. package/catalogs/ios-v5.json +1383 -0
  13. package/catalogs/rn-calls-v5.json +134 -0
  14. package/catalogs/rn-calls-v5.symbols.txt +58 -0
  15. package/catalogs/rn-sdk-v4.json +672 -0
  16. package/catalogs/rn-v5.json +449 -0
  17. package/catalogs/rn-v5.symbols.txt +216 -0
  18. package/catalogs/sdk-android-v5.json +514 -0
  19. package/contracts.android-calls-v5.json +122 -0
  20. package/contracts.android-v6.json +135 -0
  21. package/contracts.angular-v5.json +694 -0
  22. package/contracts.flutter-calls-v5.json +77 -0
  23. package/contracts.flutter-v6.json +126 -0
  24. package/contracts.ios-calls-v5.json +67 -0
  25. package/contracts.ios-v5.json +436 -0
  26. package/contracts.json +82 -0
  27. package/contracts.rn-calls-v5.json +77 -0
  28. package/contracts.rn-v5.json +727 -0
  29. package/contracts.sdk-android-v5.json +15 -0
  30. package/contracts.web-calls-v5.json +45 -0
  31. package/features.android-calls-v5.json +246 -0
  32. package/features.android-v6.json +65 -0
  33. package/features.angular-v5.json +521 -0
  34. package/features.flutter-calls-v5.json +286 -0
  35. package/features.flutter-v6.json +484 -0
  36. package/features.ios-calls-v5.json +236 -0
  37. package/features.ios-v5.json +573 -0
  38. package/features.json +61 -0
  39. package/features.rn-calls-v5.json +187 -0
  40. package/features.rn-v5.json +614 -0
  41. package/features.sdk-android-v5.json +40 -0
  42. package/features.sdk-jsv4.json +24 -0
  43. package/features.web-calls-v5.json +108 -0
  44. package/package.json +156 -74
  45. package/peers.yaml +355 -0
  46. package/registry/README.md +31 -0
  47. package/registry/android-calls-v5.json +94 -0
  48. package/registry/android-v6.json +177 -0
  49. package/registry/angular-v5.json +154 -0
  50. package/registry/flutter-calls-v5.json +94 -0
  51. package/registry/flutter-v6.json +159 -0
  52. package/registry/ios-calls-v5.json +99 -0
  53. package/registry/ios-v5.json +152 -0
  54. package/registry/rn-calls-v5.json +99 -0
  55. package/registry/rn-v5.json +169 -0
  56. package/registry/sdk-android-v5.json +93 -0
  57. package/registry/sdk-jsv4.json +93 -0
  58. package/registry/web-calls-v5.json +94 -0
  59. package/registry/web-v7.json +154 -0
  60. package/skills/cometchat/SKILL.md +47 -2096
  61. package/skills/cometchat-a11y/SKILL.md +44 -472
  62. package/skills/cometchat-analytics/SKILL.md +61 -0
  63. package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
  64. package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
  65. package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
  66. package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
  67. package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
  68. package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
  69. package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
  70. package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
  71. package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
  72. package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
  73. package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
  74. package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
  75. package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
  76. package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
  77. package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
  78. package/skills/cometchat-android-v6-core/SKILL.md +236 -672
  79. package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
  80. package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
  81. package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
  82. package/skills/cometchat-android-v6-core/references/layout.md +112 -0
  83. package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
  84. package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
  85. package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
  86. package/skills/cometchat-android-v6-events/SKILL.md +46 -184
  87. package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
  88. package/skills/cometchat-android-v6-features/SKILL.md +74 -143
  89. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
  90. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
  91. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
  92. package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
  93. package/skills/cometchat-android-v6-production/SKILL.md +41 -179
  94. package/skills/cometchat-android-v6-push/SKILL.md +39 -289
  95. package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
  96. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
  97. package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
  98. package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
  99. package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
  100. package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
  101. package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
  102. package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
  103. package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
  104. package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
  105. package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
  106. package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
  107. package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
  108. package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
  109. package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
  110. package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
  111. package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
  112. package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
  113. package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
  114. package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
  115. package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
  116. package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
  117. package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
  118. package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
  119. package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
  120. package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
  121. package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
  122. package/skills/cometchat-angular-v5-production/SKILL.md +102 -0
  123. package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
  124. package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
  125. package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
  126. package/skills/cometchat-audit/SKILL.md +61 -0
  127. package/skills/cometchat-compliance/SKILL.md +63 -0
  128. package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
  129. package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
  130. package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
  131. package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
  132. package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
  133. package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
  134. package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
  135. package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
  136. package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
  137. package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
  138. package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
  139. package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
  140. package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
  141. package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
  142. package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
  143. package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
  144. package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
  145. package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
  146. package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +132 -0
  147. package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
  148. package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
  149. package/skills/cometchat-flutter-v6-production/SKILL.md +59 -615
  150. package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
  151. package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
  152. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
  153. package/skills/cometchat-i18n/SKILL.md +35 -404
  154. package/skills/cometchat-ios-calls/SKILL.md +112 -563
  155. package/skills/cometchat-ios-components/SKILL.md +44 -834
  156. package/skills/cometchat-ios-core/SKILL.md +182 -1068
  157. package/skills/cometchat-ios-core/references/anti-patterns.md +113 -0
  158. package/skills/cometchat-ios-core/references/docs-map.md +124 -0
  159. package/skills/cometchat-ios-core/references/install.md +23 -0
  160. package/skills/cometchat-ios-core/references/layout.md +219 -0
  161. package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
  162. package/skills/cometchat-ios-core/references/swiftui.md +91 -0
  163. package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
  164. package/skills/cometchat-ios-customization/SKILL.md +33 -968
  165. package/skills/cometchat-ios-features/SKILL.md +29 -738
  166. package/skills/cometchat-ios-migration/SKILL.md +39 -0
  167. package/skills/cometchat-ios-placement/SKILL.md +51 -729
  168. package/skills/cometchat-ios-production/SKILL.md +67 -723
  169. package/skills/cometchat-ios-push/SKILL.md +24 -602
  170. package/skills/cometchat-ios-testing/SKILL.md +36 -355
  171. package/skills/cometchat-ios-troubleshooting/SKILL.md +31 -989
  172. package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
  173. package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
  174. package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
  175. package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
  176. package/skills/cometchat-migrate-from-getstream/SKILL.md +65 -0
  177. package/skills/cometchat-migrate-from-getstream/references/concept-map.md +98 -0
  178. package/skills/cometchat-migrate-from-getstream/references/data-migration.md +74 -0
  179. package/skills/cometchat-migrate-from-getstream/references/feature-map.md +108 -0
  180. package/skills/cometchat-migrate-from-getstream/references/inventory.md +82 -0
  181. package/skills/cometchat-migrate-from-getstream/references/native-build.md +9 -0
  182. package/skills/cometchat-migrate-from-getstream/references/report-template.md +59 -0
  183. package/skills/cometchat-migrate-from-sendbird/SKILL.md +64 -0
  184. package/skills/cometchat-migrate-from-sendbird/references/concept-map.md +99 -0
  185. package/skills/cometchat-migrate-from-sendbird/references/data-migration.md +74 -0
  186. package/skills/cometchat-migrate-from-sendbird/references/feature-map.md +104 -0
  187. package/skills/cometchat-migrate-from-sendbird/references/inventory.md +86 -0
  188. package/skills/cometchat-migrate-from-sendbird/references/native-build.md +10 -0
  189. package/skills/cometchat-migrate-from-sendbird/references/report-template.md +59 -0
  190. package/skills/cometchat-migrate-from-twilio/SKILL.md +52 -0
  191. package/skills/cometchat-migrate-from-twilio/references/concept-map.md +49 -0
  192. package/skills/cometchat-migrate-from-twilio/references/data-migration.md +50 -0
  193. package/skills/cometchat-migrate-from-twilio/references/feature-map.md +27 -0
  194. package/skills/cometchat-migrate-from-twilio/references/inventory.md +53 -0
  195. package/skills/cometchat-migrate-from-twilio/references/report-template.md +52 -0
  196. package/skills/cometchat-moderation/SKILL.md +58 -0
  197. package/skills/cometchat-onboarding/SKILL.md +92 -0
  198. package/skills/cometchat-onboarding/references/archetypes.md +51 -0
  199. package/skills/cometchat-onboarding/references/calling-first.md +77 -0
  200. package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
  201. package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
  202. package/skills/cometchat-onboarding/references/platforms.md +105 -0
  203. package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
  204. package/skills/cometchat-react-native-calls/SKILL.md +200 -0
  205. package/skills/cometchat-react-native-components/SKILL.md +142 -0
  206. package/skills/cometchat-react-native-core/SKILL.md +335 -0
  207. package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
  208. package/skills/cometchat-react-native-core/references/component-props.md +105 -0
  209. package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
  210. package/skills/cometchat-react-native-core/references/docs-map.md +127 -0
  211. package/skills/cometchat-react-native-core/references/layout.md +61 -0
  212. package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
  213. package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
  214. package/skills/cometchat-react-native-customization/SKILL.md +198 -0
  215. package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
  216. package/skills/cometchat-react-native-features/SKILL.md +122 -0
  217. package/skills/cometchat-react-native-migration/SKILL.md +103 -0
  218. package/skills/cometchat-react-native-placement/SKILL.md +158 -0
  219. package/skills/cometchat-react-native-production/SKILL.md +79 -0
  220. package/skills/cometchat-react-native-push/SKILL.md +88 -0
  221. package/skills/cometchat-react-native-sdk/SKILL.md +133 -0
  222. package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
  223. package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
  224. package/skills/cometchat-react-native-testing/SKILL.md +94 -0
  225. package/skills/cometchat-react-native-troubleshooting/SKILL.md +174 -0
  226. package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
  227. package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
  228. package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
  229. package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
  230. package/skills/cometchat-react-v7-components/SKILL.md +72 -0
  231. package/skills/cometchat-react-v7-core/SKILL.md +101 -0
  232. package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
  233. package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
  234. package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
  235. package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
  236. package/skills/cometchat-react-v7-core/references/layout.md +150 -0
  237. package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
  238. package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
  239. package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
  240. package/skills/cometchat-react-v7-core/references/theming.md +52 -0
  241. package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
  242. package/skills/cometchat-react-v7-features/SKILL.md +92 -0
  243. package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
  244. package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
  245. package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
  246. package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
  247. package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
  248. package/skills/cometchat-react-v7-production/SKILL.md +84 -0
  249. package/skills/cometchat-react-v7-push/SKILL.md +53 -0
  250. package/skills/cometchat-react-v7-testing/SKILL.md +60 -0
  251. package/skills/cometchat-react-v7-troubleshooting/SKILL.md +47 -0
  252. package/skills/cometchat-security/SKILL.md +80 -0
  253. package/skills/cometchat-self-host/SKILL.md +56 -0
  254. package/test-suite/README.md +70 -0
  255. package/test-suite/catalogs/android-calls-v5.json +830 -0
  256. package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
  257. package/test-suite/catalogs/android-v6.json +1646 -0
  258. package/test-suite/catalogs/android-v6.symbols.txt +298 -0
  259. package/test-suite/catalogs/angular-v5.json +7587 -0
  260. package/test-suite/catalogs/flutter-calls-v5.json +196 -0
  261. package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
  262. package/test-suite/catalogs/flutter-v6.json +651 -0
  263. package/test-suite/catalogs/ios-calls-v5.json +158 -0
  264. package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
  265. package/test-suite/catalogs/ios-v5.json +1383 -0
  266. package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
  267. package/test-suite/catalogs/rn-calls-v5.json +134 -0
  268. package/test-suite/catalogs/rn-sdk-v4.json +672 -0
  269. package/test-suite/catalogs/rn-v5.json +449 -0
  270. package/test-suite/catalogs/sdk-android-v5.json +514 -0
  271. package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
  272. package/test-suite/catalogs/sdk-jsv4.json +800 -0
  273. package/test-suite/catalogs/web-calls-v5.json +195 -0
  274. package/test-suite/catalogs/web-v7.json +1243 -0
  275. package/test-suite/scripts/build-registry.mjs +113 -0
  276. package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
  277. package/test-suite/scripts/catalog-refresh.mjs +100 -0
  278. package/test-suite/scripts/lint-skills.mjs +932 -0
  279. package/test-suite/scripts/measure-tokens.mjs +169 -0
  280. package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
  281. package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
  282. package/test-suite/scripts/typecheck-fences.mjs +206 -0
  283. package/test-suite/scripts/verify-catalog.mjs +242 -0
  284. package/test-suite/scripts/verify-contract-fences.mjs +94 -0
  285. package/test-suite/scripts/verify-detection.mjs +178 -0
  286. package/test-suite/scripts/verify-docs-base.mjs +91 -0
  287. package/test-suite/scripts/verify-family-agnostic.mjs +134 -0
  288. package/test-suite/scripts/verify-golden-path.mjs +138 -0
  289. package/test-suite/scripts/verify-oracle-components.mjs +133 -0
  290. package/test-suite/scripts/verify-template-bindings.mjs +148 -0
  291. package/test-suite/typecheck/angular-v5/package.json +21 -0
  292. package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
  293. package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
  294. package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
  295. package/test-suite/typecheck/web-v7/package.json +18 -0
  296. package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
  297. package/bin/install.js +0 -1003
  298. package/skills/.claude-plugin/marketplace.json +0 -86
  299. package/skills/cometchat/references/asking-questions.md +0 -48
  300. package/skills/cometchat-android-v5/SKILL.md +0 -121
  301. package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
  302. package/skills/cometchat-android-v5-calls/references/README.md +0 -53
  303. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
  304. package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
  305. package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
  306. package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
  307. package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
  308. package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
  309. package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
  310. package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
  311. package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
  312. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
  313. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
  314. package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
  315. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
  316. package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
  317. package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
  318. package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
  319. package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
  320. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
  321. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
  322. package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
  323. package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
  324. package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
  325. package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
  326. package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
  327. package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
  328. package/skills/cometchat-android-v5-components/SKILL.md +0 -431
  329. package/skills/cometchat-android-v5-core/SKILL.md +0 -486
  330. package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
  331. package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
  332. package/skills/cometchat-android-v5-features/SKILL.md +0 -131
  333. package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
  334. package/skills/cometchat-android-v5-production/SKILL.md +0 -95
  335. package/skills/cometchat-android-v5-push/SKILL.md +0 -619
  336. package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
  337. package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
  338. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
  339. package/skills/cometchat-android-v6/SKILL.md +0 -108
  340. package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
  341. package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
  342. package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
  343. package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
  344. package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
  345. package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
  346. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
  347. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
  348. package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
  349. package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
  350. package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
  351. package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
  352. package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
  353. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
  354. package/skills/cometchat-angular-calls/SKILL.md +0 -380
  355. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
  356. package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
  357. package/skills/cometchat-angular-calls/references/call-session.md +0 -167
  358. package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
  359. package/skills/cometchat-angular-calls/references/device-management.md +0 -154
  360. package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
  361. package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
  362. package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
  363. package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
  364. package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
  365. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
  366. package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
  367. package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
  368. package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
  369. package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
  370. package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
  371. package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
  372. package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
  373. package/skills/cometchat-angular-components/SKILL.md +0 -235
  374. package/skills/cometchat-angular-core/SKILL.md +0 -386
  375. package/skills/cometchat-angular-customization/SKILL.md +0 -616
  376. package/skills/cometchat-angular-features/SKILL.md +0 -329
  377. package/skills/cometchat-angular-patterns/SKILL.md +0 -256
  378. package/skills/cometchat-angular-placement/SKILL.md +0 -314
  379. package/skills/cometchat-angular-production/SKILL.md +0 -564
  380. package/skills/cometchat-angular-push/SKILL.md +0 -389
  381. package/skills/cometchat-angular-testing/SKILL.md +0 -605
  382. package/skills/cometchat-angular-theming/SKILL.md +0 -290
  383. package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
  384. package/skills/cometchat-astro-patterns/SKILL.md +0 -708
  385. package/skills/cometchat-calls/SKILL.md +0 -364
  386. package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
  387. package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
  388. package/skills/cometchat-calls/references/use-case-support.md +0 -189
  389. package/skills/cometchat-calls/references/use-case-team.md +0 -180
  390. package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
  391. package/skills/cometchat-components/SKILL.md +0 -1142
  392. package/skills/cometchat-core/SKILL.md +0 -1048
  393. package/skills/cometchat-customization/SKILL.md +0 -580
  394. package/skills/cometchat-customization/references/component-catalog.md +0 -236
  395. package/skills/cometchat-features/SKILL.md +0 -861
  396. package/skills/cometchat-flutter-v5/SKILL.md +0 -173
  397. package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
  398. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
  399. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
  400. package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
  401. package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
  402. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
  403. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
  404. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
  405. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
  406. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
  407. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
  408. package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
  409. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
  410. package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
  411. package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
  412. package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
  413. package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
  414. package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
  415. package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
  416. package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
  417. package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
  418. package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
  419. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
  420. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
  421. package/skills/cometchat-flutter-v6/SKILL.md +0 -446
  422. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
  423. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
  424. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
  425. package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
  426. package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
  427. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
  428. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
  429. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
  430. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
  431. package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
  432. package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
  433. package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
  434. package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
  435. package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
  436. package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
  437. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
  438. package/skills/cometchat-ios/SKILL.md +0 -325
  439. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
  440. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
  441. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
  442. package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
  443. package/skills/cometchat-ios-calls/references/call-session.md +0 -218
  444. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
  445. package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
  446. package/skills/cometchat-ios-calls/references/device-management.md +0 -171
  447. package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
  448. package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
  449. package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
  450. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
  451. package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
  452. package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
  453. package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
  454. package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
  455. package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
  456. package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
  457. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
  458. package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
  459. package/skills/cometchat-ios-theming/SKILL.md +0 -667
  460. package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
  461. package/skills/cometchat-native-calls/SKILL.md +0 -671
  462. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
  463. package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
  464. package/skills/cometchat-native-calls/references/call-session.md +0 -182
  465. package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
  466. package/skills/cometchat-native-calls/references/device-management.md +0 -158
  467. package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
  468. package/skills/cometchat-native-calls/references/group-calls.md +0 -296
  469. package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
  470. package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
  471. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
  472. package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
  473. package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
  474. package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
  475. package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
  476. package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
  477. package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
  478. package/skills/cometchat-native-calls/references/share-invite.md +0 -146
  479. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
  480. package/skills/cometchat-native-components/SKILL.md +0 -628
  481. package/skills/cometchat-native-core/SKILL.md +0 -679
  482. package/skills/cometchat-native-customization/SKILL.md +0 -716
  483. package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
  484. package/skills/cometchat-native-features/SKILL.md +0 -638
  485. package/skills/cometchat-native-placement/SKILL.md +0 -509
  486. package/skills/cometchat-native-production/SKILL.md +0 -700
  487. package/skills/cometchat-native-push/SKILL.md +0 -594
  488. package/skills/cometchat-native-testing/SKILL.md +0 -582
  489. package/skills/cometchat-native-theming/SKILL.md +0 -681
  490. package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
  491. package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
  492. package/skills/cometchat-placement/SKILL.md +0 -1360
  493. package/skills/cometchat-production/SKILL.md +0 -1027
  494. package/skills/cometchat-react-calls/SKILL.md +0 -752
  495. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
  496. package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
  497. package/skills/cometchat-react-calls/references/call-session.md +0 -235
  498. package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
  499. package/skills/cometchat-react-calls/references/device-management.md +0 -210
  500. package/skills/cometchat-react-calls/references/group-calls.md +0 -257
  501. package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
  502. package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
  503. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
  504. package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
  505. package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
  506. package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
  507. package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
  508. package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
  509. package/skills/cometchat-react-calls/references/share-invite.md +0 -175
  510. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
  511. package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
  512. package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
  513. package/skills/cometchat-react-patterns/SKILL.md +0 -628
  514. package/skills/cometchat-react-push/SKILL.md +0 -634
  515. package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
  516. package/skills/cometchat-react-testing/SKILL.md +0 -413
  517. package/skills/cometchat-theming/SKILL.md +0 -498
  518. package/skills/cometchat-troubleshooting/SKILL.md +0 -294
@@ -0,0 +1,74 @@
1
+ # lifecycle — init, login, provider (React v7)
2
+
3
+ ## Init must happen once (StrictMode double-init)
4
+ Init is async and must complete before any `CometChat*` component renders. React 18 StrictMode runs effects twice in dev, so guard by caching the init **PROMISE — NOT a boolean**. A boolean set BEFORE `await init()` lets StrictMode's second call see `true` and return BEFORE init has actually resolved → the app renders / logs in against an un-initialized SDK and throws **"CometChatUIKit: Not initialized"** on first load (AUDIT-047). Cache the promise so every concurrent caller awaits the SAME init (mirrors the login in-flight promise below):
5
+ ```typescript
6
+ // initFromSettings resolves to CometChat.User | null (a resumed session or null), so type the cached
7
+ // promise as Promise<unknown> — assigning it into Promise<void> is a TS2322 error under strict TS.
8
+ let initPromise: Promise<unknown> | null = null;
9
+ function initCometChat(): Promise<unknown> {
10
+ if (!APP_ID || !REGION || !AUTH_KEY) throw new Error("CometChat credentials empty — check .env + prefix (VITE_/NEXT_PUBLIC_/PUBLIC_) and restart the dev server.");
11
+ if (!initPromise) {
12
+ // initFromSettings sets integrationSource="ai-agent" for telemetry attribution (routes the Calls SDK too) — AUDIT-084.
13
+ initPromise = CometChatUIKit.initFromSettings({ // cache the PROMISE (never a boolean flipped before the await)
14
+ appId: APP_ID, region: REGION,
15
+ credentials: { authKey: AUTH_KEY }, // dev only — prod: server-minted auth token (login below)
16
+ chatSDK: { presenceSubscription: { type: "ALL_USERS" } }, // = subscribePresenceForAllUsers()
17
+ });
18
+ }
19
+ return initPromise; // 2nd StrictMode call awaits the SAME init → never early-returns before ready
20
+ }
21
+ ```
22
+ Call init in `useEffect` (Next.js/Astro/React Router SSR) or at the entry file before `createRoot` (Vite/CRA — `main.tsx` only runs in the browser). Never call init during render (infinite re-render).
23
+
24
+ ## Login — safe SEQUENTIALLY, not CONCURRENTLY
25
+ Sequential: a second `login()` after the first completes returns the cached user. Concurrent: a second `login()` while the first is in-flight throws **"Please wait until the previous login request ends."** — exactly what StrictMode's double-effect triggers. Guard with a module-level in-flight promise:
26
+ ```typescript
27
+ let loginInFlight: Promise<unknown> | null = null;
28
+ async function ensureLoggedIn(uid: string, authToken?: string) {
29
+ const existing = CometChatUIKit.getLoggedInUser(); // SYNC getter, capital "In" — no await (see the note below)
30
+ if (existing && existing.getUid?.() === uid) return; // same user → done
31
+ if (existing) await CometChatUIKit.logout(); // switching accounts needs explicit logout
32
+ if (loginInFlight) { await loginInFlight; return; } // concurrent → reuse pending promise
33
+ loginInFlight = authToken ? CometChatUIKit.loginWithAuthToken(authToken) : CometChatUIKit.login(uid);
34
+ try { await loginInFlight; } finally { loginInFlight = null; }
35
+ }
36
+ ```
37
+ Call `ensureLoggedIn()` from the provider/effect, not `login()` directly. A cached promise (not a boolean) lets all callers `await` the same request.
38
+
39
+ ## Dev-only: `ensureDevUser` — create-if-missing a sample user, then log in (a guaranteed valid session)
40
+ For a fast dev start you can't reliably pre-check whether `cometchat-uid-1` exists (`getUser` needs a session, and you only have the Auth Key — not the REST key for a server-side lookup). So **create-if-missing then login** — one deterministic path, valid on any app (fresh/sample/empty/custom), no 5-way probe. **DEV-ONLY** — prod uses a real user + a server-minted token via `loginWithAuthToken`.
41
+ ```typescript
42
+ import { CometChat } from "@cometchat/chat-sdk-javascript"; // for CometChat.User
43
+ // CometChatUIKit.createUser(user) uses the Auth Key configured in init — verified vs 7.1.0.
44
+ async function ensureDevUser(uid = "cometchat-uid-1", name = "Demo User") {
45
+ try {
46
+ const u = new CometChat.User(uid);
47
+ u.setName(name);
48
+ await CometChatUIKit.createUser(u); // creates it if missing (dev; uses the init Auth Key)
49
+ } catch {
50
+ // already-exists is EXPECTED and fine — the user is there; fall through to login.
51
+ }
52
+ await ensureLoggedIn(uid); // now guaranteed to succeed
53
+ }
54
+ ```
55
+
56
+ ## Get the current logged-in UID (never hardcode)
57
+ ```typescript
58
+ import { CometChatUIKit } from "@cometchat/chat-uikit-react";
59
+ import { CometChat } from "@cometchat/chat-sdk-javascript";
60
+ // preferred — sync, after login completes (most app code):
61
+ const myUid = CometChatUIKit.getLoggedInUser()?.getUid(); // UI Kit, capital "In" → CometChat.User | null (sync)
62
+ // fallback — async, when the SDK was initialized directly / session may still be restoring:
63
+ const myUid2 = (await CometChat.getLoggedinUser())?.getUid(); // SDK namespace, lowercase "in" → Promise<CometChat.User | null>
64
+ ```
65
+ > Two DIFFERENT methods on two DIFFERENT owners: the **sync** getter is `CometChatUIKit.getLogged**In**User()` (UI Kit, capital "In"); the **async** getter is `CometChat.getLogged**in**User()` (SDK namespace, lowercase "in"). `CometChatUIKit` has NO async `getLoggedinUser` — that was a v6 assumption. Verified against installed 7.1.0 (`index.d.ts` line 617 + the kit's own doc note).
66
+
67
+ ## Production login
68
+ Fetch a per-user token from YOUR backend (CometChat REST API with your server AUTH_TOKEN), then `await CometChatUIKit.loginWithAuthToken(token)`. Never hardcode auth keys in shipped source.
69
+
70
+ ## Logout
71
+ `await CometChatUIKit.logout();` — clears the local session; call on app sign-out.
72
+
73
+ ## Reusable provider
74
+ Wrap init + login + ready-gate in a `CometChatProvider` so components mount only after login resolves; keep the module-level `initPromise`/`loginInFlight` promises (cache the PROMISE, not a boolean — AUDIT-047) so StrictMode doesn't double-fire or race ahead of a not-yet-resolved init. Mount the provider at a STABLE ancestor (not remounted per route/toggle) so init/login survive navigation. (Pretty-print errors — don't `String(error)` raw; surface the code/message.)
@@ -0,0 +1,58 @@
1
+ # setup-credentials — detect, credentials, authorize (React v7)
2
+
3
+ ## 1. Detect project (package / config / framework)
4
+ - Confirm `package.json` has `react`. Identify the bundler → env prefix:
5
+ - **Vite** → `.env`, `import.meta.env.VITE_*`
6
+ - **Create React App** → `.env`, `process.env.REACT_APP_*`
7
+ - **Next.js** → `.env.local`, `process.env.NEXT_PUBLIC_*`
8
+ - **Astro (React)** → `.env`, `import.meta.env.PUBLIC_*`
9
+ - **React Router (Vite)** → `.env`, `VITE_*`
10
+ - Reuse existing config: a prior `.cometchat/config.json` or already-set `*_COMETCHAT_APP_ID` → reuse, skip re-setup, don't re-provision or re-ask.
11
+
12
+ ## 2. version_conflict — STOP gate
13
+ If `@cometchat/chat-uikit-react` is installed at a non-v7 major (e.g. v6), STOP. Surface it, reconcile (upgrade to v7, or load the matching-version skills), then continue. Never mix majors.
14
+
15
+ ## 3. Credentials — fetch from the dashboard (offer it), or paste manually
16
+ > **The CLI is a DASHBOARD/API client only, loaded ON DEMAND (AUDIT-059).** The `@cometchat/skills-cli` tool does exactly THREE things: `auth` (dashboard login), `provision` (fetch an app's App ID/Region/Auth Key from the dashboard), and `config` (local cred state). It knows NOTHING about React/frameworks/UI Kit and does NOT write env files, detect the project, or generate code — **the SKILL owns all of that** (detection = §1 by reading the repo; env-writing = §4; codegen = the golden path). Only load the CLI when the user opts into fetching from the dashboard.
17
+
18
+ > **OFFER the dashboard fetch; don't default to manual paste (AUDIT-039).** When credentials are missing, present BOTH paths and default to the fetch: *"I can fetch your App ID / Region / Auth Key by logging into your CometChat dashboard (I'll load the CometChat CLI to do it), or you can paste them manually — which do you prefer?"* **Only if the user picks the fetch do you load/run the CLI** (below); a manual paste never touches the CLI. **Never silently skip to "paste them yourself," and never end the build with a "to finish, add credentials manually" TODO.**
19
+
20
+ > **The CLI.** Load it on demand with **`npx @cometchat/skills-cli@3` `<cmd>`** (public npm — no auth needed; `@3` pins the CLI major that matches the v5 skills). Below, `<cli>` = that full invocation. (Distinct from `@cometchat/skills`, which only installs these skills.)
21
+
22
+ **Fetch path (user opted in).** Let each command block — do NOT background or race them.
23
+ 1. **Check auth:** `<cli> auth status --json` → `logged-in` | `logged-out`.
24
+ 2. **Log in (if logged-out):** `<cli> auth login` — opens the dashboard in the browser (device-auth), polls, stores the bearer in the OS keychain. (`auth signup` for a brand-new account.) Surface terminal errors verbatim (`ACCESS_DENIED` / `EXPIRED` / `TIMEOUT` / `ABORTED`) and stop; don't retry silently.
25
+ 3. **Pick the app — REUSE first, ASK with CURATED options, never auto-create:** if a `.cometchat/config.json` or env App ID already exists, use it and SKIP. Otherwise `<cli> provision list --json` returns the raw list — **the SKILL curates it; never dump a long table.** Present a selectable prompt of ≤4 options: the **TOP 3** apps ranked by relevance (framework match, then most-recent; name · region · App ID) **+ "Show all N apps"**; the free-text/"Other" answer = **paste an App ID/name manually**. Only on "Show all" list them all. No selectable prompts → the same as a numbered list (1–3, 4=show all, 5=manual) and WAIT. **NEVER dump all N as the primary prompt** (the 29-apps-in-a-table regression). **NEVER auto-create an app** — only on explicit request, confirming the name; zero apps → ask first.
26
+ 4. **Fetch the credentials:** `<cli> provision use --app-id "<id>" --json` (or `provision run`) authenticates and returns `{ appId, region, authKey }` for that app **and writes a framework-neutral `.cometchat/config.json`** — it does NOT write any env file and takes NO `--framework` flag (that's the skill's job, §4). The Auth Key is returned so the skill can write it into the env; treat it as a secret (never echo it back to the user).
27
+ 5. **Reuse existing:** a prior `.cometchat/config.json` or an already-set `*_COMETCHAT_APP_ID` → reuse, skip re-provision.
28
+
29
+ **Manual path** (user prefers, or the CLI can't run): Dashboard → Your App → Credentials → App ID, Region (`us`/`eu`/`in`), Auth Key (**dev only**). If neither path yields them, ASK and WAIT — never proceed with placeholders.
30
+
31
+ **Then the SKILL writes the env** from the config.json / returned creds — §4 (right prefix for the detected bundler) — and gitignores it. The CLI stops at "here are your credentials + a neutral config.json."
32
+
33
+ **Enable dashboard-gated features** (reactions, polls, translation, AI copilot, moderation, …) — the CLI does this (it's a dashboard/API op): `<cli> features list` shows the app's extensions + enabled state; `<cli> features enable <id>` / `disable <id>` flips the toggle via the management API (reads the App ID from `.cometchat/config.json`). Or do it manually in the **Dashboard** (Extensions / AI). Either way, YOU still wire the client component/prop (see `cometchat-react-v7-features`); the CLI only flips the dashboard toggle. Fetch current dashboard steps from the feature's `docs_topic`. (AUDIT-070 restored `features`.)
34
+
35
+ Production: mint a per-user **auth token** from your backend and use `loginWithAuthToken` — never ship the Auth Key to the client. The token endpoint is host code the SKILL scaffolds (or follow CometChat's docs); it is not a CLI step.
36
+
37
+ ## 4. Env variables (three)
38
+ | Suffix | Required | Notes |
39
+ |---|---|---|
40
+ | `COMETCHAT_APP_ID` | yes | dashboard App ID |
41
+ | `COMETCHAT_REGION` | yes | `us` / `eu` / `in` |
42
+ | `COMETCHAT_AUTH_KEY` | dev only | replace with auth tokens in prod |
43
+
44
+ Prefix per bundler (Vite `VITE_`, CRA `REACT_APP_`, Next `NEXT_PUBLIC_`, Astro `PUBLIC_`). **The SKILL writes this env file** from the credentials (fetched into `.cometchat/config.json`, or pasted) — the CLI does not. **Then ENSURE the env file is gitignored (AUDIT-048): Vite/CRA scaffolds ignore only `*.local` (NOT `.env`), so an un-ignored `.env` with the Auth Key is a committable secret — verify/append `.env` to `.gitignore` for Vite/CRA/Astro; Next's `.env.local` is gitignored by default.** Restart the dev server after editing `.env`. Fail loud if any var is empty — an empty credential surfaces later as a cryptic `ERROR_API_KEY_NOT_FOUND`.
45
+
46
+ ## 5. Authorize / verify
47
+ Credentials are valid when `CometChatUIKit.initFromSettings(settings)` resolves and `login()`/`loginWithAuthToken()` succeeds for a UID that exists in the app (see §6). Auth error on init/login → most commonly a **Region mismatch**; re-check the dashboard values. Do not render until login resolves.
48
+
49
+ ## 6. Which user to log in as (the login UID) — do NOT invent one
50
+ `login(uid)` authenticates as a user that **must already exist** in your CometChat app; it does **not** create one. Never hardcode a guessed UID — even the current docs sample `cometchat-uid-1` is **not guaranteed to exist in this app**. Logging in as a missing UID fails (user-not-found) and the screen stays blank.
51
+ - **Never suggest a legacy/guessed sample UID.** Do **NOT** offer `superhero1` (or `superhero1..5`, `cc-user-*`, or any other remembered "classic sample" set) — those are NOT seeded in modern apps and only mislead the user. When you ASK, do not fabricate candidate UIDs from memory. The ONLY tentative suggestion allowed is `cometchat-uid-1..5`, and only labelled *"if this is a freshly-created app"* — never presented as a known-good login for THIS app.
52
+ - **Use a real UID:** Dashboard → your app → **Users** tab lists every UID. A freshly created / sample app is pre-seeded with sample users (`cometchat-uid-1`…`cometchat-uid-5`). ASK the user; prefer their own answer over any suggestion.
53
+ - **The login-UID prompt is DETERMINISTIC — ALWAYS present these SELECTABLE options, in this order (AUDIT-068/069):**
54
+ 1. **`cometchat-uid-1` — create-if-missing then login** *(dev, recommended for a fast start)*. Wire login as **create-if-missing then login** (`ensureDevUser` in `lifecycle.md`) so it's GUARANTEED valid on ANY app (fresh/sample/empty/custom). Don't "probe uid-1→uid-5": you can't check existence before login (`getUser` needs a session; we only hold the Auth Key), so probing = up to 5 login attempts — create-if-missing is ONE deterministic call. DEV-ONLY (prod → server-minted per-user tokens).
55
+ 2. **Paste your own UID** — for a real/custom app with existing users (Dashboard → Users); the free-text / "Other" answer. **No user is created** on this path.
56
+ > This is a SKILL prompt (login-UID is the skill's job) — the CLI has no part in it. Keep it consistent run-to-run: option 1 (`cometchat-uid-1`, create-if-missing) must ALWAYS be present. Never suggest `superhero1`/legacy sample UIDs.
57
+ - **Create one (dev):** Dashboard → Users → **Add User** (set a UID, e.g. `alice`), then `login("alice")`. Programmatic creation (SDK `createUser` client-side, or the REST `POST /v3/users` with the REST API Key server-side) — fetch the exact signature/endpoint from docs; never ship the Auth Key to a client.
58
+ - **Production:** don't hardcode a sample UID. Per real end-user, create a matching CometChat user server-side (REST API + API key, using your own id as the UID), then log in with a per-user **auth token** from your backend → `loginWithAuthToken(token)` (§3).
@@ -0,0 +1,11 @@
1
+ # ssr — server-side rendering safety (React v7)
2
+
3
+ All UI Kit components are browser-only (they touch `window`/`document` on import). Rendering them on the server crashes. Prevent per framework:
4
+
5
+ - **Next.js App Router:** `dynamic(() => import("./ChatView"), { ssr: false })` is **NOT allowed in a Server Component** (App Router build error: *"ssr: false is not allowed with next/dynamic in Server Components"*). Put the `dynamic(...)` call inside a `"use client"` module — e.g. a small `"use client"` wrapper that does the `dynamic(..., { ssr: false })` and renders it, then import that wrapper from your server page/layout. (The chat file itself must also be `"use client"`.)
6
+ - **Next.js Pages Router:** `dynamic(() => import("../components/CometChatNoSSR"), { ssr: false })`.
7
+ - **Astro:** `<ChatPanel client:only="react" />` — prevents render during static build.
8
+ - **React Router v7 (SSR):** `React.lazy()` + `Suspense`, gated on a mounted flag (`useEffect(() => setMounted(true), [])`; `if (!mounted) return null`).
9
+ - **Vite / CRA:** no SSR — import and use directly.
10
+
11
+ Detail belongs to `cometchat-react-v7-patterns` (framework glue); this is the core-level safety summary.
@@ -0,0 +1,52 @@
1
+ # theming — CSS at the core level (React v7)
2
+
3
+ Import the UI Kit CSS ONCE at the app root; theme via `--cometchat-*` variables. v7 also supports a `theme` prop on `CometChatProvider` and a `useTheme` hook with `light`/`dark` + `data-theme`.
4
+
5
+ ```tsx
6
+ // import once at the highest level (main.tsx / app/layout.tsx / global css)
7
+ import "@cometchat/chat-uikit-react/styles"; // v7.1.0 CSS entry (package exports "./styles" -> dist/index.css)
8
+ ```
9
+ The CSS-only `./styles` export has no type declaration, so on TypeScript 6 (`noUncheckedSideEffectImports` defaults ON — it's not a `strict` thing; opt-in on 5.6–5.9) that import errors with **TS2882 "Cannot find module or type declarations for side-effect import of '@cometchat/chat-uikit-react/styles'."** (verified vs TS 6.0.3). Ship this ambient declaration as a REAL file the app can copy — `src/cometchat.d.ts` (any `.d.ts` picked up by `tsconfig` `include`) — so the import type-checks (AUDIT-013):
10
+ ```typescript
11
+ // src/cometchat.d.ts — lets TS accept the CSS-only "./styles" side-effect import (TS2882 otherwise)
12
+ declare module "@cometchat/chat-uikit-react/styles";
13
+ ```
14
+ ```css
15
+ /* theme-INDEPENDENT tokens (identical in light & dark) may sit on the bare class */
16
+ .cometchat { --cometchat-font-family: "Inter", sans-serif; }
17
+ /* theme-DEPENDENT tokens (every colour) MUST be scoped to the data-theme ATTRIBUTE,
18
+ NOT the bare `.cometchat` class — see the gotcha below. */
19
+ .cometchat[data-theme="light"] { --cometchat-primary-color: #6851d6; }
20
+ .cometchat[data-theme="dark"] { --cometchat-primary-color: #bb86fc; }
21
+ ```
22
+ - **Scope colour tokens to `data-theme`, not bare `.cometchat` (AUDIT-033).** The provider renders `<div data-theme="light|dark" class="cometchat">`, but several components (verified: `CometChatSearch`; also popovers/portaled surfaces) render their OWN nested `<div class="cometchat …">` **with NO `data-theme`**. A colour token on the bare `.cometchat` class therefore ALSO matches that nested wrapper and **re-pins the light value on its subtree** — so in dark mode the search (etc.) stays light while everything else goes dark. Put per-theme colours on `.cometchat[data-theme="light"]` / `.cometchat[data-theme="dark"]`: the nested wrapper matches neither and simply **inherits** the provider's theme. Use `.cometchat[data-theme="dark"]` (the SAME element) — NOT `[data-theme="dark"] .cometchat` (a descendant that matches nothing → silent no-op). To retint a kit internal per theme, use `[data-theme="dark"] .cometchat-<bem>` (the kit's own convention). Depth: `cometchat-react-v7-customization`.
23
+ - Never target internal class names (e.g. `.cometchat-message-bubble__wrapper`) — not public API, changes between versions. Use `--cometchat-*` variables (or documented BEM classes for per-component scoping).
24
+ - Import overrides AFTER the kit CSS.
25
+ - **Per-surface background tokens.** Some surfaces paint an opaque background from their OWN token, so a wrapper background can't reach them — override that surface's token instead. Two common ones (verified vs 7.1.0): the message list paints `--cometchat-message-list-bg` (default `-03`, `dist/index.css:4243`) and the thread header paints `--cometchat-thread-header-background` (falls back to `-01`, `dist/index.css:12727`; not set in `:root`, so setting it directly is the clean way to tint the thread header specifically). Differentiating the thread panel from the main list uses exactly this — see the thread recipe in `cometchat-react-v7-customization` (message-list-bg is the required step; thread-header-background is an optional header-only tint).
26
+
27
+ ## Follow the system (OS) light/dark theme (recommended default)
28
+ The `theme` prop is `"light" | "dark"` and **defaults to `light`** — the UI Kit does **NOT** read the OS `prefers-color-scheme` and there is **no `theme="system"`** (AUDIT-004). For a fresh integration, sync the theme to the OS by default (least surprise) with a small SSR-guarded hook, and pass it to `CometChatProvider`:
29
+
30
+ ```tsx
31
+ import { useEffect, useState } from "react";
32
+ import { CometChatProvider } from "@cometchat/chat-uikit-react";
33
+
34
+ function useSystemTheme(): "light" | "dark" {
35
+ const read = () =>
36
+ typeof window !== "undefined" &&
37
+ window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
38
+ const [theme, setTheme] = useState<"light" | "dark">(read); // SSR: renders "light", corrects on hydrate
39
+ useEffect(() => {
40
+ const mq = window.matchMedia("(prefers-color-scheme: dark)");
41
+ const onChange = () => setTheme(mq.matches ? "dark" : "light");
42
+ mq.addEventListener("change", onChange); // live-updates when the OS theme flips
43
+ return () => mq.removeEventListener("change", onChange);
44
+ }, []);
45
+ return theme;
46
+ }
47
+
48
+ // <CometChatProvider theme={useSystemTheme()}> … </CometChatProvider>
49
+ ```
50
+ For an explicit user toggle instead of OS-follow, use `useTheme()` (`{ theme, setTheme }`). Next.js/SSR: `window.matchMedia` must stay guarded — see `references/ssr.md`.
51
+
52
+ Full theming depth (token list, per-component BEM, dark mode switching): `cometchat-react-v7-customization`.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: cometchat-react-v7-customization
3
+ description: "Theme and brand the React v7 UI Kit — light/dark mode, CSS custom-property design tokens, per-component style overrides. Triggers: 'change chat colors', 'dark mode chat', 'match my brand', 'customize cometchat theme', 'override message list styles'."
4
+ license: "MIT"
5
+ compatibility: "React >=18; @cometchat/chat-uikit-react ^7 (7.1.x, verified 7.1.0)"
6
+ metadata:
7
+ author: "CometChat"
8
+ version: "1.0.0"
9
+ tags: "cometchat react customization theming css-variables v7"
10
+ ---
11
+
12
+ > **Ground truth:** `@cometchat/chat-uikit-react@7`. Theming mechanism below is from the live v7 theming docs (see core `references/docs-map.md` → `/ui-kit/react/theming`). Status: **catalog-verified vs installed 7.1.0 (exports-only web-v7.json).** Fetch the full `--cometchat-*` token list from the theming **`.md` twin** (`{DOCS_BASE}/ui-kit/react/theming.md`, via `docs-map.md`) — do NOT bake it.
13
+
14
+ ## Companion skills (read first)
15
+ - `cometchat-react-v7-core` — install, provider, `init→login→render`. This skill ASSUMES it.
16
+
17
+ ## Use this skill when
18
+ Branding/theming: colors, fonts, light/dark mode, or per-component style overrides.
19
+
20
+ ## Prerequisites & install
21
+ Covered by core. No new package.
22
+
23
+ ## Customization mechanism (BAKED — v7)
24
+ - **Design tokens = CSS custom properties**, all prefixed `--cometchat-*`, scoped to the `.cometchat` wrapper.
25
+ - **Light/dark:** built-in `light` (default) and `dark`, selected via the `theme` prop on `CometChatProvider` and the `data-theme` attribute on the wrapper. Runtime switching via the `useTheme` hook.
26
+ - **Follow the OS theme:** the `theme` prop is `"light" | "dark"` only and defaults to `light` — there is **no `theme="system"`** and the kit does NOT read `prefers-color-scheme` (AUDIT-004). To follow the system light/dark setting, sync the `theme` prop to `window.matchMedia("(prefers-color-scheme: dark)")` (with a `change` listener, SSR-guarded). Recommended as the default for a fresh integration. Full recipe: `cometchat-react-v7-core/references/theming.md`.
27
+ - **Import order:** import your overrides AFTER the UI Kit styles (import UI Kit CSS ONCE at root).
28
+
29
+ ```tsx
30
+ import { CometChatProvider, useTheme } from "@cometchat/chat-uikit-react";
31
+ import "./cometchat-overrides.css"; // AFTER the kit styles
32
+
33
+ <CometChatProvider theme="dark"><>{/* your chat UI */}</></CometChatProvider>
34
+ ```
35
+ ```css
36
+ .cometchat { --cometchat-font-family: "Inter", sans-serif; } /* theme-INDEPENDENT tokens only */
37
+ .cometchat[data-theme="light"] { --cometchat-primary-color: #e91e63; } /* per-theme COLOURS → data-theme attr */
38
+ .cometchat[data-theme="dark"] { --cometchat-primary-color: #bb86fc; }
39
+ .cometchat-message-list { /* BEM class to scope tokens per component */ }
40
+ ```
41
+ > **Per-theme COLOURS go on the `data-theme` element — NOT the bare `.cometchat` class (AUDIT-033).** `CometChatProvider` renders one wrapper `<div data-theme="light|dark" class="cometchat">` (compiled bundle: `jsx("div",{ "data-theme": internalTheme, className: "cometchat" })`), and the kit defines its tokens on `[data-theme=light]` / `[data-theme=dark]`. **But several components render their OWN nested `<div class="cometchat …">` with NO `data-theme`** — verified for `CometChatSearch` (also popovers / portaled surfaces). So a colour on the bare `.cometchat` class ALSO lands on that nested wrapper and **re-pins the base (light) value there**: in dark mode the search stays light while everything else goes dark. Scope per-theme colours to `.cometchat[data-theme="light"]` / `.cometchat[data-theme="dark"]` so the nested wrapper matches neither and **inherits** the provider's theme. Keep only theme-independent tokens (font-family, radii) on bare `.cometchat`. (Earlier docs claimed `[data-theme="dark"] .cometchat` matches nothing — that's wrong: it DOES match those nested wrappers. It's still not the right selector for brand tokens; use the `.cometchat[data-theme]` form above.) To retint a kit INTERNAL per theme, use the kit's own pattern — `[data-theme="dark"] .cometchat-message-list { … }`.
42
+
43
+ ## What's swappable
44
+ - Global tokens on `.cometchat` (primary color, fonts, radii, spacing — fetch the full token names from the theming `.md` twin).
45
+ - Per-theme overrides via `[data-theme="..."]`.
46
+ - Per-component scoping via BEM classes (`.cometchat-conversations`, `.cometchat-message-list`, …).
47
+ - Exact token names/defaults: fetch the theming `.md` twin (`{DOCS_BASE}/ui-kit/react/theming.md`, via core `references/docs-map.md`) — do NOT bake the token table.
48
+
49
+ ### Differentiating a nested surface — an opaque sub-surface needs its OWN var override (BAKED — verified vs 7.1.0)
50
+ **Rule (general).** A kit sub-surface that paints an OPAQUE background does NOT inherit a wrapper's background — its own opaque paint covers whatever the wrapper set. To differentiate a nested surface you MUST override THAT surface's own background CSS variable (scoped on an ancestor — it cascades into the variable, no internal-class override needed), not just set a background on the wrapper.
51
+
52
+ **The thread panel is the canonical case.** Verified in the 7.1.0 CSS: `.cometchat-message-list` paints `background: var(--cometchat-message-list-bg)` (default `var(--cometchat-background-color-03)`); `.cometchat-thread-header` and `.cometchat-message-composer` paint their own opaque `var(--cometchat-background-color-01)`. So the thread's message list renders `-03` — the SAME shade as the main list, and different from its own header/composer — and a background on the thread wrapper alone can't fix it (the list covers it). **Override the list's own token on the thread wrapper:**
53
+ ```css
54
+ /* the div you wrap CometChatThreadHeader + thread CometChatMessageList + CometChatMessageComposer in */
55
+ .cc-thread-panel {
56
+ --cometchat-message-list-bg: var(--cometchat-background-color-01); /* matches the thread header/composer; differs from the main list's -03 */
57
+ border-left: 1px solid var(--cometchat-border-color-default, #e8e8e8); /* optional divider from the main pane (-default = neutral-300 = #e8e8e8 light / #383838 dark) */
58
+ }
59
+ ```
60
+ `--cometchat-background-color-01` is `#ffffff` (light) / `#141414` (dark) and `-03` is `#f5f5f5` (light) / `#272727` (dark) — so the override visibly separates the thread list from the main list in BOTH themes while matching the thread header/composer. Same trick for any per-surface background: scope the surface's OWN token on the wrapper, never override the kit's internal `.cometchat-*` element classes (`core/references/anti-patterns.md` #7/#12/#16).
61
+
62
+ > **Tinting the thread HEADER specifically — use its dedicated token.** `.cometchat-thread-header` paints `background: var(--cometchat-thread-header-background, var(--cometchat-background-color-01, #fff))` (verified vs 7.1.0 — `dist/index.css:12727`; the token is NOT defined in `:root`, only referenced with that fallback chain). So if you want to give the thread HEADER its own tint (a different shade from the list/composer, e.g. a subtly darker panel header), set `--cometchat-thread-header-background` directly on the thread wrapper — cleaner and more targeted than leaning on the `-01` fallback:
63
+ > ```css
64
+ > .cc-thread-panel {
65
+ > --cometchat-message-list-bg: var(--cometchat-background-color-01); /* REQUIRED — repaints the thread LIST (opaque, covers the wrapper) */
66
+ > --cometchat-thread-header-background: var(--cometchat-background-color-02); /* OPTIONAL — tints ONLY the thread header, independent of the list */
67
+ > }
68
+ > ```
69
+ > The `--cometchat-message-list-bg` override above is still **required** — the header token only paints the header; it does not touch the opaque message list. Use `--cometchat-thread-header-background` only when you want the header a *different* shade from the list; if you want them to match, the header already inherits `-01` and needs no override.
70
+
71
+ ## Structural customization — view slots & composition (beyond tokens)
72
+ Theming changes how it LOOKS (tokens); changing WHAT renders is **view slots** + composition, not CSS. Every list/message component exposes view-slot props to inject custom UI **IN** the component (never as a sibling on top): e.g. Conversations `headerView` / `searchView`; MessageHeader `trailingView` / `auxiliaryButtonView`; MessageList `headerView` / `footerView`; Composer `auxiliaryButtonView` / `headerView`. Baked slot map: `cometchat-react-v7-core/references/component-props.md`. For the exhaustive per-component slot list, fetch the component's `.md` twin (`core/references/docs-map.md`) — do NOT read `.d.ts`. (Custom message **bubbles** are a separate capability — the message **plugin** architecture; see `cometchat-react-v7-features` + `COVERAGE.md`.)
73
+
74
+ ## Common pitfalls (BAKED)
75
+ - Importing UI Kit CSS more than once, or overrides BEFORE the kit styles (specificity lost). Hardcoding hex in components instead of tokens. Assuming v6 theme classes — v7 uses `--cometchat-*` tokens + `data-theme`; fetch current names.
76
+ - **Writing a per-theme override as `[data-theme="dark"] .cometchat { … }` — it matches NOTHING and silently no-ops.** The provider puts `data-theme` and `class="cometchat"` on the SAME div, so there is no `.cometchat` nested inside a `[data-theme]` ancestor. Use `.cometchat[data-theme="dark"]` (same element) for brand tokens, or `[data-theme="dark"] .cometchat-<bem>` (ancestor + kit-internal descendant, the kit's own pattern) to retint an internal. (Verified vs 7.1.0.)
77
+ - **Hand-write brand/per-theme overrides — do NOT put per-theme tokens (colors, background, font) on bare `:root` (AUDIT-049/057).** A background or font pinned on `:root` has LOWER specificity than the kit's own `.cometchat[data-theme]` tokens, so it either loses (font silently doesn't apply) or forces the light value even in dark mode (breaks the OS-follow default, AUDIT-004/033). Scope every per-theme token to `.cometchat[data-theme="light"]` / `.cometchat[data-theme="dark"]` (theme-independent tokens like radii can stay on bare `.cometchat`). Theming is the SKILL's job — hand-write the scoped CSS (there is no CLI codegen for it).
78
+ - **Setting a background on a WRAPPER to differentiate a nested surface, and expecting it to show.** An opaque kit sub-surface (the message list paints its own `--cometchat-message-list-bg`) covers the wrapper background — the wrapper bg only shows through non-opaque children. To differentiate the sub-surface, override THAT surface's own token (above), never the wrapper alone and never its internal `.cometchat-*` class. This is why the thread message-list keeps looking undifferentiated from the main list even after a thread-wrapper background is set (AUDIT-020/024).
79
+ - **Assuming the kit follows the OS theme — it doesn't.** `theme` defaults to `light` and there's no `theme="system"`; a plain integration ignores the user's OS dark-mode setting. Sync to `prefers-color-scheme` if OS-follow is wanted (AUDIT-004).
80
+
81
+ ## Verify it works
82
+ Your theme / `--cometchat-*` overrides apply in the running app (colors, light/dark), and the kit CSS is imported once at the app root.
83
+
84
+ **Close (after it builds):** end with the shared 3-option selectable menu and WAIT for the pick — **① add another feature** (suggest a few not-yet-wired) · **② customize theming** (further tweaks) · **③ test it manually** (stop; let the user check). Tailor suggestions to what's not yet done. Same contract as the `cometchat-react-v7-core` close (`RULES.md` §19).
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: cometchat-react-v7-features
3
+ description: "Enable a specific CometChat feature in a React v7 app — reactions, polls, stickers, mentions, translation, link preview, smart replies and other AI, calls, push notifications, moderation. Looks the feature up in the features.json oracle, then wires enablement. Triggers: 'add reactions', 'enable polls', 'turn on smart replies', 'enable message translation', 'add voice/video calling'."
4
+ license: "MIT"
5
+ compatibility: "React >=18; @cometchat/chat-uikit-react ^7 (7.1.x, verified 7.1.0)"
6
+ metadata:
7
+ author: "CometChat"
8
+ version: "1.0.0"
9
+ tags: "cometchat react features extensions ai calls push moderation v7"
10
+ ---
11
+
12
+ > **Ground truth:** the feature existence oracle is `features.json` (pack root). A feature a user asks for MUST be an `id` there — if it's not listed, it does not exist; do not invent it. Exact enablement steps + current dashboard nav + config keys: FETCH from the feature's `docs_topic` (docs flag dashboard paths as fragile). UI component names come from the `web-v7` catalog. Status: **oracle curated from live docs 2026-07-29; entries marked VERIFY need confirming before shipping enablement steps.**
13
+
14
+ ## Companion skills (read first)
15
+ - `cometchat-react-v7-core` — install, credentials, `init→login→render`, provider. This skill ASSUMES it.
16
+ - `cometchat-react-v7-components` — the component catalog features render through.
17
+
18
+ ## Use this skill when
19
+ The user wants to turn ON a specific capability: "add reactions", "enable polls", "turn on smart replies", "add push notifications", "enable message translation", "add calling", "add moderation".
20
+
21
+ ## Prerequisites & install
22
+ Core setup done (credentials + init/login). Most features add no package; `voice-video-calls` needs the separate calls package.
23
+
24
+ ## Enable a feature (BODY — the oracle-driven flow)
25
+ 1. **Look it up in `features.json`.** Match the request to a feature `id`. Not listed → tell the user it isn't an available feature (don't invent one).
26
+ 2. **Branch on `category` + `enablement`:**
27
+ - `default` / `auto` → the SDK-side capability is on, but **check `needs_stitching` first**. If `needs_stitching: true`, the drop-in renders a default-ON affordance that is INERT/partial until the host wires it — you MUST either stitch it (callback + companion panel/component) or hide it; never leave it dead-ending (see the "Default-on affordances" pitfall). Otherwise nothing to enable — point at the `ui_components` if they want to surface/customize it.
28
+ - `extension` + `dashboard-extension` → enable the extension, then wire the client. **Two ways to enable: (a) via the CLI — `npx @cometchat/skills-cli@3 features enable <id>` flips the dashboard toggle via the API (reads the App ID from `.cometchat/config.json`; `features list` shows current state); OR (b) manually in the CometChat Dashboard → Extensions.** Offer the CLI (faster), fall back to the dashboard. The CLI only flips the toggle — YOU still wire the client component/prop. FETCH the current dashboard steps from `docs_topic` — do not bake the path.
29
+ - `ai` → enable via **dashboard-toggle** (AI User Copilot) AND wire the code prop — NOT zero-code (AUDIT-009). The toggle can be flipped by the CLI too — `@cometchat/skills-cli@3 features enable <id>` (an AI feature may first need an OpenAI key set on the app; the CLI reports that). Then wire the props: The copilot props DEFAULT TO OFF, so nothing appears until you set them: smart-reply → `showSmartReplies` on `CometChatMessageList` (default false; renders in the list FOOTER, not the composer); conversation-starter → `showConversationStarters` on `CometChatMessageList` (default false); conversation-summary → `showConversationSummaryButton` + `onSummaryClick` on `CometChatMessageHeader` (default false). These are `needs_stitching:true`. Only `ai-assistant` renders a distinct component (`CometChatAIAssistantChat`). Plan-gating is often 'unknown' — verify, don't assert.
30
+ - `package-install` (calls) → install the separate calls package (FETCH the exact coordinate/version from `docs_topic`), then wire the `ui_components`.
31
+ - **No UI Kit component (SDK-backed feature)** → the capability exists in the SDK but the UI Kit ships NO component for it (AI agents, campaigns, advanced/AI moderation, bots, webhooks, transient messages). Wire it from the **JavaScript Chat SDK** directly — look the exact method up in `cometchat-react-v7-core/references/docs-map.md` → **SDK docs** (the `llms.txt` index → the feature's page → its **AI-Integration-Quick-Reference accordion** for the method signatures; e.g. AI agents → `CometChat.addAIAssistantListener(...)`). This is the UI-Kit-first / SDK-fallback rule (`RULES.md`) — don't skip the feature and don't hand-roll what the SDK already exposes.
32
+ - `dashboard-only` (moderation) → configured ENTIRELY in the dashboard; emit **ZERO moderation UI code (AUDIT-078)**. Its `ui_components` (`CometChatModerationView` / `CometChatFlagMessageDialog`) are **AUTO-RENDERED / INTERNAL**, NOT host-wired: the kit auto-shows the moderation **footer** for blocked/pending messages (`CometChatMessageList hideModerationView` defaults false = shown), and the message list already ships a **built-in "Report message" option** that opens the flag dialog internally. So do **NOT** hand-roll a custom Report option (plugin `getOptions`) and do **NOT** mount `CometChatFlagMessageDialog` yourself — that duplicates the built-in. The only work is in the **Dashboard**: set up the Rules Engine (auto block/flag on send) + turn ON **Report Message / Report User**; the kit then surfaces everything with no code. (Rules Engine is not a classic extension → the CLI can't toggle it; give the user the dashboard steps.)
33
+ 3. **Wire the UI** using only the feature's `ui_components` (they exist in the `web-v7` catalog); fetch exact props from each component's `.md` twin (`cometchat-react-v7-core/references/docs-map.md`). **If the feature is a whole TASK with an end-to-end guide (check the docs-map "Task guides (recipes)" section — e.g. group chat, search, threads, new-chat, message-privately, block/unblock), BUILD FROM the guide and COMPARE your implementation against it for completeness — then apply the hardening deltas on top (docs-maximal; docs-map). No matching guide? → wire the `ui_components` the normal way (above) + fetch props; the guide is an enhancement, not required.**
34
+ 4. **Respect VERIFY notes** — any entry noting VERIFY (or an `ai`/`e2e-encryption`/`moderation` entry) must be confirmed against live docs for plan-gating and exact slugs before you emit steps.
35
+
36
+ ## Advanced / extensibility recipes (curated — verified against installed 7.1.x types)
37
+
38
+ ### Custom message types → the message-plugin architecture
39
+ v7 replaces v6's `CometChatMessageTemplate` with **plugins**. A custom message type is an object implementing `CometChatMessagePlugin` (`id`, `messageTypes`, `messageCategories`, `renderBubble`), registered on the provider. The `plugins` prop is MERGED with `defaultPlugins` internally — pass ONLY your extras; use `removePlugins` to override a built-in type.
40
+ ```tsx
41
+ import { CometChatProvider } from "@cometchat/chat-uikit-react";
42
+ import type { CometChatMessagePlugin } from "@cometchat/chat-uikit-react";
43
+
44
+ const productCardPlugin: CometChatMessagePlugin = {
45
+ id: "product-card",
46
+ messageTypes: ["product_card"], // your custom SDK message type
47
+ messageCategories: ["custom"],
48
+ renderBubble: (message) => <div className="product-card">{message.getSender().getName()}</div>,
49
+ };
50
+
51
+ <CometChatProvider plugins={[productCardPlugin]}>
52
+ <div>{/* your chat UI */}</div>
53
+ </CometChatProvider>
54
+ ```
55
+ > `CometChatProvider` REQUIRES `children`. Optional plugin-interface hooks: `getOptions`, `getLastMessagePreview`, `renderHeaderView`/`renderFooterView`, `getTextFormatters`. This is provider-level config — there's no standalone screen to render.
56
+
57
+ ### Text formatters / rich text
58
+ The default text plugin already applies **@mentions, URLs, and markdown**. Add CUSTOM formatting by subclassing the abstract `CometChatTextFormatter` (`id` + `getRegex()` + `format()`) and passing it via the `textFormatters` prop on `CometChatMessageComposer` (input) and the bubble components — it is **NOT** a prop on `CometChatMessageList`. The built-in formatters (`CometChatMentionsFormatter`, `CometChatUrlFormatter`, `CometChatMarkdownFormatter`, `CometChatRichTextFormatter`) have **no-arg constructors**.
59
+ ```tsx
60
+ import { CometChatMessageComposer, CometChatTextFormatter } from "@cometchat/chat-uikit-react";
61
+
62
+ class HashtagFormatter extends CometChatTextFormatter {
63
+ readonly id = "hashtag-formatter";
64
+ getRegex() { return /#(\w+)/g; }
65
+ format(text: string) { return text.replace(this.getRegex(), '<span class="hashtag">#$1</span>'); }
66
+ }
67
+
68
+ <CometChatMessageComposer textFormatters={[new HashtagFormatter()]} />
69
+ ```
70
+ > **The message LIST ignores these props** — its text bubbles use the text plugin's `getTextFormatters()` (default markdown + mentions + URL). To format hashtags in the list too, override that method via the provider: `plugins={[{ ...CometChatTextPlugin, getTextFormatters: () => [new CometChatMarkdownFormatter(), new CometChatMentionsFormatter(), new CometChatUrlFormatter(), new HashtagFormatter()] }]}` (provider plugins precede the defaults, so it wins; verified vs 7.1.0).
71
+ > **RTE toolbar ≠ `textFormatters` (AUDIT-051).** The **rich-text editor TOOLBAR** (bold/italic/underline/lists/links buttons in the composer) is a SEPARATE feature: toggle it with the `enableRichTextEditor` PROP on `CometChatMessageComposer` — `<CometChatMessageComposer enableRichTextEditor />` — a prop, NOT a component swap. (There is **no** `CometChatCompactMessageComposer` in v7 — that was a v6 phantom.) `textFormatters` above is for CUSTOM inline formatters (hashtags, @mentions, custom markup); they're orthogonal and can be used together. (There is no CLI shortcut — the skill sets the `enableRichTextEditor` prop directly.)
72
+
73
+ ### Calls / push operational depth
74
+ **Calls now has its own skill — `cometchat-react-v7-calls`.** For "add voice/video calling", route there: it bakes the install (`@cometchat/calls-sdk-javascript@5`, not bundled), the calling-on switch (`uiKit:{callsSDK:{}}` on `CometChatUIKit.initFromSettings` — the `initFromSettings` equivalent of the classic `setCallingEnabled(true)`), the root `CometChatIncomingCall` wiring, 1:1-rings-vs-group-joins, and the gotchas (idle-timeout in **ms**, zero-dimension call surface, Next.js SSR + webpack fallback, no group-ring, HTTPS/`getUserMedia`).
75
+ **Push notifications → the `cometchat-react-v7-push` skill** (thin + docs-first: it fetches CometChat's notifications docs and bakes the hardening deltas + SDK symbols). Route "add push" there — do NOT re-derive push here (single source).
76
+
77
+ ## Common pitfalls (BAKED)
78
+ - **Default-on affordances that need stitching** (`features.json` `needs_stitching: true`). Some drop-ins render a live-looking control BY DEFAULT that no-ops until the host wires it — do NOT treat these as "already on, nothing to do":
79
+ - `CometChatConversations` search bar (`showSearchBar` default `true`) only client-side-filters already-loaded conversation names — it is NOT real search. Wire `onSearchBarClicked` → open `CometChatSearch`, or hide it with `showSearchBar={false}`. (Real search may also need a Dashboard toggle — VERIFY.)
80
+ - `CometChatMessageList` thread-reply indicator / "Reply in Thread" no-ops until `onThreadRepliesClick` opens a thread panel (`CometChatThreadHeader` + `CometChatMessageList parentMessageId` + `CometChatMessageComposer parentMessageId`) — wire it or hide with `hideReplyInThreadOption`.
81
+ - Rule: never emit a default-on affordance that dead-ends. Either wire the destination or hide the trigger.
82
+ - Emitting a feature/component below its `contracts.json` minimum (e.g. group details without ban/kick/scope) — always cover the full min_capabilities (deterministic minimum, same every prompt).
83
+ - Claiming a feature that isn't in `features.json` (phantom feature) — the #1 hallucination here.
84
+ - Emitting a baked dashboard nav path — it rots; FETCH it.
85
+ - Rendering a feature's UI component without enabling its extension first (renders empty/no-ops).
86
+ - **Hand-rolling moderation UI (AUDIT-078).** Moderation is dashboard-only AND auto-surfaced: the kit renders the moderation footer for blocked/pending messages and the message list already ships a built-in "Report message" option (which opens the flag dialog internally). Do NOT add a custom Report option (plugin `getOptions`) or mount `CometChatModerationView`/`CometChatFlagMessageDialog` yourself — that duplicates the built-in. Emit ZERO moderation UI code; the only work is the Dashboard Rules Engine + Report Message/User toggles.
87
+ - Assuming an AI/E2EE feature is available on every plan — it's plan-gated; verify.
88
+
89
+ ## Verify it works
90
+ The enabled feature actually works in the running app (reactions appear, a poll sends, smart replies show, etc.) and any Dashboard toggle it needs is ON. If it renders empty, the extension/feature likely isn't enabled in the CometChat Dashboard.
91
+
92
+ **Close (after it builds):** end with the shared 3-option selectable menu and WAIT for the pick — **① add another feature** (suggest a few not-yet-wired) · **② customize theming** · **③ test it manually** (stop; let the user check). Same contract as the `cometchat-react-v7-core` close (`RULES.md` §19).
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: cometchat-react-v7-migration
3
+ description: "Upgrade a React app from CometChat UI Kit v6 → v7 (`@cometchat/chat-uikit-react` ^6 → ^7). Reads the repo's CometChat usage, applies the breaking-change map (deps, symbol renames, RxJS events → `useCometChatEvents`, DataSource → plugins, templates → plugins, theme prop, calling), fetches the prop-by-prop guide, and verifies the build. Triggers: 'upgrade my v6 uikit to v7', 'migrate cometchat react v6 to v7', 'upgrade @cometchat/chat-uikit-react to v7', 'cometchat v6 to v7', 'bump cometchat uikit'."
4
+ license: "MIT"
5
+ compatibility: "React >=18 <21; FROM @cometchat/chat-uikit-react ^6 → ^7 (7.1.x, verified 7.1.0); @cometchat/chat-sdk-javascript ^4.1.13 (peer); dompurify ^3.3.1 required (install explicitly); rxjs removed"
6
+ metadata:
7
+ author: "CometChat"
8
+ version: "1.0.0"
9
+ tags: "cometchat react migration upgrade v6 v7 uikit"
10
+ ---
11
+
12
+ > **Ground truth:** migrates a React app **FROM `@cometchat/chat-uikit-react@6` TO `@7`**. v7 target symbols are catalog-verified vs installed 7.1.0; the v6→v7 breaking-change map is BAKED in `references/migration-guide.md` (distilled from the official migration docs + a real v6.5.4→v7.1.0 export diff). The exhaustive prop-by-prop table is FETCHED from the docs migration `.md` twins. **APPEND/transform the user's code — never wipe it; work on a branch and confirm before bulk edits** (`RULES.md`).
13
+
14
+ ## Companion skills (read first)
15
+ - `cometchat-react-v7-core` — the v7 init/login/render + `CometChatProvider` the migrated app lands on. This skill ASSUMES it.
16
+ - `cometchat-react-v7-components` — the v7 component catalog (the target names).
17
+
18
+ ## Use this skill when
19
+ "upgrade my v6 UI Kit to v7", "migrate CometChat React v6→v7", "bump `@cometchat/chat-uikit-react` to v7". Precondition: the project currently has `@cometchat/chat-uikit-react@6`.
20
+
21
+ ## Migration workflow (BAKED)
22
+ 1. **Detect the starting point.** Confirm `package.json` has `@cometchat/chat-uikit-react@6` (already `@7` → STOP, nothing to migrate). Note the bundler (Vite/Next/CRA/React-Router/Astro → env prefix, per `cometchat-react-v7-patterns`) and whether the app uses calls / `rxjs` events / `DataSource` / message templates. **Work on a branch; transform in place, never delete the user's code.**
23
+ 2. **Update dependencies.** `npm install @cometchat/chat-uikit-react@7 @cometchat/chat-sdk-javascript@^4.1.13 dompurify@^3.3.1` then `npm uninstall rxjs` (v7 drops rxjs; **`dompurify` is required** — the kit imports it at runtime; install it explicitly per the official docs, even though it's in the kit's `dependencies`). If the app uses calling, bump the Calls SDK to the v7 major: `npm install @cometchat/calls-sdk-javascript@5` (v7 pins `^5.x` — verified; it is NOT the same major as the v6-era build). Enabling calling also moves: on the mandated `initFromSettings` path use `uiKit:{callsSDK:{}}` (not the classic `setCallingEnabled(true)`).
24
+ 3. **Scan the repo for v6 usage.** Grep for the removed/renamed symbols + patterns from `references/migration-guide.md`: `CometChatDocumentBubble`, `CometChatCompactMessageComposer`, `CometChatUrlsFormatter`, `CometChatTextHighlightFormatter`, any `*Events` (`CometChatMessageEvents`/`CometChatGroupEvents`/`CometChatCallEvents`/`CometChatUserEvents`/`CometChatConversationEvents`/`CometChatUIEvents`), `DataSource`/`DataSourceDecorator`/`ChatConfigurator`, `CometChatMessageTemplate` / `templates` prop, `textFormatters` prop **on `CometChatMessageList`/`CometChatConversations`** (gone from the lists in v7 — `textFormatters` itself is NOT removed; see pitfalls), `hideError`/`disableLoadingState` props, `data-theme` attribute, **localization** (`getLocalizedString(...)`, `CometChatLocalize`, unprefixed i18n keys like `group_info` that v7 moved under `sample_` — §7), `CometChatUIKitLoginListener`, and the removed standalone components (`CometChatEmojiKeyboard`/`CometChatMediaRecorder`/`CometChatToast`/`CometChatListItem`/`CometChatNotificationBadge`). Produce the concrete change list.
25
+ 4. **Apply the breaking-change map** (`references/migration-guide.md`): symbol renames, RxJS `*Events` → the `useCometChatEvents` hook, `DataSource`/`ChatConfigurator` → `CometChatMessagePlugin` + the `plugins` prop, `templates` prop → plugins (`textFormatters` is NOT removed — relocate it, see pitfalls), `data-theme` → the `theme` prop, calling → `uiKit:{callsSDK:{}}` on `initFromSettings` (step 2), **localization → the v7 method + map v6 keys to the bundled `sample_*` keys (or register via the INSTANCE method `CometChatLocalize.getSharedInstance()?.addTranslation(...)` — NOT a static) — see `migration-guide.md` §7; look up the EXACT key in the uikit source (`resources/<lang>/translation.json`) / docs / GitHub, never guess**. For any component's exact prop change NOT in the baked map, FETCH the prop-by-prop table via `cometchat-react-v7-core/references/docs-map.md` → `migration-property-changes`.
26
+ 5. **Wrap the chat tree in `CometChatProvider`** if it isn't already (v7 requires it above the components; init/login stay imperative and unchanged).
27
+ 6. **Verify.** Build/typecheck passes; NO v6 symbols remain (grep the removed names); the app renders inside `CometChatProvider`; migrated events/plugins/calling work. Reuse `cometchat-react-v7-core` "Verify it works".
28
+
29
+ ## Common pitfalls (BAKED)
30
+ - **Leftover `rxjs` event subscriptions** — v6 `*Events.<x>.subscribe()` do NOT fire in v7; convert every one to `useCometChatEvents((event) => …)` (SDK + UI events share one bus). Publish via `usePublishEvent()`.
31
+ - **Forgetting `CometChatProvider`** — v7 components read it; symptom = context/"not initialized" errors even though init ran.
32
+ - **`CometChatMessageTemplate` / `templates` props** — removed from components; move custom message rendering to a `CometChatMessagePlugin` passed via `plugins`. **`textFormatters` is NOT removed** — it stays a prop in v7 (verified vs 7.1.0) on `CometChatMessageComposer`, the bubble components (Text/Image/Video/Audio/File/…), `CometChatSearch` and `CometChatMessageInformation`, but it is GONE from `CometChatMessageList`/`CometChatConversations`. Keep it as a prop on those components. The list's bubbles take formatters from the text plugin's `getTextFormatters()`, so to keep a v6 list-level formatter, override that one method — `plugins={[{ ...CometChatTextPlugin, getTextFormatters: () => [/* defaults + yours */] }]}` (provider plugins precede the defaults, so it wins).
33
+ - **Dependency drift** — missing the new `dompurify` peer dep, or leftover `rxjs`, breaks the build; do both halves of step 2.
34
+ - **Calling silently off** — v7 needs calling turned on in the init settings (`uiKit: { callsSDK: {} }` via `CometChatUIKit.initFromSettings`; or the classic `.setCallingEnabled(true)` on `UIKitSettingsBuilder`) — not a provider prop; without it, call buttons hide and the Calls SDK never loads.
35
+ - **Bubble routing** — the message list now defaults to the multi-attachment bubbles (`CometChatImageBubble`→`CometChatImagesBubble`, singular `CometChatFileBubble` still ships); code that imported singular bubble names for the list default may need the plural.
36
+ - **Don't mass-remove `hideError`** — it's removed from list components but **retained on `CometChatMessageComposer`**; `textFormatters` likewise still exists on the message-bubble components. Scope the removals; don't blanket-strip.
37
+
38
+ ## Verify it works
39
+ Build/typecheck is green; a repo-wide grep finds NO removed v6 symbols (`CometChatDocumentBubble`, `CometChatCompactMessageComposer`, `*Events`, `DataSource`, `DataSourceDecorator`, `ChatConfigurator`, `CometChatMessageTemplate`, `CometChatUIKitLoginListener`); the app renders inside `CometChatProvider`; and any migrated events / plugins / calling work. Full prop-by-prop reference: fetch `migration-property-changes` via `cometchat-react-v7-core/references/docs-map.md`.
@@ -0,0 +1,119 @@
1
+ # migration-guide — CometChat React UI Kit v6 → v7 (BAKED breaking-change map)
2
+
3
+ Distilled from the official migration docs (`ui-kit/react/migration-overview` + `migration-property-changes`) and a real **v6.5.4 → v7.1.0** export diff. Bake this map; **fetch the exhaustive prop-by-prop table** from `migration-property-changes` (docs-map) for anything not covered here. v6 names appear in tables/prose (they no longer exist in v7); v7 code is the target.
4
+
5
+ ## 0. What actually changed
6
+ v7 is a rewrite that keeps **init/login and most component props compatible**, but replaces global singletons with React-native patterns. Five real breaks: (1) deps (incl. Calls SDK v4→v5 and the dropped `./css-variables.css` export), (2) RxJS events → a hook, (3) `DataSource`/`ChatConfigurator` → plugins, (4) `CometChatMessageTemplate`/`templates` props → plugins (**`textFormatters` is NOT removed** — it just relocated off `CometChatMessageList` to the composer/bubbles), (5) a handful of symbol renames (incl. `CometChatUIKit.getLoggedinUser()` async → `getLoggedInUser()` sync). Plus: wrap in `CometChatProvider`, `theme` prop, calling on via `uiKit:{callsSDK:{}}` (initFromSettings) / classic `.setCallingEnabled(true)`.
7
+
8
+ ## 1. Dependencies
9
+ ```bash
10
+ npm install @cometchat/chat-uikit-react@7 @cometchat/chat-sdk-javascript@^4.1.13 dompurify@^3.3.1
11
+ npm uninstall rxjs # v7 drops the rxjs dependency
12
+ ```
13
+ | Package | v6 | v7 |
14
+ |---|---|---|
15
+ | `@cometchat/chat-uikit-react` | `^6.x` | `^7.0.0` |
16
+ | `@cometchat/chat-sdk-javascript` | `^4.x` | `^4.1.13` (peer) |
17
+ | `react` | `>=18` | `>=18 <21` |
18
+ | `dompurify` | — | **`^3.3.1` — v7 needs it** (the kit imports it at runtime). It's in the kit's `dependencies`, but **install it explicitly** (the official docs do) — transitive-only resolution breaks in strict/pnpm/bundler setups. |
19
+ | `@cometchat/calls-sdk-javascript` (if calling) | `^4.x` | **`^5.x`** — bump the major (`npm install @cometchat/calls-sdk-javascript@5`); v7 pins `^5.x` (verified). NOT the same major as v6-era, so it is NOT "unchanged". |
20
+ | `rxjs` | required | **removed** |
21
+ | **CSS import** | `import "@cometchat/chat-uikit-react/css-variables.css"` | **that export is GONE in v7** — use `import "@cometchat/chat-uikit-react/styles"` (the only CSS export; package `exports` = `.` + `./styles`). A leftover `css-variables.css` import fails to resolve. See `cometchat-react-v7-core/references/theming.md`. |
22
+
23
+ ## 2. Symbol removals / renames (v6 → v7) — verified vs a real v6.5.4 → v7.1.0 EXPORT diff
24
+ > **Init class is `CometChatUIKit` in BOTH v6 and v7 — no casing change.** `CometChatMessageComposer` and `CometChatMessageList` etc. keep the same names. Below are the ACTUAL removed/renamed public exports.
25
+
26
+ | v6 symbol | v7 | Action |
27
+ |---|---|---|
28
+ | `CometChatDocumentBubble` | — (removed) | **REMOVED.** Not a rename: v6 shipped `CometChatDocumentBubble` AND `CometChatFileBubble` side by side; v7 keeps `CometChatFileBubble` (unchanged) and drops `CometChatDocumentBubble`. |
29
+ | `CometChatCompactMessageComposer` | `CometChatMessageComposer layout="compact"` | removed as a component (→ the composer's `layout` prop) |
30
+ | `CometChatMessageTemplate` | plugin `renderBubble()` (see §4) | removed |
31
+ | `CometChatMessageEvents`, `CometChatGroupEvents`, `CometChatCallEvents`, `CometChatUserEvents`, `CometChatConversationEvents`, `CometChatUIEvents` | `useCometChatEvents` / `usePublishEvent` (see §3) | removed (RxJS) |
32
+ | `CometChatUIKitLoginListener` | removed (init/login is imperative; gate on `getLoggedInUser()`) | removed |
33
+ | `CometChatUIKit.getLoggedinUser()` (async, lowercase "in") | `CometChatUIKit.getLoggedInUser()` (**capital "In", SYNCHRONOUS**, returns `CometChat.User \| null`) | **RENAMED + return-type change.** v6's `getLoggedinUser()` returned a `Promise`; v7's `getLoggedInUser()` is sync — drop the `await`/`.then()` and read the return value directly. (The Chat SDK still has the async `CometChat.getLoggedinUser()`; the UIKit wrapper is the one that changed.) |
34
+ | `CometChatEmojiKeyboard`, `CometChatMediaRecorder` | built into `CometChatMessageComposer` | removed |
35
+ | `CometChatToast`, `CometChatListItem`, `CometChatNotificationBadge` | internal to their host components | removed |
36
+ | `CometChatUrlsFormatter` | `CometChatUrlFormatter` | rename (plural→singular; `id="url-formatter"`) |
37
+ | `CometChatTextHighlightFormatter` | — (removed) | **REMOVED** (no direct replacement). v7 formatter set: `CometChatTextFormatter` · `CometChatMentionsFormatter` · `CometChatUrlFormatter` · `CometChatMarkdownFormatter` · `CometChatRichTextFormatter`. |
38
+ | monolithic prop bags | composable **slot props** (`*RootProps`/`*HeaderProps`/`*ItemProps`) | additive — flat props still work |
39
+
40
+ > The message list's DEFAULT bubble routing moved to the multi-attachment bubbles: `CometChatImageBubble`→`CometChatImagesBubble`, `CometChatVideoBubble`→`CometChatVideosBubble`, `CometChatFileBubble`→`CometChatFilesBubble`, `CometChatAudioBubble`→`CometChatAudiosBubble`/`CometChatVoiceNoteBubble`. The singular bubbles still ship for standalone use — only the list's routing changed.
41
+
42
+ ## 3. RxJS events → the unified event hook
43
+ v6 exposed per-domain RxJS Subjects; v7 merges SDK + UI events into one bus.
44
+ ```diff
45
+ - import { CometChatMessageEvents } from "@cometchat/chat-uikit-react";
46
+ - CometChatMessageEvents.ccMessageSent.subscribe((data) => { /* … */ });
47
+ ```
48
+ ```tsx
49
+ import { useCometChatEvents } from "@cometchat/chat-uikit-react";
50
+ useCometChatEvents((event) => {
51
+ if (event.type === "ui:message/sent") { /* … */ }
52
+ }, []); // 2nd arg (React.DependencyList) is REQUIRED
53
+ // publish: const publish = usePublishEvent(); publish({ /* … */ });
54
+ ```
55
+
56
+ ## 4. DataSource / ChatConfigurator → plugins
57
+ ```diff
58
+ - class MyDecorator extends DataSourceDecorator { getTextMessageBubble() { /* … */ } }
59
+ - ChatConfigurator.enable(new MyDecorator());
60
+ ```
61
+ ```tsx
62
+ const MyPlugin: CometChatMessagePlugin = {
63
+ id: "my-plugin",
64
+ messageTypes: ["custom-type"],
65
+ messageCategories: ["custom"],
66
+ renderBubble(message, context) { return <MyBubble message={message} />; },
67
+ getOptions(message, context) { return []; },
68
+ getLastMessagePreview(message, loggedInUser, t) { return "Preview text"; }, // optional; (message, loggedInUser, t?)
69
+ };
70
+ <CometChatProvider plugins={[MyPlugin]}><div>{/* your chat UI */}</div></CometChatProvider> // `children` is REQUIRED
71
+ ```
72
+ The `templates` prop is removed → move custom message rendering to a plugin. **`textFormatters` is NOT removed** (verified vs 7.1.0): it's still a prop on `CometChatMessageComposer`, the bubble components, `CometChatSearch` and `CometChatMessageInformation` — but NOT on `CometChatMessageList`/`CometChatConversations`. The list's text bubbles are rendered by the text plugin, which reads its own `getTextFormatters()` (default: markdown + mentions + URL), so a v6 list-level formatter moves to an override of that one method:
73
+ ```tsx
74
+ import { CometChatProvider, CometChatTextPlugin, CometChatMarkdownFormatter, CometChatMentionsFormatter, CometChatUrlFormatter } from "@cometchat/chat-uikit-react";
75
+ // HashtagFormatter = the app's own CometChatTextFormatter subclass (the migrated v6 formatter)
76
+ const textPlugin = { ...CometChatTextPlugin, getTextFormatters: () => [new CometChatMarkdownFormatter(), new CometChatMentionsFormatter(), new CometChatUrlFormatter(), new HashtagFormatter()] };
77
+ <CometChatProvider plugins={[textPlugin]}><div>{/* your chat UI */}</div></CometChatProvider>; // provider plugins precede defaultPlugins → this wins
78
+ ```
79
+ Full plugin API: fetch `plugins/overview` (docs-map).
80
+
81
+ ## 5. Component prop changes (the common ones — exhaustive table = fetch `migration-property-changes`)
82
+ | Pattern | v6 | v7 |
83
+ |---|---|---|
84
+ | View prop type | `JSX.Element` | `ReactNode` (compatible) |
85
+ | Date format type | `CalendarObject` | `CometChatDateFormatConfig` (same shape) |
86
+ | Error UI | `hideError` prop (removed from lists; **retained on `CometChatMessageComposer`**) | `errorView` prop (pass custom error UI) |
87
+ | Loading UI | `disableLoadingState` prop | `loadingView` prop (pass custom loading UI) |
88
+ | Message templates | `templates` prop | plugins (§4) |
89
+ | Text formatters on LIST components | `textFormatters` prop (message list / conversations) | no list prop — override the text plugin's `getTextFormatters()` (§4); the `textFormatters` PROP remains on the composer, bubbles, `CometChatSearch`, `CometChatMessageInformation` |
90
+ | Bubbles | presentational (`src`/`text`/`isSentByMe` required) | self-extracting — pass `message`; overrides optional |
91
+
92
+ ## 6. Provider, theming, calling (minor)
93
+ - **Provider (required):** wrap the chat tree in `CometChatProvider` (init/login stay imperative + unchanged from v6).
94
+ - **Theming:** same CSS variables; `data-theme="dark"` attribute → `theme="dark"` prop on `CometChatProvider` (or the `useTheme()` hook).
95
+ - **Calling:** enable in the init settings — `uiKit: { callsSDK: {} }` passed to `CometChatUIKit.initFromSettings` (the classic `new UIKitSettingsBuilder()…setCallingEnabled(true).build()` + `init()` still works but skips the ai-agent telemetry path). Not a provider prop. Without it, call UI hides + the Calls SDK doesn't load.
96
+ - **Localization:** v7 localizes via `CometChatProvider` (auto `LocaleProvider`); switch language with its `locale` prop (`<CometChatProvider locale="fr">`). `init` / `setCurrentLanguage` / `addTranslation` are **INSTANCE** methods on `CometChatLocalize`, NOT statics — reach the live instance with `CometChatLocalize.getSharedInstance()` (e.g. `CometChatLocalize.getSharedInstance()?.addTranslation({ "en-us": { … } })`, **nested per-language** `Record<lang, Record<key,string>>`; other config via `getSharedInstance()?.init({ translationsForLanguage, timezone, calendarObject, … })`). **Don't `new CometChatLocalize(...)`** — the provider reads only the shared instance (registered by `CometChatUIKit.init*` / the provider), so a constructed one isn't wired to the UI; and the `locale` prop (default `"en-us"`) is applied on mount/change, overriding an earlier `init({ language })`. Read strings via the `useLocale()` hook. **Some KEYS changed v6→v7** — a stale v6 key falls through to the raw string (`getLocalizedString` returns the key on a miss), so a snake_case token like `group_info` in the UI = a missing key. Re-verify any custom translation keys against v7; never render a key literally.
97
+
98
+ ## 7. Localization migration (the `sample_` raw-key trap) — EDIT the app
99
+ **Symptom:** the UI renders raw keys like `group_info`, `add_members`, `delete_chat`, `view_members`, `banned_members` (snake_case) instead of "Group Info" etc. **Cause:** v7 **namespaced the sample-app strings under a `sample_` prefix**, so the v6 unprefixed keys now MISS and `getLocalizedString` returns the raw key.
100
+
101
+ **Fix the client's app (this skill edits it):**
102
+ 1. Find every localization key the app uses — `getLocalizedString("<key>")`, custom panel/button/tab labels, any hardcoded `sample_*`/unprefixed key.
103
+ 2. **Look up the EXACT v7 key — never guess.** The kit ships them in its source: `@cometchat/chat-uikit-react` → `src/resources/CometChatLocalize/resources/<lang>/translation.json` (en-us default), also the public GitHub repo + the localization docs `.md`. The sample-app strings are prefixed **`sample_`** — ~77 of them (`sample_group_info` = "Group Info", `sample_add_members`, `sample_delete_chat`, `sample_view_members`, `sample_banned_members`, `sample_delete_and_exit`, `sample_delete_chat_confirm`, `sample_delete_exit_confirm`, `sample_add_1_member`/`sample_add_n_members`, `sample_create_group`, `sample_block_contact`, …).
104
+ 3. **Two strategies (prefer A — keeps it bundled):**
105
+ - **A — map to the bundled `sample_` key:** `getLocalizedString("group_info")` → `getLocalizedString("sample_group_info")`. Resolves from the kit's built-in translations; no registration.
106
+ - **B — keep the app's key + register the value** (only if the key isn't in the kit): `addTranslation` is an INSTANCE method — `CometChatLocalize.getSharedInstance()?.addTranslation({ "en-us": { group_info: "Group Info", add_members: "Add Members" /* … */ } })` (nested per-language), once at startup after the provider mounts.
107
+ 4. **Migrate the init to the v7 method:** `CometChatProvider` auto-localizes (default en-us); switch language with its `locale` prop (`<CometChatProvider locale="fr">`). `init` / `setCurrentLanguage` are INSTANCE methods (`CometChatLocalize.getSharedInstance()?.setCurrentLanguage(lang)`), NOT statics. Drop any obsolete v6 localization init.
108
+ 5. **Verify:** build/typecheck passes and no snake_case token renders as a label when you open the app.
109
+
110
+ ## Removed concepts → replacement
111
+ | v6 | v7 |
112
+ |---|---|
113
+ | `DataSource` / `DataSourceDecorator` | `CometChatMessagePlugin` |
114
+ | `ChatConfigurator.enable()` | `plugins` prop on `CometChatProvider` |
115
+ | `*Events` (RxJS) | `useCometChatEvents` / `usePublishEvent` |
116
+ | `CometChatMessageTemplate` | plugin `renderBubble()` |
117
+ | `*Configuration` objects | direct props on compound sub-components |
118
+
119
+ > For anything not listed, fetch the prop-by-prop reference: `migration-property-changes` and `migration-overview` (via `cometchat-react-v7-core/references/docs-map.md`). Do NOT guess a v6→v7 mapping — verify against the docs.