@cometchat/skills 3.0.0 → 4.0.0

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 (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -17
  3. package/bin/install.js +389 -43
  4. package/package.json +19 -9
  5. package/skills/cometchat/SKILL.md +1066 -265
  6. package/skills/cometchat-android-v5/SKILL.md +120 -0
  7. package/skills/cometchat-android-v5-components/SKILL.md +430 -0
  8. package/skills/cometchat-android-v5-core/SKILL.md +468 -0
  9. package/skills/cometchat-android-v5-customization/SKILL.md +305 -0
  10. package/skills/cometchat-android-v5-extensions/SKILL.md +124 -0
  11. package/skills/cometchat-android-v5-features/SKILL.md +130 -0
  12. package/skills/cometchat-android-v5-placement/SKILL.md +276 -0
  13. package/skills/cometchat-android-v5-production/SKILL.md +94 -0
  14. package/skills/cometchat-android-v5-push/SKILL.md +620 -0
  15. package/skills/cometchat-android-v5-testing/SKILL.md +187 -0
  16. package/skills/cometchat-android-v5-theming/SKILL.md +166 -0
  17. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +73 -0
  18. package/skills/cometchat-android-v6/SKILL.md +107 -0
  19. package/skills/cometchat-android-v6-builder-settings/SKILL.md +145 -0
  20. package/skills/cometchat-android-v6-compose-components/SKILL.md +202 -0
  21. package/skills/cometchat-android-v6-compose-customization/SKILL.md +280 -0
  22. package/skills/cometchat-android-v6-compose-placement/SKILL.md +213 -0
  23. package/skills/cometchat-android-v6-compose-theming/SKILL.md +224 -0
  24. package/skills/cometchat-android-v6-core/SKILL.md +354 -0
  25. package/skills/cometchat-android-v6-events/SKILL.md +212 -0
  26. package/skills/cometchat-android-v6-extensions/SKILL.md +191 -0
  27. package/skills/cometchat-android-v6-features/SKILL.md +130 -0
  28. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +197 -0
  29. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +268 -0
  30. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +248 -0
  31. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +202 -0
  32. package/skills/cometchat-android-v6-production/SKILL.md +187 -0
  33. package/skills/cometchat-android-v6-push/SKILL.md +274 -0
  34. package/skills/cometchat-android-v6-testing/SKILL.md +279 -0
  35. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +249 -0
  36. package/skills/cometchat-angular-components/SKILL.md +706 -0
  37. package/skills/cometchat-angular-core/SKILL.md +444 -0
  38. package/skills/cometchat-angular-customization/SKILL.md +424 -0
  39. package/skills/cometchat-angular-features/SKILL.md +447 -0
  40. package/skills/cometchat-angular-patterns/SKILL.md +447 -0
  41. package/skills/cometchat-angular-placement/SKILL.md +685 -0
  42. package/skills/cometchat-angular-production/SKILL.md +415 -0
  43. package/skills/cometchat-angular-theming/SKILL.md +365 -0
  44. package/skills/cometchat-angular-troubleshooting/SKILL.md +329 -0
  45. package/skills/cometchat-astro-patterns/SKILL.md +3 -3
  46. package/skills/cometchat-components/SKILL.md +11 -0
  47. package/skills/cometchat-core/SKILL.md +11 -6
  48. package/skills/cometchat-customization/references/component-catalog.md +1 -1
  49. package/skills/cometchat-features/SKILL.md +176 -108
  50. package/skills/cometchat-flutter-v5/SKILL.md +167 -0
  51. package/skills/cometchat-flutter-v5-calls/SKILL.md +192 -0
  52. package/skills/cometchat-flutter-v5-conversations/SKILL.md +117 -0
  53. package/skills/cometchat-flutter-v5-core/SKILL.md +221 -0
  54. package/skills/cometchat-flutter-v5-customization/SKILL.md +227 -0
  55. package/skills/cometchat-flutter-v5-events/SKILL.md +155 -0
  56. package/skills/cometchat-flutter-v5-messages/SKILL.md +258 -0
  57. package/skills/cometchat-flutter-v5-production/SKILL.md +207 -0
  58. package/skills/cometchat-flutter-v5-push/SKILL.md +284 -0
  59. package/skills/cometchat-flutter-v5-theming/SKILL.md +160 -0
  60. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +129 -0
  61. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +151 -0
  62. package/skills/cometchat-flutter-v6/SKILL.md +445 -0
  63. package/skills/cometchat-flutter-v6-calls/SKILL.md +333 -0
  64. package/skills/cometchat-flutter-v6-components/SKILL.md +365 -0
  65. package/skills/cometchat-flutter-v6-conversations/SKILL.md +210 -0
  66. package/skills/cometchat-flutter-v6-core/SKILL.md +305 -0
  67. package/skills/cometchat-flutter-v6-customization/SKILL.md +666 -0
  68. package/skills/cometchat-flutter-v6-events/SKILL.md +216 -0
  69. package/skills/cometchat-flutter-v6-features/SKILL.md +406 -0
  70. package/skills/cometchat-flutter-v6-messages/SKILL.md +333 -0
  71. package/skills/cometchat-flutter-v6-migration/SKILL.md +381 -0
  72. package/skills/cometchat-flutter-v6-placement/SKILL.md +398 -0
  73. package/skills/cometchat-flutter-v6-production/SKILL.md +632 -0
  74. package/skills/cometchat-flutter-v6-theming/SKILL.md +260 -0
  75. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +726 -0
  76. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +216 -0
  77. package/skills/cometchat-ios/SKILL.md +323 -0
  78. package/skills/cometchat-ios-components/SKILL.md +651 -0
  79. package/skills/cometchat-ios-core/SKILL.md +822 -0
  80. package/skills/cometchat-ios-customization/SKILL.md +825 -0
  81. package/skills/cometchat-ios-features/SKILL.md +725 -0
  82. package/skills/cometchat-ios-placement/SKILL.md +750 -0
  83. package/skills/cometchat-ios-production/SKILL.md +730 -0
  84. package/skills/cometchat-ios-push/SKILL.md +582 -0
  85. package/skills/cometchat-ios-theming/SKILL.md +631 -0
  86. package/skills/cometchat-ios-troubleshooting/SKILL.md +983 -0
  87. package/skills/cometchat-native-bare-patterns/SKILL.md +470 -0
  88. package/skills/cometchat-native-components/SKILL.md +594 -0
  89. package/skills/cometchat-native-core/SKILL.md +407 -0
  90. package/skills/cometchat-native-customization/SKILL.md +594 -0
  91. package/skills/cometchat-native-expo-patterns/SKILL.md +485 -0
  92. package/skills/cometchat-native-features/SKILL.md +608 -0
  93. package/skills/cometchat-native-placement/SKILL.md +500 -0
  94. package/skills/cometchat-native-production/SKILL.md +694 -0
  95. package/skills/cometchat-native-push/SKILL.md +593 -0
  96. package/skills/cometchat-native-testing/SKILL.md +583 -0
  97. package/skills/cometchat-native-theming/SKILL.md +656 -0
  98. package/skills/cometchat-native-troubleshooting/SKILL.md +433 -0
  99. package/skills/cometchat-nextjs-patterns/SKILL.md +5 -5
  100. package/skills/cometchat-production/SKILL.md +60 -0
  101. package/skills/cometchat-react-router-patterns/SKILL.md +23 -21
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: cometchat-flutter-v5-troubleshooting
3
+ description: "Use when debugging CometChat Flutter UIKit v5 issues. Symptom-to-cause lookup, verify checks, common errors, drift detection."
4
+ license: "MIT"
5
+ compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_calls_uikit ^5.0.15; cometchat_uikit_shared ^5.2.3"
6
+ allowed-tools: "executeBash, readFile, fileSearch, listDirectory"
7
+ metadata:
8
+ author: "CometChat"
9
+ version: "3.0.0"
10
+ tags: "cometchat flutter v5 troubleshooting debug errors fix"
11
+ ---
12
+
13
+ # CometChat Flutter UIKit v5 — Troubleshooting
14
+
15
+ Symptom-to-cause lookup and verification checks.
16
+
17
+ ## Init / Login Issues
18
+
19
+ | Symptom | Cause | Fix |
20
+ |---------|-------|-----|
21
+ | "Authentication null" | `CometChatUIKit.init()` not called | Call init before login/components |
22
+ | "APP ID null" | appId not set in UIKitSettingsBuilder | Set `..appId = 'YOUR_APP_ID'` |
23
+ | Login hangs silently | `init()` hasn't completed yet | Await init completion via `onSuccess` before calling login |
24
+ | "ERR_INVALID_REGION" | Uppercase region | Use lowercase: `'us'`, `'eu'`, `'in'` |
25
+ | Login succeeds but no messages load | `subscriptionType` not set | Set `..subscriptionType = CometChatSubscriptionType.allUsers` |
26
+
27
+ ## UI / Layout Issues
28
+
29
+ | Symptom | Cause | Fix |
30
+ |---------|-------|-----|
31
+ | Theme jank during keyboard animation | `CometChatThemeHelper.getColorPalette(context)` called in `build()` | Cache in `didChangeDependencies()` |
32
+ | Components don't reflect theme changes | Using `_themeInitialized` flag | Remove flag — cache unconditionally in `didChangeDependencies()` |
33
+ | Hardcoded colors don't match dark mode | Using `Color(0xFF...)` instead of theme tokens | Use `colorPalette.primary`, `colorPalette.textPrimary`, etc. |
34
+ | `colorPalette.white` doesn't change in dark mode | `white`/`black`/`transparent` are NOT brightness-aware | Use `colorPalette.neutral50` for brightness-aware white |
35
+
36
+ ## GetX Issues
37
+
38
+ | Symptom | Cause | Fix |
39
+ |---------|-------|-----|
40
+ | "GetX controller not found" | Using `Get.find()` before `Get.put()` | Let UIKit components manage their own controllers |
41
+ | Controller not disposed | Manually created controller without cleanup | Use `controllerTag` or let widget manage lifecycle |
42
+ | Multiple controller instances | Creating controller outside the widget | Let the widget's `initState()` handle `Get.put()` |
43
+ | `Get.delete()` throws | Deleting controller that was created with `controllerTag` | Only delete if `controllerTag` was null (widget-managed) |
44
+
45
+ ## Listener / Event Issues
46
+
47
+ | Symptom | Cause | Fix |
48
+ |---------|-------|-----|
49
+ | Duplicate events firing | Listener not removed in `dispose()` | Always remove with same ID used to register |
50
+ | Listener ID collision | Hardcoded listener ID string | Use timestamp: `'id_${DateTime.now().millisecondsSinceEpoch}'` |
51
+ | No typing indicators | `subscriptionType` not set | Set `CometChatSubscriptionType.allUsers` |
52
+ | No online/offline status | `subscriptionType` not set | Same fix |
53
+ | `ccMessageSent` not firing | Using `CometChat.sendMessage()` directly | Use `CometChatUIKit.sendTextMessage()` instead |
54
+ | Events fire after screen disposed | Listener not removed | Remove in `dispose()` / `onClose()` |
55
+
56
+ ## Call Issues
57
+
58
+ | Symptom | Cause | Fix |
59
+ |---------|-------|-----|
60
+ | Incoming call overlay doesn't show | `CallNavigationContext.navigatorKey` not set | Set on `MaterialApp.navigatorKey` |
61
+ | Call buttons don't appear | `CometChatCallingExtension` not registered | Set `..callingExtension = CometChatCallingExtension()` on UIKitSettingsBuilder |
62
+ | Call fails silently | Camera/microphone permissions not granted | Request `Permission.camera` and `Permission.microphone` |
63
+ | Incoming calls not handled | Call listener not registered globally | Register `CallListener` + `CometChatCallEventListener` at dashboard level |
64
+
65
+ ## Push Notification Issues
66
+
67
+ | Symptom | Cause | Fix |
68
+ |---------|-------|-----|
69
+ | No push notifications | Token not registered | Call `PNRegistry.registerPNService(token, isFcm, isVoip)` |
70
+ | Notifications after logout | Token not unregistered | Call `PNRegistry.unregisterPNService()` before logout |
71
+ | Duplicate notifications | Foreground notification shown for active conversation | Check `conversationId` match before showing |
72
+ | VoIP call notification doesn't show | Background handler not top-level | Use `@pragma('vm:entry-point')` on top-level function |
73
+ | Tap doesn't navigate | `CallNavigationContext.navigatorKey.currentContext` is null | Ensure `navigatorKey` is set on MaterialApp |
74
+ | iOS VoIP token not registered | Missing VoIP background mode | Enable Voice over IP in Xcode Background Modes |
75
+
76
+ ## Android Build Issues
77
+
78
+ | Symptom | Cause | Fix |
79
+ |---------|-------|-----|
80
+ | Release build crash | Missing ProGuard keep rules | Add `-keep class com.cometchat.** { *; }` |
81
+ | Build fails with minSdk error | minSdk too low | Set `minSdk 26` in `android/app/build.gradle` |
82
+ | AndroidX conflict | Missing AndroidX migration | Set `android.useAndroidX=true` in `gradle.properties` |
83
+
84
+ ## iOS Build Issues
85
+
86
+ | Symptom | Cause | Fix |
87
+ |---------|-------|-----|
88
+ | Camera/mic permission crash | Missing Info.plist entries | Add `NSCameraUsageDescription`, `NSMicrophoneUsageDescription` |
89
+ | Pod install fails | Cocoapods version mismatch | Run `pod repo update` then `pod install` |
90
+
91
+ ## Callback Signature Errors
92
+
93
+ | Symptom | Cause | Fix |
94
+ |---------|-------|-----|
95
+ | Type error on `CometChatUsers.onItemTap` | Missing `BuildContext` parameter | Signature is `Function(BuildContext, User)?` |
96
+ | Type error on `CometChatGroups.onItemTap` | Missing `BuildContext` parameter | Signature is `Function(BuildContext, Group)?` |
97
+ | Type error on `CometChatConversations.onItemTap` | Extra `BuildContext` parameter | Signature is `Function(Conversation)?` — no BuildContext |
98
+ | Type error on `CometChatGroupMembers.onItemTap` | Extra `BuildContext` parameter | Signature is `Function(GroupMember)?` — no BuildContext |
99
+
100
+ ## v5 vs v6 Drift Detection
101
+
102
+ If you see any of these in a v5 project, it's a v6 pattern that was accidentally used:
103
+
104
+ | v6 Pattern (wrong in v5) | v5 Equivalent |
105
+ |--------------------------|---------------|
106
+ | `import 'package:flutter_bloc/flutter_bloc.dart'` | GetX — no BLoC in v5 |
107
+ | `extends Bloc<Event, State>` | `extends GetxController` |
108
+ | `extends Equatable` | Not used in v5 |
109
+ | `ServiceLocator.get<T>()` | `Get.find<T>()` or let widget manage |
110
+ | Single `cometchat_chat_uikit` with calls built-in | Separate `cometchat_calls_uikit` package |
111
+ | Per-widget feature flags only — no `BuilderSettings` | `BuilderSettings`, `BuilderColor`, `BuilderTypography` |
112
+ | `enableCalls: true` + `CallingConfiguration()` on UIKitSettingsBuilder | `..callingExtension = CometChatCallingExtension()` |
113
+
114
+ ## Verify Checklist
115
+
116
+ Run through this when something isn't working:
117
+
118
+ - [ ] `CometChatUIKit.init()` completes before any other CometChat call
119
+ - [ ] `subscriptionType` set in UIKitSettingsBuilder
120
+ - [ ] `region` is lowercase
121
+ - [ ] Theme cached in `didChangeDependencies()`, not `build()`
122
+ - [ ] All listeners registered with unique IDs
123
+ - [ ] All listeners removed in `dispose()` / `onClose()`
124
+ - [ ] `CallNavigationContext.navigatorKey` set on MaterialApp
125
+ - [ ] `CometChatCallingExtension()` set if using calls
126
+ - [ ] Push tokens registered after login
127
+ - [ ] Push tokens unregistered before logout
128
+ - [ ] ProGuard rules present for release builds
129
+ - [ ] No v6 imports (`flutter_bloc`, `equatable`, `BlocProvider` / `BlocBuilder`)
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: cometchat-flutter-v5-users-groups
3
+ description: "Use when working with CometChat Flutter UIKit v5 user and group list components. Triggers on CometChatUsers, CometChatGroups, CometChatGroupMembers, CometChatChangeScope."
4
+ license: "MIT"
5
+ compatibility: "cometchat_chat_uikit ^5.2.14; cometchat_uikit_shared ^5.2.3"
6
+ allowed-tools: "executeBash, readFile, fileSearch, listDirectory"
7
+ metadata:
8
+ author: "CometChat"
9
+ version: "3.0.0"
10
+ tags: "cometchat flutter v5 users groups members scope contacts"
11
+ ---
12
+
13
+ # CometChat Flutter UIKit v5 — Users & Groups
14
+
15
+ Components for displaying and managing users, groups, and group members.
16
+
17
+ ## CometChatUsers
18
+
19
+ Displays a list of users, sorted alphabetically.
20
+
21
+ ### Key Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ |------|------|---------|-------------|
25
+ | `usersRequestBuilder` | `UsersRequestBuilder?` | — | Custom fetch builder |
26
+ | `usersStyle` | `CometChatUsersStyle` | `const CometChatUsersStyle()` | Visual styling |
27
+ | `onItemTap` | `Function(BuildContext, User)?` | — | Tap callback (**includes BuildContext**) |
28
+ | `onItemLongPress` | `Function(BuildContext, User)?` | — | Long press callback |
29
+ | `subtitleView` | `Widget? Function(BuildContext, User)?` | — | Custom subtitle |
30
+ | `title` | `String?` | — | List title |
31
+ | `showBackButton` | `bool` | `true` | Show back button |
32
+ | `hideSearch` | `bool` | `false` | Hide search bar |
33
+ | `selectionMode` | `SelectionMode?` | — | Enable selection mode |
34
+ | `onSelection` | `Function(List<User>?, BuildContext)?` | — | Selection callback |
35
+ | `usersStatusVisibility` | `bool?` | `true` | Show online status |
36
+ | `hideAppbar` | `bool?` | `false` | Hide app bar |
37
+ | `appBarOptions` | `List<Widget> Function(BuildContext)?` | — | App bar trailing widgets |
38
+ | `controllerTag` | `String?` | — | Custom GetX controller tag |
39
+ | `stickyHeaderVisibility` | `bool?` | `false` | Show alphabetical headers |
40
+
41
+ ### Usage
42
+
43
+ ```dart
44
+ CometChatUsers(
45
+ onItemTap: (context, user) {
46
+ Navigator.push(context, MaterialPageRoute(
47
+ builder: (_) => MessagesScreen(user: user),
48
+ ));
49
+ },
50
+ )
51
+
52
+ // With custom request builder
53
+ CometChatUsers(
54
+ usersRequestBuilder: UsersRequestBuilder()
55
+ ..limit = 30
56
+ ..friendsOnly = true,
57
+ )
58
+
59
+ // Filter by role (e.g., AI agents)
60
+ CometChatUsers(
61
+ title: "Agents",
62
+ usersRequestBuilder: UsersRequestBuilder()
63
+ ..roles = [AIConstants.aiRole],
64
+ onItemTap: (context, user) { ... },
65
+ )
66
+ ```
67
+
68
+ ## CometChatGroups
69
+
70
+ Displays a list of groups with type indicators.
71
+
72
+ ### Key Props
73
+
74
+ | Prop | Type | Default | Description |
75
+ |------|------|---------|-------------|
76
+ | `groupsRequestBuilder` | `GroupsRequestBuilder?` | — | Custom fetch builder |
77
+ | `groupsStyle` | `CometChatGroupsStyle?` | — | Visual styling |
78
+ | `onItemTap` | `Function(BuildContext, Group)?` | — | Tap callback (**includes BuildContext**) |
79
+ | `onItemLongPress` | `Function(BuildContext, Group)?` | — | Long press callback |
80
+ | `subtitleView` | `Widget? Function(BuildContext, Group)?` | — | Custom subtitle |
81
+ | `title` | `String?` | — | List title |
82
+ | `showBackButton` | `bool` | `true` | Show back button |
83
+ | `hideSearch` | `bool` | `false` | Hide search bar |
84
+ | `selectionMode` | `SelectionMode?` | — | Enable selection mode |
85
+ | `groupTypeVisibility` | `bool` | `true` | Show group type icon |
86
+ | `hideAppbar` | `bool?` | `false` | Hide app bar |
87
+ | `appBarOptions` | `List<Widget> Function(BuildContext)?` | — | App bar trailing widgets |
88
+ | `controllerTag` | `String?` | — | Custom GetX controller tag |
89
+
90
+ ### Usage
91
+
92
+ ```dart
93
+ CometChatGroups(
94
+ onItemTap: (context, group) {
95
+ Navigator.push(context, MaterialPageRoute(
96
+ builder: (_) => MessagesScreen(group: group),
97
+ ));
98
+ },
99
+ )
100
+ ```
101
+
102
+ ## CometChatGroupMembers
103
+
104
+ Displays members of a specific group with role indicators.
105
+
106
+ ```dart
107
+ CometChatGroupMembers(
108
+ group: group,
109
+ onItemTap: (member) {
110
+ debugPrint('Tapped: ${member.name}, role: ${member.scope}');
111
+ },
112
+ )
113
+ ```
114
+
115
+ Key props: `group` (required), `groupMembersRequestBuilder`, `groupMembersStyle`, `subtitleView`, `trailingView`, `onItemTap` (`Function(GroupMember)?` — **no BuildContext**), `selectionMode`, `onSelection`.
116
+
117
+ ## CometChatChangeScope
118
+
119
+ Widget for changing a group member's scope/role.
120
+
121
+ ```dart
122
+ CometChatChangeScope(group: group, member: member)
123
+ ```
124
+
125
+ ## Callback Signature Differences
126
+
127
+ | Component | `onItemTap` signature |
128
+ |-----------|----------------------|
129
+ | `CometChatConversations` | `Function(Conversation)?` — **no BuildContext** |
130
+ | `CometChatUsers` | `Function(BuildContext, User)?` — **has BuildContext** |
131
+ | `CometChatGroups` | `Function(BuildContext, Group)?` — **has BuildContext** |
132
+ | `CometChatGroupMembers` | `Function(GroupMember)?` — **no BuildContext** |
133
+
134
+ This is a common source of confusion.
135
+
136
+ ## Anti-Patterns
137
+
138
+ ```dart
139
+ // ❌ WRONG — missing BuildContext in Users/Groups onItemTap
140
+ CometChatUsers(onItemTap: (user) { ... }) // Missing BuildContext!
141
+
142
+ // ✅ CORRECT
143
+ CometChatUsers(onItemTap: (context, user) { ... })
144
+ CometChatGroups(onItemTap: (context, group) { ... })
145
+ ```
146
+
147
+ ## Checklist — Users & Groups
148
+
149
+ - [ ] `onItemTap` callback signature includes `BuildContext` for Users/Groups
150
+ - [ ] Custom request builders set appropriate limits
151
+ - [ ] Let widgets manage their own GetX controller lifecycle