@cometchat/skills 4.4.2 → 5.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.
- package/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +14 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +41 -163
- package/RULES.md +114 -0
- package/bin/cometchat-skills.mjs +1180 -0
- package/bin/legacy-skills.json +95 -0
- package/catalogs/android-v6.json +1646 -0
- package/catalogs/flutter-v6.json +651 -0
- package/catalogs/ios-v5.json +1383 -0
- package/catalogs/rn-calls-v5.json +134 -0
- package/catalogs/rn-calls-v5.symbols.txt +58 -0
- package/catalogs/rn-sdk-v4.json +672 -0
- package/catalogs/rn-v5.json +449 -0
- package/catalogs/rn-v5.symbols.txt +216 -0
- package/catalogs/sdk-android-v5.json +514 -0
- package/contracts.android-calls-v5.json +122 -0
- package/contracts.android-v6.json +135 -0
- package/contracts.angular-v5.json +694 -0
- package/contracts.flutter-calls-v5.json +77 -0
- package/contracts.flutter-v6.json +126 -0
- package/contracts.ios-calls-v5.json +67 -0
- package/contracts.ios-v5.json +436 -0
- package/contracts.json +82 -0
- package/contracts.rn-calls-v5.json +77 -0
- package/contracts.rn-v5.json +727 -0
- package/contracts.sdk-android-v5.json +15 -0
- package/contracts.web-calls-v5.json +45 -0
- package/features.android-calls-v5.json +246 -0
- package/features.android-v6.json +65 -0
- package/features.angular-v5.json +521 -0
- package/features.flutter-calls-v5.json +286 -0
- package/features.flutter-v6.json +484 -0
- package/features.ios-calls-v5.json +236 -0
- package/features.ios-v5.json +573 -0
- package/features.json +61 -0
- package/features.rn-calls-v5.json +187 -0
- package/features.rn-v5.json +614 -0
- package/features.sdk-android-v5.json +40 -0
- package/features.sdk-jsv4.json +24 -0
- package/features.web-calls-v5.json +108 -0
- package/package.json +151 -74
- package/peers.yaml +312 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +54 -0
- package/registry/android-v6.json +137 -0
- package/registry/angular-v5.json +114 -0
- package/registry/flutter-calls-v5.json +54 -0
- package/registry/flutter-v6.json +119 -0
- package/registry/ios-calls-v5.json +59 -0
- package/registry/ios-v5.json +97 -0
- package/registry/rn-calls-v5.json +59 -0
- package/registry/rn-v5.json +129 -0
- package/registry/sdk-android-v5.json +53 -0
- package/registry/sdk-jsv4.json +53 -0
- package/registry/web-calls-v5.json +54 -0
- package/registry/web-v7.json +99 -0
- package/skills/cometchat/SKILL.md +42 -2096
- package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
- package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
- package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
- package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
- package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
- package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
- package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
- package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
- package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
- package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
- package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
- package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
- package/skills/cometchat-android-v6-core/SKILL.md +236 -672
- package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
- package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
- package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
- package/skills/cometchat-android-v6-core/references/layout.md +112 -0
- package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
- package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
- package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
- package/skills/cometchat-android-v6-events/SKILL.md +46 -184
- package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
- package/skills/cometchat-android-v6-features/SKILL.md +74 -143
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
- package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
- package/skills/cometchat-android-v6-production/SKILL.md +40 -179
- package/skills/cometchat-android-v6-push/SKILL.md +39 -289
- package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
- package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
- package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
- package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
- package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
- package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
- package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
- package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
- package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
- package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
- package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
- package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
- package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
- package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
- package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
- package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
- package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
- package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
- package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
- package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
- package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
- package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
- package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
- package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
- package/skills/cometchat-angular-v5-production/SKILL.md +101 -0
- package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
- package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
- package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
- package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
- package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
- package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
- package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
- package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
- package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
- package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
- package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
- package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
- package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
- package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
- package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
- package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
- package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
- package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
- package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
- package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
- package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
- package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +131 -0
- package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
- package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
- package/skills/cometchat-flutter-v6-production/SKILL.md +58 -615
- package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
- package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
- package/skills/cometchat-ios-calls/SKILL.md +112 -563
- package/skills/cometchat-ios-components/SKILL.md +44 -834
- package/skills/cometchat-ios-core/SKILL.md +181 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
- package/skills/cometchat-ios-core/references/docs-map.md +123 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +186 -0
- package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
- package/skills/cometchat-ios-core/references/swiftui.md +91 -0
- package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
- package/skills/cometchat-ios-customization/SKILL.md +33 -968
- package/skills/cometchat-ios-features/SKILL.md +29 -738
- package/skills/cometchat-ios-migration/SKILL.md +39 -0
- package/skills/cometchat-ios-placement/SKILL.md +51 -729
- package/skills/cometchat-ios-push/SKILL.md +24 -602
- package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
- package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
- package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
- package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
- package/skills/cometchat-onboarding/SKILL.md +89 -0
- package/skills/cometchat-onboarding/references/archetypes.md +51 -0
- package/skills/cometchat-onboarding/references/calling-first.md +77 -0
- package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
- package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
- package/skills/cometchat-onboarding/references/platforms.md +90 -0
- package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
- package/skills/cometchat-react-native-calls/SKILL.md +200 -0
- package/skills/cometchat-react-native-components/SKILL.md +142 -0
- package/skills/cometchat-react-native-core/SKILL.md +313 -0
- package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
- package/skills/cometchat-react-native-core/references/component-props.md +105 -0
- package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
- package/skills/cometchat-react-native-core/references/docs-map.md +126 -0
- package/skills/cometchat-react-native-core/references/layout.md +61 -0
- package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
- package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
- package/skills/cometchat-react-native-customization/SKILL.md +198 -0
- package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
- package/skills/cometchat-react-native-features/SKILL.md +122 -0
- package/skills/cometchat-react-native-migration/SKILL.md +103 -0
- package/skills/cometchat-react-native-placement/SKILL.md +158 -0
- package/skills/cometchat-react-native-production/SKILL.md +78 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +126 -0
- package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
- package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
- package/skills/cometchat-react-native-testing/SKILL.md +94 -0
- package/skills/cometchat-react-native-troubleshooting/SKILL.md +116 -0
- package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
- package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
- package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
- package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
- package/skills/cometchat-react-v7-components/SKILL.md +72 -0
- package/skills/cometchat-react-v7-core/SKILL.md +101 -0
- package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
- package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
- package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
- package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
- package/skills/cometchat-react-v7-core/references/i18n-rtl-a11y.md +22 -0
- package/skills/cometchat-react-v7-core/references/layout.md +158 -0
- package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
- package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
- package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
- package/skills/cometchat-react-v7-core/references/theming.md +52 -0
- package/skills/cometchat-react-v7-core/references/troubleshooting.md +28 -0
- package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
- package/skills/cometchat-react-v7-features/SKILL.md +92 -0
- package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
- package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
- package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
- package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
- package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
- package/skills/cometchat-react-v7-push/SKILL.md +53 -0
- package/test-suite/README.md +70 -0
- package/test-suite/catalogs/android-calls-v5.json +830 -0
- package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
- package/test-suite/catalogs/android-v6.json +1646 -0
- package/test-suite/catalogs/android-v6.symbols.txt +298 -0
- package/test-suite/catalogs/angular-v5.json +7587 -0
- package/test-suite/catalogs/flutter-calls-v5.json +196 -0
- package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
- package/test-suite/catalogs/flutter-v6.json +651 -0
- package/test-suite/catalogs/ios-calls-v5.json +158 -0
- package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
- package/test-suite/catalogs/ios-v5.json +1383 -0
- package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
- package/test-suite/catalogs/rn-calls-v5.json +134 -0
- package/test-suite/catalogs/rn-sdk-v4.json +672 -0
- package/test-suite/catalogs/rn-v5.json +449 -0
- package/test-suite/catalogs/sdk-android-v5.json +514 -0
- package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
- package/test-suite/catalogs/sdk-jsv4.json +800 -0
- package/test-suite/catalogs/web-calls-v5.json +195 -0
- package/test-suite/catalogs/web-v7.json +1243 -0
- package/test-suite/scripts/build-registry.mjs +113 -0
- package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
- package/test-suite/scripts/catalog-refresh.mjs +100 -0
- package/test-suite/scripts/lint-skills.mjs +909 -0
- package/test-suite/scripts/measure-tokens.mjs +169 -0
- package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
- package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
- package/test-suite/scripts/typecheck-fences.mjs +206 -0
- package/test-suite/scripts/verify-catalog.mjs +242 -0
- package/test-suite/scripts/verify-contract-fences.mjs +94 -0
- package/test-suite/scripts/verify-detection.mjs +178 -0
- package/test-suite/scripts/verify-docs-base.mjs +91 -0
- package/test-suite/scripts/verify-family-agnostic.mjs +130 -0
- package/test-suite/scripts/verify-golden-path.mjs +138 -0
- package/test-suite/scripts/verify-oracle-components.mjs +133 -0
- package/test-suite/scripts/verify-template-bindings.mjs +148 -0
- package/test-suite/typecheck/angular-v5/package.json +21 -0
- package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
- package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
- package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
- package/test-suite/typecheck/web-v7/package.json +18 -0
- package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
- package/bin/install.js +0 -1003
- package/skills/.claude-plugin/marketplace.json +0 -86
- package/skills/cometchat/references/asking-questions.md +0 -48
- package/skills/cometchat-a11y/SKILL.md +0 -477
- package/skills/cometchat-android-v5/SKILL.md +0 -121
- package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
- package/skills/cometchat-android-v5-calls/references/README.md +0 -53
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
- package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
- package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
- package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
- package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
- package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
- package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
- package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
- package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
- package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
- package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
- package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
- package/skills/cometchat-android-v5-components/SKILL.md +0 -431
- package/skills/cometchat-android-v5-core/SKILL.md +0 -486
- package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
- package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
- package/skills/cometchat-android-v5-features/SKILL.md +0 -131
- package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
- package/skills/cometchat-android-v5-production/SKILL.md +0 -95
- package/skills/cometchat-android-v5-push/SKILL.md +0 -619
- package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
- package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
- package/skills/cometchat-android-v6/SKILL.md +0 -108
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
- package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
- package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
- package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
- package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
- package/skills/cometchat-angular-calls/SKILL.md +0 -380
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
- package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
- package/skills/cometchat-angular-calls/references/call-session.md +0 -167
- package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
- package/skills/cometchat-angular-calls/references/device-management.md +0 -154
- package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
- package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
- package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
- package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
- package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
- package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
- package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
- package/skills/cometchat-angular-components/SKILL.md +0 -235
- package/skills/cometchat-angular-core/SKILL.md +0 -386
- package/skills/cometchat-angular-customization/SKILL.md +0 -616
- package/skills/cometchat-angular-features/SKILL.md +0 -329
- package/skills/cometchat-angular-patterns/SKILL.md +0 -256
- package/skills/cometchat-angular-placement/SKILL.md +0 -314
- package/skills/cometchat-angular-production/SKILL.md +0 -564
- package/skills/cometchat-angular-push/SKILL.md +0 -389
- package/skills/cometchat-angular-testing/SKILL.md +0 -605
- package/skills/cometchat-angular-theming/SKILL.md +0 -290
- package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
- package/skills/cometchat-astro-patterns/SKILL.md +0 -708
- package/skills/cometchat-calls/SKILL.md +0 -364
- package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
- package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
- package/skills/cometchat-calls/references/use-case-support.md +0 -189
- package/skills/cometchat-calls/references/use-case-team.md +0 -180
- package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
- package/skills/cometchat-components/SKILL.md +0 -1142
- package/skills/cometchat-core/SKILL.md +0 -1048
- package/skills/cometchat-customization/SKILL.md +0 -580
- package/skills/cometchat-customization/references/component-catalog.md +0 -236
- package/skills/cometchat-features/SKILL.md +0 -861
- package/skills/cometchat-flutter-v5/SKILL.md +0 -173
- package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
- package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
- package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
- package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
- package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
- package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
- package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
- package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
- package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
- package/skills/cometchat-flutter-v6/SKILL.md +0 -446
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
- package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
- package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
- package/skills/cometchat-i18n/SKILL.md +0 -419
- package/skills/cometchat-ios/SKILL.md +0 -325
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
- package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
- package/skills/cometchat-ios-calls/references/call-session.md +0 -218
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
- package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
- package/skills/cometchat-ios-calls/references/device-management.md +0 -171
- package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
- package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
- package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
- package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
- package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
- package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
- package/skills/cometchat-ios-production/SKILL.md +0 -738
- package/skills/cometchat-ios-testing/SKILL.md +0 -376
- package/skills/cometchat-ios-theming/SKILL.md +0 -667
- package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
- package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
- package/skills/cometchat-native-calls/SKILL.md +0 -671
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
- package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
- package/skills/cometchat-native-calls/references/call-session.md +0 -182
- package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
- package/skills/cometchat-native-calls/references/device-management.md +0 -158
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
- package/skills/cometchat-native-calls/references/group-calls.md +0 -296
- package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
- package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
- package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
- package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
- package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
- package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
- package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
- package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
- package/skills/cometchat-native-calls/references/share-invite.md +0 -146
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
- package/skills/cometchat-native-components/SKILL.md +0 -628
- package/skills/cometchat-native-core/SKILL.md +0 -679
- package/skills/cometchat-native-customization/SKILL.md +0 -716
- package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
- package/skills/cometchat-native-features/SKILL.md +0 -638
- package/skills/cometchat-native-placement/SKILL.md +0 -509
- package/skills/cometchat-native-production/SKILL.md +0 -700
- package/skills/cometchat-native-push/SKILL.md +0 -594
- package/skills/cometchat-native-testing/SKILL.md +0 -582
- package/skills/cometchat-native-theming/SKILL.md +0 -681
- package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
- package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
- package/skills/cometchat-placement/SKILL.md +0 -1360
- package/skills/cometchat-production/SKILL.md +0 -1027
- package/skills/cometchat-react-calls/SKILL.md +0 -752
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
- package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
- package/skills/cometchat-react-calls/references/call-session.md +0 -235
- package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
- package/skills/cometchat-react-calls/references/device-management.md +0 -210
- package/skills/cometchat-react-calls/references/group-calls.md +0 -257
- package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
- package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
- package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
- package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
- package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
- package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
- package/skills/cometchat-react-calls/references/share-invite.md +0 -175
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
- package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
- package/skills/cometchat-react-patterns/SKILL.md +0 -628
- package/skills/cometchat-react-push/SKILL.md +0 -634
- package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
- package/skills/cometchat-react-testing/SKILL.md +0 -413
- package/skills/cometchat-theming/SKILL.md +0 -498
- package/skills/cometchat-troubleshooting/SKILL.md +0 -294
|
@@ -1,643 +1,204 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cometchat-flutter-v6-core
|
|
3
|
-
description:
|
|
4
|
-
Use when writing any code that uses cometchat_chat_uikit. Contains hard rules that prevent
|
|
5
|
-
silent failures, crashes, and subtle bugs. Covers CometChatUIKit.init, login, logout,
|
|
6
|
-
UIKitSettings, UIKitSettingsBuilder, listener lifecycle, theme caching, Scaffold
|
|
7
|
-
resizeToAvoidBottomInset, subscriptionType, region, muid preservation, and the
|
|
8
|
-
Clean Architecture + BLoC component pattern. Also use when seeing errors like
|
|
9
|
-
"Authentication null", "APP ID null", ERR_ALREADY_LOGGED_IN, or StateError from
|
|
10
|
-
uninitialized ServiceLocator. Make sure to use this skill for any CometChat Flutter
|
|
11
|
-
UIKit code, even simple widget usage.
|
|
3
|
+
description: "Add CometChat chat to a Flutter app end-to-end — detect the project, get & verify dashboard credentials, init→login→render, and the drop-in conversation UI. The core knowledge every other Flutter v6 skill builds on. Triggers: 'add chat to my flutter app', 'integrate cometchat flutter', 'set up cometchat credentials flutter', 'show conversations and messages in flutter'."
|
|
12
4
|
license: "MIT"
|
|
13
|
-
compatibility: "
|
|
5
|
+
compatibility: "Flutter >=3.38.9; Dart >=3.10.8 <4.0.0; cometchat_chat_uikit ^6 (6.1.x, verified 6.1.0); cometchat_sdk ^5.0.6; cometchat_calls_sdk ^5.0.4 (calls only)"
|
|
14
6
|
metadata:
|
|
15
7
|
author: "CometChat"
|
|
16
|
-
version: "
|
|
17
|
-
tags: "cometchat flutter core
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "cometchat flutter core chat integration uikit v6 setup credentials"
|
|
18
10
|
---
|
|
19
11
|
|
|
20
|
-
|
|
12
|
+
> **Ground truth:** `cometchat_chat_uikit@6` (6.1.0) + `cometchat_sdk@^5.0.6`. Every `CometChat*` symbol here is in `catalogs/flutter-v6.json` — **compiler-verified** against the published package. Signatures marked **[verified]** were compiled because the docs were **wrong**, or (for `initFromSettings`) deliberately **silent** (`DOCS-BACKLOG.md` PART 4): trust this file for those, fetch the rest via `references/docs-map.md`. THIN map loaded every run; depth in `references/*`.
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
<!-- core is the companion the other flutter v6 skills read; it has no Companion block of its own. -->
|
|
23
15
|
|
|
24
|
-
|
|
16
|
+
## Use this skill when
|
|
17
|
+
"add chat to my Flutter app", "integrate CometChat in Flutter", "set up CometChat credentials", "show a conversations + messages screen". An unscoped **"add chat"** means a **production-ready core surface** — a `CometChatConversations` screen pushing a message screen, with **threaded replies** and **search** wired, in `Scaffold`/`SafeArea`, keyboard-safe, every screen popping back — NOT a two-widget demo, NOT the whole tab-based app (see the golden path). It **grows on request** → `cometchat-flutter-v6-placement`.
|
|
25
18
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### File-based init with `cometchat-settings.json` (recommended)
|
|
31
|
-
|
|
32
|
-
> **🚧 Version gate (ENG-35866 — Skills Telemetry).** `CometChatUIKit.initFromSettings()` ships in **`cometchat_chat_uikit` ≥ `6.0.3`** (which pulls `cometchat_sdk ^5.0.3` + `cometchat_calls_sdk ^5.0.2` transitively). It reads `cometchat-settings.json` via `rootBundle` and lets the SDK self-report `integrationSource`. On older UIKit the method does not exist — use the **`UIKitSettingsBuilder` fallback** below. If unsure of the installed version, use the fallback.
|
|
33
|
-
|
|
34
|
-
**Step 1 — create `cometchat-settings.json` at the project root.** Fill `appId` / `region` / `credentials.authKey` from the CLI `provision setup` output; leave everything else at the defaults below. These are the **same credentials** used everywhere else in the app — this file is the single source, so there's no second copy to keep in sync.
|
|
35
|
-
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"appId": "APP_ID_HERE",
|
|
39
|
-
"region": "us",
|
|
40
|
-
"credentials": {
|
|
41
|
-
"authKey": "AUTH_KEY_HERE"
|
|
42
|
-
},
|
|
43
|
-
"chatSDK": {
|
|
44
|
-
"presenceSubscription": {
|
|
45
|
-
"type": "ALL_USERS",
|
|
46
|
-
"roles": []
|
|
47
|
-
},
|
|
48
|
-
"autoEstablishSocketConnection": true,
|
|
49
|
-
"adminHost": null,
|
|
50
|
-
"clientHost": null
|
|
51
|
-
},
|
|
52
|
-
"callsSDK": {
|
|
53
|
-
"host": null,
|
|
54
|
-
"adminHost": null,
|
|
55
|
-
"clientHost": null,
|
|
56
|
-
"callsHost": null
|
|
57
|
-
},
|
|
58
|
-
"uiKit": {
|
|
59
|
-
"subscribePresenceForAllUsers": true
|
|
60
|
-
}
|
|
61
|
-
}
|
|
19
|
+
## Install
|
|
20
|
+
```bash
|
|
21
|
+
flutter pub add cometchat_chat_uikit
|
|
62
22
|
```
|
|
23
|
+
Pin the major in `pubspec.yaml` — `cometchat_chat_uikit: ^6.1.0` (a bare `any` can resolve across majors). The Chat SDK (`cometchat_sdk`) comes **transitively and is re-exported by the kit barrel** — do NOT add it separately unless you import SDK-only paths. Voice/video calling = a settings flag + native config (`cometchat_calls_sdk` is already a transitive kit dependency — see below) → `cometchat-flutter-v6-calls`.
|
|
63
24
|
|
|
64
|
-
**
|
|
25
|
+
**Platform minimums** — Android `minSdk = 26` in `android/app/build.gradle.kts`; iOS `platform :ios, '15.1'` in `ios/Podfile`. **The `getting-started` page says 24 / 13.0 and both are too low** (DOCS-BACKLOG D7). The kit's own AAR allows 21, but transitive deps set the real floor and this one is not optional: `cometchat_chat_uikit` depends on **`cometchat_calls_sdk`** unconditionally — it sits in the main `dependencies:` block — and that package pins `minSdkVersion 26` / `platform :ios, '15.1'` (5.0.7). Gradle and CocoaPods take the maximum across the graph, so a lower value is a build error whether or not the app uses calling.
|
|
65
26
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
27
|
+
## Setup & credentials (essentials — full detail: `references/setup-credentials.md`)
|
|
28
|
+
1. **Detect** by READING the repo — `pubspec.yaml` + lockfile (deps and the kit major), `lib/main.dart`, state management, navigation, and how config is handled. Reuse an existing `.cometchat/config.json` or settings asset (skip re-setup). Signal table: `references/setup-credentials.md`.
|
|
29
|
+
2. **version_conflict — STOP** if the project already has `cometchat_chat_uikit` v5 (or any non-v6 major); reconcile first, never mix majors (`RULES.md`). A v5 project that wants v6 → `cometchat-flutter-v6-migration`.
|
|
30
|
+
3. **Credentials — OFFER the dashboard fetch FIRST; never default to "paste it yourself."** When App ID / Region / Auth Key are missing, offer **(a) fetch from your dashboard (recommended)** — load the CLI on demand, pick an **EXISTING** app (never auto-create) — or **(b) manual paste**. Then the SKILL writes `cometchat-settings.json` (§4) from those creds; the CLI is dashboard/API-only and never writes Dart (`RULES.md` §21). Never defer credentials to a "add them yourself" TODO. Exact commands + the app-picker flow: `references/setup-credentials.md`.
|
|
31
|
+
4. **Write the settings asset + register it** — commit only a placeholder (no real Auth Key) and do **not** gitignore it (a registered asset must exist or a fresh-clone `flutter build` fails — see the note in §Integration ordering); never echo the Auth Key. Prod → server-minted auth token, not the Auth Key.
|
|
32
|
+
5. **Authorize** = `init` then `login` both hit `onSuccess`. An auth error is almost always the wrong **Region**.
|
|
72
33
|
|
|
73
|
-
|
|
34
|
+
## Integration ordering (BAKED — invariant; docs: init must complete before login, login before any widget)
|
|
35
|
+
`initFromSettings()` once at startup → `login(UID)` after init succeeds → only THEN render any `CometChat*` widget.
|
|
74
36
|
|
|
75
|
-
**
|
|
37
|
+
**Init via `initFromSettings` — the file-based, telemetry-attributed path (`RULES.md` §5).** It reads a `cometchat-settings.json` **asset** and persists `integrationSource="ai-agent"`. **Flutter's signature takes NO settings argument** (unlike web, which passes a settings object) — the file IS the input:
|
|
76
38
|
|
|
77
39
|
```dart
|
|
78
|
-
|
|
40
|
+
// [verified vs 6.1.0] — INTENTIONALLY undocumented upstream (@nodoc, owner decision:
|
|
41
|
+
// DOCS-BACKLOG F4 WONTFIX). Prefer it over the docs' UIKitSettingsBuilder + init()
|
|
42
|
+
// path, which loses telemetry attribution. The shape below is the contract.
|
|
79
43
|
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
|
|
80
44
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
await CometChatUIKit.initFromSettings(
|
|
85
|
-
onSuccess: (String successMessage) => debugPrint('Init done'),
|
|
86
|
-
onError: (CometChatException e) => debugPrint('Init failed: ${e.message}'),
|
|
87
|
-
);
|
|
88
|
-
runApp(const MyApp());
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### `UIKitSettingsBuilder` init (fallback — UIKit before `6.0.3`)
|
|
93
|
-
|
|
94
|
-
```dart
|
|
95
|
-
// ✅ CORRECT
|
|
96
|
-
final settings = (UIKitSettingsBuilder()
|
|
97
|
-
..appId = 'APP_ID'
|
|
98
|
-
..region = 'us'
|
|
99
|
-
..authKey = 'AUTH_KEY'
|
|
100
|
-
..subscriptionType = CometChatSubscriptionType.allUsers)
|
|
101
|
-
.build();
|
|
102
|
-
|
|
103
|
-
await CometChatUIKit.init(
|
|
104
|
-
uiKitSettings: settings,
|
|
105
|
-
onSuccess: (_) => debugPrint('Init done'),
|
|
106
|
-
onError: (e) => debugPrint('Init failed: ${e.message}'),
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
// ❌ WRONG — login before init completes
|
|
110
|
-
CometChatUIKit.init(uiKitSettings: settings);
|
|
111
|
-
CometChatUIKit.login('uid'); // Race condition
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Rule: AUTH_CHECK_AFTER_INIT
|
|
115
|
-
|
|
116
|
-
After `CometChatUIKit.init()` completes (in its `onSuccess`), the static field `CometChatUIKit.loggedInUser` is already populated if a cached session exists. Use this synchronous check — do NOT call `CometChat.getLoggedInUser()` separately.
|
|
117
|
-
|
|
118
|
-
```dart
|
|
119
|
-
// ✅ CORRECT — synchronous check after init completes
|
|
120
|
-
CometChatUIKit.init(
|
|
121
|
-
uiKitSettings: settings,
|
|
122
|
-
onSuccess: (_) {
|
|
123
|
-
final hasUser = CometChatUIKit.loggedInUser != null;
|
|
124
|
-
// Route to home or login based on hasUser
|
|
125
|
-
},
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
// ❌ WRONG — separate async getLoggedInUser call after init
|
|
129
|
-
CometChatUIKit.init(
|
|
130
|
-
uiKitSettings: settings,
|
|
131
|
-
onSuccess: (_) {
|
|
132
|
-
CometChat.getLoggedInUser(
|
|
133
|
-
onSuccess: (user) { ... }, // Unreliable when no session exists
|
|
134
|
-
onError: (e) { ... },
|
|
135
|
-
);
|
|
136
|
-
},
|
|
45
|
+
await CometChatUIKit.initFromSettings(
|
|
46
|
+
onSuccess: (String message) => debugPrint('CometChat initialized'),
|
|
47
|
+
onError: (CometChatException e) => debugPrint('Init failed: ${e.message}'),
|
|
137
48
|
);
|
|
138
49
|
```
|
|
139
50
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
onSuccess: (_) async {
|
|
149
|
-
final user = await CometChatUIKit.getLoggedInUser(); // Unnecessary!
|
|
150
|
-
if (user != null) { ... }
|
|
151
|
-
},
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
// ❌ ALSO WRONG — raw SDK getLoggedInUser (bypasses UIKit, unreliable)
|
|
155
|
-
User? existingUser = await CometChat.getLoggedInUser();
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## Rule: SCAFFOLD_NO_RESIZE (version-aware — prose guidance, not a lint)
|
|
159
|
-
|
|
160
|
-
On `cometchat_chat_uikit ^6.0.1`, a `Scaffold` containing `CometChatMessageComposer` should use `resizeToAvoidBottomInset: true` (or omit it — `true` is Flutter's default). The composer clamps the native keyboard height to Flutter's `viewInsets` (kit fix **ENG-34434**), so `true` does NOT double-compensate. The kit sample app uses `true` (the messages screen defaults it; the thread screen sets it explicitly).
|
|
161
|
-
|
|
162
|
-
The old "must be `false`" rule was correct only for **pre-6.0.1** kits (before the clamp landed). On those versions `false` was the workaround for the double-compensation / layout-jump bug. If you see a double keyboard gap on a current kit, the fix is to upgrade to `^6.0.1` — not to set `false`.
|
|
163
|
-
|
|
164
|
-
```dart
|
|
165
|
-
// ✅ CORRECT on ^6.0.1 (true, or omit — true is the default)
|
|
166
|
-
Scaffold(
|
|
167
|
-
resizeToAvoidBottomInset: true,
|
|
168
|
-
body: Column(
|
|
169
|
-
children: [
|
|
170
|
-
Expanded(child: CometChatMessageList(user: user)),
|
|
171
|
-
CometChatMessageComposer(user: user),
|
|
172
|
-
],
|
|
173
|
-
),
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
// ⚠ Only on PRE-6.0.1 kits — false was the stopgap before the ENG-34434 clamp.
|
|
177
|
-
// On ^6.0.1 this is unnecessary; upgrade the kit instead.
|
|
178
|
-
Scaffold(
|
|
179
|
-
resizeToAvoidBottomInset: false,
|
|
180
|
-
body: Column(
|
|
181
|
-
children: [
|
|
182
|
-
Expanded(child: CometChatMessageList(user: user)),
|
|
183
|
-
CometChatMessageComposer(user: user),
|
|
184
|
-
],
|
|
185
|
-
),
|
|
186
|
-
)
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Rule: ANDROID_MINSDK_26
|
|
190
|
-
|
|
191
|
-
**Set `minSdk = 26` in `android/app/build.gradle.kts` (In-code path too, not just Visual Builder).** `cometchat_chat_uikit: ^6.0.1` depends transitively on `cometchat_calls_sdk` (`>=5.0.2 <6.0.0`), which floors Android `minSdk` at **26**. A default `flutter create` app sets `minSdk` lower (Flutter's platform default), so `flutter build apk` fails with:
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
uses-sdk:minSdkVersion 21 cannot be smaller than version 26 declared in library [cometchat_calls_sdk]
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
`flutter analyze` does NOT catch this — it only surfaces at the APK/AAB build. Set it up front:
|
|
198
|
-
|
|
199
|
-
```kotlin
|
|
200
|
-
// android/app/build.gradle.kts
|
|
201
|
-
android { defaultConfig { minSdk = 26 } }
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
(Verified — real `flutter build apk --debug` against kit 6.0.1.)
|
|
205
|
-
|
|
206
|
-
## Rule: LISTENER_LIFECYCLE
|
|
207
|
-
|
|
208
|
-
SDK listeners MUST be registered with a unique ID in `initState()` and removed with the same ID in `dispose()`. Forgetting removal causes duplicate events and memory leaks.
|
|
209
|
-
|
|
210
|
-
```dart
|
|
211
|
-
// ✅ CORRECT
|
|
212
|
-
class _MyScreenState extends State<MyScreen> with MessageListener {
|
|
213
|
-
late final String _listenerId;
|
|
214
|
-
|
|
215
|
-
@override
|
|
216
|
-
void initState() {
|
|
217
|
-
super.initState();
|
|
218
|
-
_listenerId = 'my_screen_${DateTime.now().millisecondsSinceEpoch}';
|
|
219
|
-
CometChat.addMessageListener(_listenerId, this);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
@override
|
|
223
|
-
void dispose() {
|
|
224
|
-
CometChat.removeMessageListener(_listenerId);
|
|
225
|
-
super.dispose();
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// ❌ WRONG — hardcoded ID causes collisions; missing dispose removal
|
|
230
|
-
class _MyScreenState extends State<MyScreen> with MessageListener {
|
|
231
|
-
@override
|
|
232
|
-
void initState() {
|
|
233
|
-
super.initState();
|
|
234
|
-
CometChat.addMessageListener('messages', this); // Collision!
|
|
235
|
-
}
|
|
236
|
-
// Missing dispose → listener leaks
|
|
237
|
-
}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
## Rule: THEME_CACHE
|
|
241
|
-
|
|
242
|
-
Cache theme values in `didChangeDependencies()` with a `_themeInitialized` flag. Never call `CometChatThemeHelper.getColorPalette(context)` in `build()` — during keyboard animation, `MediaQuery` changes trigger rebuilds, and each lookup does expensive InheritedWidget traversal (44-95ms instead of <16ms).
|
|
243
|
-
|
|
244
|
-
```dart
|
|
245
|
-
// ✅ CORRECT — Hybrid pattern
|
|
246
|
-
class _MyWidgetState extends State<MyWidget> {
|
|
247
|
-
late CometChatColorPalette _colorPalette;
|
|
248
|
-
late CometChatSpacing _spacing;
|
|
249
|
-
late CometChatTypography _typography;
|
|
250
|
-
bool _themeInitialized = false;
|
|
251
|
-
|
|
252
|
-
@override
|
|
253
|
-
void didChangeDependencies() {
|
|
254
|
-
super.didChangeDependencies();
|
|
255
|
-
if (!_themeInitialized) {
|
|
256
|
-
_colorPalette = CometChatThemeHelper.getColorPalette(context);
|
|
257
|
-
_spacing = CometChatThemeHelper.getSpacing(context);
|
|
258
|
-
_typography = CometChatThemeHelper.getTypography(context);
|
|
259
|
-
_themeInitialized = true;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// ❌ WRONG — lookup in build causes jank
|
|
265
|
-
@override
|
|
266
|
-
Widget build(BuildContext context) {
|
|
267
|
-
final colors = CometChatThemeHelper.getColorPalette(context); // Expensive!
|
|
268
|
-
return Container(color: colors.primary);
|
|
51
|
+
`cometchat-settings.json` at the **project root**, registered in `pubspec.yaml` under `flutter: assets:`:
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"appId": "APP_ID",
|
|
55
|
+
"region": "REGION",
|
|
56
|
+
"credentials": { "authKey": "AUTH_KEY" },
|
|
57
|
+
"uiKit": { "subscribePresenceForAllUsers": true, "enableCalling": false },
|
|
58
|
+
"chatSDK": { "autoEstablishSocketConnection": true }
|
|
269
59
|
}
|
|
270
60
|
```
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
Omitting `subscriptionType` in `UIKitSettingsBuilder` silently disables all presence events (online/offline, typing indicators). No error is thrown.
|
|
275
|
-
|
|
276
|
-
```dart
|
|
277
|
-
// ✅ CORRECT
|
|
278
|
-
UIKitSettingsBuilder()
|
|
279
|
-
..subscriptionType = CometChatSubscriptionType.allUsers
|
|
280
|
-
|
|
281
|
-
// ❌ WRONG — no error, but presence events never fire
|
|
282
|
-
UIKitSettingsBuilder()
|
|
283
|
-
..appId = 'APP_ID'
|
|
284
|
-
..region = 'us'
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
## Rule: REGION_LOWERCASE
|
|
288
|
-
|
|
289
|
-
Region must be a lowercase string. The SDK validates against `['us', 'eu', 'in']`.
|
|
290
|
-
|
|
291
|
-
```dart
|
|
292
|
-
// ✅ CORRECT
|
|
293
|
-
..region = 'us'
|
|
294
|
-
|
|
295
|
-
// ❌ WRONG — throws ERR_INVALID_REGION
|
|
296
|
-
..region = 'US'
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
## Rule: SERVICE_LOCATOR_INIT
|
|
300
|
-
|
|
301
|
-
Each component's `ServiceLocator.instance.setup()` must be called before creating its BLoC. The UIKit widgets do this automatically, but if you create BLoCs manually:
|
|
61
|
+
> Keys are read exactly as above. `uiKit.enableCalling` is the **only** way to turn calling on via this path (`UIKitSettings` defaults it to false) — leave it `false` until the user asks for calls. `credentials.authKey` is **dev-only**; omit it for production and log in with a server-minted token.
|
|
62
|
+
> **Make a fresh clone build.** A file registered under `flutter: assets:` MUST exist at build time or `flutter build bundle` fails with *"No file or variants found for asset: cometchat-settings.json."* So do **not** gitignore the registered asset. Instead **commit a placeholder `cometchat-settings.json`** — same shape, with a placeholder/empty `authKey` (NEVER a real dev Auth Key) — and have each developer and CI overwrite it locally/at build time with real credentials. (Enforce "no real key committed" via a pre-commit check or CI, not `.gitignore`.) For production, CI generates the prod-flavoured file (no Auth Key) at build time (`cometchat-flutter-v6-production`).
|
|
302
63
|
|
|
303
64
|
```dart
|
|
304
|
-
//
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
)
|
|
310
|
-
|
|
311
|
-
// ❌ WRONG — StateError: not initialized
|
|
312
|
-
final bloc = ConversationsBloc(
|
|
313
|
-
getLoggedInUserUseCase: ConversationsServiceLocator.instance.getLoggedInUserUseCase,
|
|
65
|
+
// login AFTER init succeeds. CometChatUIKit.login already checks getLoggedInUser()
|
|
66
|
+
// internally and no-ops if that UID is signed in, so no host-side re-login guard is needed.
|
|
67
|
+
await CometChatUIKit.login(
|
|
68
|
+
uid,
|
|
69
|
+
onSuccess: (User user) => debugPrint('Logged in: ${user.name}'),
|
|
70
|
+
onError: (CometChatException e) => debugPrint('Login failed: ${e.message}'),
|
|
314
71
|
);
|
|
315
72
|
```
|
|
73
|
+
> **Which UID?** `login()` needs a user that ALREADY EXISTS — never invent one. ASK, or take one from Dashboard → **Users**; fresh apps seed `cometchat-uid-1…`. The only tentative suggestion is `cometchat-uid-1`, labelled "if this is a fresh app." **Prod → `CometChatUIKit.loginWithAuthToken(authToken, …)`** with a token minted server-side.
|
|
74
|
+
> Init-once, hot-restart, and gating the first frame: `references/lifecycle.md`.
|
|
316
75
|
|
|
317
|
-
##
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
The CometChat SDK uses callback-based APIs (`onSuccess`/`onError`). Wrap them with `Completer` for async/await:
|
|
324
|
-
|
|
325
|
-
```dart
|
|
326
|
-
import 'dart:async';
|
|
327
|
-
|
|
328
|
-
Future<User> loginAsync(String uid) {
|
|
329
|
-
final completer = Completer<User>();
|
|
330
|
-
CometChatUIKit.login(uid,
|
|
331
|
-
onSuccess: (user) => completer.complete(user),
|
|
332
|
-
onError: (e) => completer.completeError(e),
|
|
333
|
-
);
|
|
334
|
-
return completer.future;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Usage
|
|
338
|
-
try {
|
|
339
|
-
final user = await loginAsync('user123');
|
|
340
|
-
} on CometChatException catch (e) {
|
|
341
|
-
debugPrint('Login failed: ${e.message}');
|
|
342
|
-
}
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
This pattern is used internally by the UIKit's repository layer. Use it when calling SDK methods directly outside UIKit components.
|
|
346
|
-
|
|
347
|
-
## Component Architecture Pattern
|
|
348
|
-
|
|
349
|
-
Every component follows this structure:
|
|
350
|
-
|
|
351
|
-
```
|
|
352
|
-
{component}/
|
|
353
|
-
├── bloc/
|
|
354
|
-
│ ├── {component}_bloc.dart # Extends Bloc<Event, State>, registers SDK listeners
|
|
355
|
-
│ ├── {component}_event.dart # Equatable events
|
|
356
|
-
│ └── {component}_state.dart # Equatable state with copyWith
|
|
357
|
-
├── domain/
|
|
358
|
-
│ ├── usecases/ # One class per operation
|
|
359
|
-
│ └── repositories/ # Abstract interface
|
|
360
|
-
├── data/
|
|
361
|
-
│ ├── repositories/ # Impl delegates to datasource
|
|
362
|
-
│ └── datasources/ # SDK calls
|
|
363
|
-
├── di/
|
|
364
|
-
│ └── {component}_service_locator.dart # Singleton, setup() method
|
|
365
|
-
└── widgets/ # UI, uses BlocConsumer/BlocBuilder
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
## Naming Conventions
|
|
369
|
-
|
|
370
|
-
| Type | Pattern | Example |
|
|
371
|
-
|------|---------|---------|
|
|
372
|
-
| Widget | `CometChat{Name}` | `CometChatConversations` |
|
|
373
|
-
| BLoC | `{Name}Bloc` | `ConversationsBloc` |
|
|
374
|
-
| Event | `{Verb}{Name}` | `LoadConversations`, `MessageReceived` |
|
|
375
|
-
| State | `{Name}State` | `ConversationsLoaded`, `MessageListState` |
|
|
376
|
-
| Repository | `{Name}Repository` / `{Name}RepositoryImpl` | `ConversationsRepository` |
|
|
377
|
-
| Use Case | `{Verb}{Name}UseCase` | `GetConversationsUseCase` |
|
|
378
|
-
| Service Locator | `{Name}ServiceLocator` | `ConversationsServiceLocator` |
|
|
379
|
-
| Style | `CometChat{Name}Style` | `CometChatConversationsStyle` |
|
|
380
|
-
|
|
381
|
-
## Checklist — Every CometChat Screen
|
|
382
|
-
|
|
383
|
-
- [ ] `CometChatUIKit.init()` called before any usage
|
|
384
|
-
- [ ] Auth check uses `CometChatUIKit.loggedInUser` after init, not `CometChat.getLoggedInUser()`
|
|
385
|
-
- [ ] `subscriptionType` set in UIKitSettingsBuilder
|
|
386
|
-
- [ ] `region` is lowercase
|
|
387
|
-
- [ ] Scaffold hosting `CometChatMessageComposer` uses `resizeToAvoidBottomInset: true` (or omits it) on `^6.0.1` — the composer clamps to `viewInsets` (ENG-34434); `false` is only the pre-6.0.1 stopgap
|
|
388
|
-
- [ ] Theme cached in `didChangeDependencies()`, not `build()`
|
|
389
|
-
- [ ] SDK listeners registered with unique ID, removed in `dispose()`
|
|
390
|
-
- [ ] Colors from `CometChatThemeHelper`, never hardcoded
|
|
391
|
-
|
|
392
|
-
## Visual Builder integration
|
|
393
|
-
|
|
394
|
-
> **⚠ The Visual Builder emits V5-shaped code.** The canonical builder repo at the `chat_builder/` directory inside the Flutter Visual Builder ZIP (download from https://preview.cometchat.com/downloads/cometchat-builder-flutter.zip) uses `cometchat_chat_uikit: ^5.2.12` + `cometchat_calls_uikit: ^5.0.13` — the **V5** Flutter UI Kit packages. There is no V6-native Visual Builder canonical from vendor side yet ([F22 finding, 2026-05-22](https://github.com/cometchat/cometchat-skills/issues)). When a V6 project picks the Visually path, the copied `chat_builder/` path-dep brings V5 deps in transitively — your V6 host app code is untouched, but the Visual-Builder-emitted screens are V5-flavored. Treat as transitional until vendor publishes a V6 canonical. V6 customers preferring a single-version dep tree should use the In-code path.
|
|
395
|
-
>
|
|
396
|
-
> The recipe below is identical to what `cometchat-flutter-v5-core` §"Visual Builder integration" prescribes (both reference the same canonical). This page kept for V6 customers who still hit the Visually flow.
|
|
397
|
-
|
|
398
|
-
When the dispatcher's Step 3.1 sets `customize=visual` and the platform resolves to `flutter`, skills runs **`cometchat builder export --platform flutter`** — a single CLI command that downloads the canonical static template ZIP from `preview.cometchat.com/downloads/cometchat-builder-flutter.zip`, fetches the per-builder settings JSON, applies F3 + F10 missing-field defaults, and writes the entire `chat_builder/` package to `--output` (default: `chat_builder/`).
|
|
399
|
-
|
|
400
|
-
The `chat_builder/` directory is wired **as a path dependency** in the customer's project — it owns the entire chat surface (conversations, messages, users, groups, calls). The customer's app initializes settings and launches a screen via `ChatBuilder.launchBuilder(context)` or `ChatBuilder.launchMessages(...)`.
|
|
401
|
-
|
|
402
|
-
This is intentionally a heavier copy than iOS (Pod) / Android (Gradle plugin) — the Flutter builder package is not yet published to pub.dev.
|
|
403
|
-
|
|
404
|
-
### 1. Run `cometchat builder export`
|
|
405
|
-
|
|
406
|
-
```bash
|
|
407
|
-
cometchat builder export --platform flutter --json
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
Defaults to `--output chat_builder/`. The command writes the entire canonical `chat_builder/` Dart package (~50 files: `lib/`, `assets/`, `android/`, `ios/`, `pubspec.yaml`) — verbatim from the canonical ZIP — and patches `chat_builder/assets/sample_app/cometchat-builder-settings.json` with the **envelope-shape JSON** the CLI emits: `{ builderId, name, settings: {...} }` (F3 + F10 defaults injected: `mentionAll: true`, `inAppSounds: { incomingMessageSound: true, outgoingMessageSound: true }`). No SKILLS-AUTO-GENERATED sentinel (JSON forbids `//` comments).
|
|
411
|
-
|
|
412
|
-
> The CLI is the source of truth for the written shape. The vendor canonical's own checked-in `cometchat-builder-settings.json` carries only `{ builderId, settings }` (no top-level `name`) — `BuilderSettingsHelper.loadFromAsset()` reads only `builderId` + `settings` and **ignores any extra top-level keys**, so the CLI's additional `name` (and any other extras) are harmless.
|
|
413
|
-
|
|
414
|
-
`BuilderSettingsHelper.loadFromAsset()` reads this exported settings file at runtime.
|
|
415
|
-
|
|
416
|
-
Resync = re-run the same command with `--force` (full re-download + replace). See `cometchat-core` §11.6 for the resync contract.
|
|
417
|
-
|
|
418
|
-
#### F56 + F57 + F58 — known canonical-ZIP rough edges (re-apply after every export)
|
|
419
|
-
|
|
420
|
-
Three issues live in the upstream canonical `chat_builder/` Dart package (verified 2026-05-25 against `preview.cometchat.com/downloads/cometchat-builder-flutter.zip`). Vendor-side fixes pending; agent must work around them on **every** `builder export` (first emit AND every resync, since `--force` re-overwrites the patches):
|
|
421
|
-
|
|
422
|
-
**F56 — Wrong asset path in `api_services.dart`**
|
|
423
|
-
|
|
424
|
-
`chat_builder/lib/services/api_services.dart` line ~41:
|
|
425
|
-
|
|
426
|
-
```dart
|
|
427
|
-
// Canonical (broken):
|
|
428
|
-
await loadJsonFromAssets('assets/chat_builder/sample_data.json');
|
|
429
|
-
|
|
430
|
-
// Agent must patch to:
|
|
431
|
-
await loadJsonFromAssets('assets/sample_app/sample_data.json');
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
The canonical references `assets/chat_builder/sample_data.json` — a path that doesn't exist in the customer's host app after the standard `cp -r chat_builder/assets/ assets/` copy. The actual file lands at `assets/sample_app/sample_data.json`. Without this patch, the login screen's "default users" list silently falls back to empty and customers see an empty user picker.
|
|
435
|
-
|
|
436
|
-
**F57 — F56 patch is overwritten on every resync**
|
|
437
|
-
|
|
438
|
-
`builder export --platform flutter --force` re-copies the canonical's `api_services.dart` verbatim — re-introducing the wrong path. Agent must re-apply the F56 patch after every resync. This is a known re-apply task; document it in the customer-facing summary so they know "the agent will need to patch this each time the dashboard settings change".
|
|
76
|
+
## Widget / API map (BAKED closed list — from the catalog)
|
|
77
|
+
Init/session: `CometChatUIKit` (`initFromSettings` · `login` · `loginWithAuthToken` · `logout` · `loggedInUser`), `UIKitSettingsBuilder`, `CometChatSubscriptionType`, `CometChatException`.
|
|
78
|
+
Core surface: `CometChatConversations`, `CometChatMessageHeader`, `CometChatMessageList`, `CometChatMessageComposer`; wired affordances `CometChatThreadedHeader`, `CometChatSearch`.
|
|
79
|
+
Grow set (added on request): `CometChatUsers`, `CometChatGroups`, `CometChatGroupMembers`, `CometChatChangeScope`, `CometChatCallLogs`. Incoming calls need NO widget — with calling on, the kit presents the overlay itself (`-calls`).
|
|
80
|
+
> **TWO BARRELS — a real compile trap.** `package:cometchat_chat_uikit/cometchat_chat_uikit.dart` gives you the chat widgets **and the re-exported Chat SDK** (`User`, `Group`, `Conversation`, `BaseMessage`, `TextMessage` — no separate import). **Every calls symbol** (`CometChatIncomingCall`, `CometChatOutgoingCall`, `CometChatCallButtons`, `CometChatCallLogs`, `CometChatCallBubble`, `CometChatCalls`) lives ONLY in `package:cometchat_chat_uikit/cometchat_calls_uikit.dart`, and that barrel does NOT re-export the chat widgets — a calls screen imports **both**. Verified: using `CometChatIncomingCall` with only the chat import fails to compile.
|
|
81
|
+
> The v6 widget is **`CometChatThreadedHeader`** — `CometChatThreadHeader` (the React name) does NOT exist here. Never carry a name across families.
|
|
439
82
|
|
|
440
|
-
|
|
83
|
+
## Hot-path props (BAKED — the golden path needs NO fetch)
|
|
84
|
+
- `CometChatConversations`: `onItemTap(Conversation)` (select → push the message screen) · `hideSearch` · `searchReadOnly` (set `true` so the field acts as a button) · `onSearchTap` (→ push `CometChatSearch`) · `conversationsRequestBuilder` (scope to `user`/`group` when the ask is DM-only or groups-only — reuse the builder, don't client-filter) · `hideAppbar` · `appBarOptions` · `onBack`.
|
|
85
|
+
- `CometChatMessageHeader`: `user:` / `group:` (pass the SAME target as the list) · `showBackButton` (default `true`) + `onBack` · `hideVoiceCallButton` / `hideVideoCallButton` (call buttons are built in — leave them unless calls are out of scope) · `auxiliaryButtonView` / `trailingView` (where a custom action goes — see search below).
|
|
86
|
+
- `CometChatMessageList`: `user:` / `group:` · `parentMessageId` (thread mode) · `onThreadRepliesClick` **[verified]** — the type is `ThreadRepliesClick = void Function(BaseMessage message, BuildContext context, {CometChatMessageTemplate? template})`; a one-argument closure does **not** compile (`DOCS-BACKLOG` F2).
|
|
87
|
+
- `CometChatMessageComposer`: `user:` / `group:` · `parentMessageId` (thread mode). A plain send needs nothing else.
|
|
88
|
+
- `CometChatSearch` **[verified]**: `onConversationClicked` / `onMessageClicked` (**not** the docs' `onConversationItemClick` / `onMessageItemClick` — `DOCS-BACKLOG` F3) · `onBack` · `user:` / `group:` / `searchIn` to scope it to one chat.
|
|
89
|
+
> Any OTHER widget or a rarer prop → fetch its `.md` twin via `references/docs-map.md`. Full catalog: `cometchat-flutter-v6-components`.
|
|
441
90
|
|
|
442
|
-
|
|
91
|
+
## Golden path — the production-ready CORE surface (default for an unscoped "add chat"; grows on request)
|
|
92
|
+
Setup → init/login → **gate the first frame** on both resolving (show a loader; never render a `CometChat*` widget before login succeeds) → then:
|
|
443
93
|
|
|
444
|
-
**
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
| Path | Content |
|
|
449
|
-
|---|---|
|
|
450
|
-
| `lib/cometchat/cometchat_app.dart` | Thin `StatefulWidget` that initializes the kit then exposes a launch trigger calling `ChatBuilder.launchBuilder(context)` |
|
|
451
|
-
| `lib/cometchat/secrets.dart` | Credentials class (`Secrets.appId / region / authKey`) populated by Step 2c, added to `.gitignore` |
|
|
452
|
-
|
|
453
|
-
### Files patched
|
|
454
|
-
|
|
455
|
-
| Path | Patch |
|
|
456
|
-
|---|---|
|
|
457
|
-
| `pubspec.yaml` | Add `chat_builder: { path: ./chat_builder }` to dependencies. Add `assets/` + `assets/sample_app/` to `flutter.assets`. Add font families `arial / inter / roboto / times New Roman` exactly as defined in `chat_builder/pubspec.yaml`. **As a `path:` dependency the `chat_builder` package carries its own transitive deps** (`get`, `shared_preferences`, `http`, `toast`, `path_provider`, `permission_handler`, `intl` per `chat_builder/pubspec.yaml`) and pub resolves them automatically — you do NOT list them in the host app. Only if you vendor `chat_builder`'s Dart files directly into your app (instead of using the `path:` dep) must you add those seven to your own `dependencies` |
|
|
458
|
-
| `lib/main.dart` | Insert `WidgetsFlutterBinding.ensureInitialized()` + `await BuilderSettingsHelper.loadFromAsset()` before `runApp()` |
|
|
459
|
-
| `ios/Podfile` | `platform :ios, '13.0'` (raise if lower) |
|
|
460
|
-
| `android/app/build.gradle.kts` | `ndkVersion = "27.0.12077973"`, **`minSdk = 26`** (REQUIRED — `cometchat_chat_uikit 6.0.1` pulls `cometchat_calls_sdk` transitively, which floors `minSdk` at 26; a default `flutter create` sets it lower and `flutter build apk` then fails with "uses-sdk:minSdkVersion … cannot be smaller than version 26 declared in library [cometchat_calls_sdk]") |
|
|
461
|
-
| `android/gradle.properties` | **Non-negotiable:** append `android.enableJetifier=true`. CometChat Chat SDK transitively pulls `com.android.support:support-compat:26.1.0` which collides with `androidx.core:core` — without Jetifier the build fails with `Duplicate class android.support.v4.os.ResultReceiver` etc. Same root cause as `cometchat-android-v6-core` §1.3a — Flutter's Android side has identical exposure. Validated 2026-05-19 on smoke test |
|
|
462
|
-
| `android/app/src/main/AndroidManifest.xml` + `ios/Runner/Info.plist` | `RECORD_AUDIO` / `CAMERA` permissions + `NSMicrophoneUsageDescription` / `NSCameraUsageDescription` if any call feature is enabled |
|
|
463
|
-
|
|
464
|
-
### Init flow (lib/main.dart)
|
|
94
|
+
1. **Conversations screen** — `CometChatConversations` inside `Scaffold` + `SafeArea`. Wire `onItemTap` → `Navigator.push` the message screen for that conversation's `User`/`Group`. Wire the **global search** the documented way: `searchReadOnly: true` + `onSearchTap` → push a `CometChatSearch` screen, whose `onConversationClicked`/`onMessageClicked` navigate to the hit and whose `onBack` pops. (Or set `hideSearch: true` — but never leave the field dead.)
|
|
95
|
+
2. **Message screen** — `CometChatMessageHeader` + `Expanded(child: CometChatMessageList(...))` + `CometChatMessageComposer`, all carrying the SAME `user:`/`group:`. `Expanded` is what makes the list fill the screen; the header/composer keep their intrinsic height. Leave `Scaffold.resizeToAvoidBottomInset` at its default `true` so the composer rides above the keyboard. The header's `showBackButton` defaults to `true` — wire `onBack` to `Navigator.pop`.
|
|
96
|
+
3. **Thread screen (DEFAULT — include unless the user opts out)** — wire the list's `onThreadRepliesClick` to push a screen with `CometChatThreadedHeader(parentMessage:, loggedInUser:)` — both required, and it has **no `onBack`**, so the screen's own `AppBar` provides back — plus a `CometChatMessageList` + `CometChatMessageComposer` that each take `parentMessageId: parentMessage.id` **AND the same `user:`/`group:` as the parent chat**. **Passing `parentMessageId` without the user/group target makes thread replies silently never send.**
|
|
97
|
+
4. **In-chat scoped search** — Flutter's `CometChatMessageHeader` has **no** search prop (unlike React). Put the action in the header's `auxiliaryButtonView`/`trailingView` slot — custom UI goes IN the slot, never stacked on top — and push `CometChatSearch(user: …/group: …)` so it searches only that chat.
|
|
465
98
|
|
|
466
99
|
```dart
|
|
467
|
-
|
|
468
|
-
import 'package:chat_builder/builder/builder_settings_helper.dart';
|
|
469
|
-
|
|
470
|
-
Future<void> main() async {
|
|
471
|
-
WidgetsFlutterBinding.ensureInitialized();
|
|
472
|
-
await BuilderSettingsHelper.loadFromAsset();
|
|
473
|
-
runApp(const MyApp());
|
|
474
|
-
}
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
`BuilderSettingsHelper.loadFromAsset()` reads `assets/sample_app/cometchat-builder-settings.json` and populates the in-memory settings the `ChatBuilder.*` screens consume. Standard `CometChatUIKit.init(uiKitSettings: ...)` (see this file's `INIT_FIRST` rule) is still required and runs before any chat surface mounts.
|
|
478
|
-
|
|
479
|
-
> **`runApp(const MyApp())` above assumes you keep `flutter create`'s default `MyApp` class.** If you instead use the **Recommended** root below (`CometChatBuilderRoot`), you've renamed/removed `MyApp` — so also **delete or update `test/widget_test.dart`** (the default test instantiates `MyApp()` and will otherwise fail `flutter analyze` with `The name 'MyApp' isn't a class`). Pick ONE root-widget name and keep main.dart + the test file consistent. (Verified 2026-06-14: this orphaned test was the only `flutter analyze` error on a clean builder-export wiring.)
|
|
480
|
-
|
|
481
|
-
> **Extensions + AI features are dashboard-enabled in V6 — do NOT add V5-style `..extensions` / `..aiFeature` / `..callingExtension` setters.** Those three `UIKitSettingsBuilder` fields exist in the **V5** kit (and the builder reference app is V5-shaped — `chat_builder` pins `cometchat_chat_uikit ^5.2.x`, so its `InitializeCometChat.init()` passes them). They were **removed in V6** — adding them does not compile against `cometchat_chat_uikit ^6.0.1`. In V6 the extension-backed builder features (polls, collaborative whiteboard/document, stickers, message translation, reactions) and AI features are turned on in the **CometChat dashboard** (the builder enables them server-side) and the kit auto-wires them; calling is enabled with `..enableCalls = true`. So the V6 `UIKitSettingsBuilder` needs only `appId`/`region`/`authKey`/`subscriptionType` (+ `enableCalls` for calls) — the builder JSON's feature flags render because the features are enabled on the app, not because of a builder setter.
|
|
482
|
-
|
|
483
|
-
### Recommended: mount `ChatBuilder.createApp()` as the root
|
|
484
|
-
|
|
485
|
-
The cleanest integration mirrors the canonical's own `lib/main.dart`, which mounts `ChatBuilder.createApp()` directly as the app root and lets the package own init, theming, and call-navigation wiring:
|
|
486
|
-
|
|
487
|
-
```dart
|
|
488
|
-
// lib/main.dart
|
|
489
|
-
import 'package:flutter/material.dart';
|
|
490
|
-
import 'package:chat_builder/builder/chat_builder.dart';
|
|
491
|
-
import 'package:chat_builder/builder/builder_settings_helper.dart';
|
|
492
|
-
// ...plus the package's prefs/page-manager bootstrap if you vendor those files
|
|
493
|
-
|
|
494
|
-
Future<void> main() async {
|
|
495
|
-
WidgetsFlutterBinding.ensureInitialized();
|
|
496
|
-
await BuilderSettingsHelper.loadFromAsset();
|
|
497
|
-
runApp(const CometChatBuilderRoot());
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
class CometChatBuilderRoot extends StatelessWidget {
|
|
501
|
-
const CometChatBuilderRoot({super.key});
|
|
502
|
-
|
|
503
|
-
@override
|
|
504
|
-
Widget build(BuildContext context) => ChatBuilder.createApp();
|
|
505
|
-
}
|
|
506
|
-
```
|
|
507
|
-
|
|
508
|
-
`ChatBuilder.createApp()` returns a `MaterialApp` that already wires (a) `CometChatColorPalette` as a `ThemeData` extension in BOTH light and dark themes — this is what actually applies the builder's brand color + text colors to the kit, and (b) `navigatorKey: CallNavigationContext.navigatorKey` so incoming-call routing works. Use this path when CometChat owns the whole chat surface.
|
|
509
|
-
|
|
510
|
-
### Alternative: a host-app wrapper (when you can't mount `createApp()` as root)
|
|
511
|
-
|
|
512
|
-
If the host app already owns its root `MaterialApp` and you must mount CometChat as a sub-surface (a route/tab/dialog), hand-roll a wrapper — but you are then responsible for replicating what `createApp()` does for you: the theme palette and the navigator key.
|
|
513
|
-
|
|
514
|
-
```dart
|
|
515
|
-
// lib/cometchat/cometchat_app.dart
|
|
516
|
-
import 'package:flutter/material.dart';
|
|
517
|
-
import 'package:chat_builder/builder/chat_builder.dart';
|
|
100
|
+
// [verified vs 6.1.0] the message screen — the shape the whole surface hangs off.
|
|
518
101
|
import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
|
|
519
|
-
import 'package:
|
|
520
|
-
|
|
521
|
-
import 'secrets.dart';
|
|
522
|
-
|
|
523
|
-
/// Top-level chat surface emitted by the Visual Builder Visually path.
|
|
524
|
-
/// The `chat_builder` package owns the UI; this widget bootstraps UI Kit init
|
|
525
|
-
/// then renders a launch trigger. Step 3c placement decides where this widget
|
|
526
|
-
/// mounts in the host app (a route, a tab, a dialog).
|
|
527
|
-
class CometChatApp extends StatefulWidget {
|
|
528
|
-
const CometChatApp({super.key});
|
|
529
|
-
|
|
530
|
-
@override
|
|
531
|
-
State<CometChatApp> createState() => _CometChatAppState();
|
|
532
|
-
}
|
|
102
|
+
import 'package:flutter/material.dart';
|
|
533
103
|
|
|
534
|
-
class
|
|
535
|
-
|
|
536
|
-
|
|
104
|
+
class MessageScreen extends StatelessWidget {
|
|
105
|
+
final User? user;
|
|
106
|
+
final Group? group;
|
|
107
|
+
const MessageScreen({super.key, this.user, this.group});
|
|
537
108
|
|
|
538
109
|
@override
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
110
|
+
Widget build(BuildContext context) {
|
|
111
|
+
return Scaffold( // resizeToAvoidBottomInset defaults to true = keyboard-safe
|
|
112
|
+
body: SafeArea(
|
|
113
|
+
child: Column(
|
|
114
|
+
children: [
|
|
115
|
+
CometChatMessageHeader(user: user, group: group, onBack: () => Navigator.pop(context)),
|
|
116
|
+
Expanded( // REQUIRED — the list fills the remaining height
|
|
117
|
+
child: CometChatMessageList(
|
|
118
|
+
user: user,
|
|
119
|
+
group: group,
|
|
120
|
+
onThreadRepliesClick: (BaseMessage message, BuildContext context,
|
|
121
|
+
{CometChatMessageTemplate? template}) {
|
|
122
|
+
Navigator.push(context, MaterialPageRoute(
|
|
123
|
+
builder: (_) => ThreadScreen(parentMessage: message, user: user, group: group),
|
|
124
|
+
));
|
|
125
|
+
},
|
|
126
|
+
),
|
|
127
|
+
),
|
|
128
|
+
CometChatMessageComposer(user: user, group: group),
|
|
129
|
+
],
|
|
130
|
+
),
|
|
131
|
+
),
|
|
559
132
|
);
|
|
560
133
|
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// The thread screen the callback pushes — part of the DEFAULT surface, not an extra.
|
|
137
|
+
// NOTE: the list AND composer each take parentMessageId *and* the same user:/group:
|
|
138
|
+
// as the parent chat. parentMessageId alone => replies silently never send.
|
|
139
|
+
class ThreadScreen extends StatelessWidget {
|
|
140
|
+
final BaseMessage parentMessage;
|
|
141
|
+
final User? user;
|
|
142
|
+
final Group? group;
|
|
143
|
+
const ThreadScreen({super.key, required this.parentMessage, this.user, this.group});
|
|
561
144
|
|
|
562
145
|
@override
|
|
563
146
|
Widget build(BuildContext context) {
|
|
564
|
-
if (_initError != null) {
|
|
565
|
-
return Scaffold(body: Center(child: Text('CometChat init failed: $_initError')));
|
|
566
|
-
}
|
|
567
|
-
if (!_isReady) {
|
|
568
|
-
return const Scaffold(body: Center(child: CircularProgressIndicator()));
|
|
569
|
-
}
|
|
570
|
-
// The bare Scaffold below does NOT apply the builder's theme palette.
|
|
571
|
-
// If this wrapper owns the MaterialApp, replicate the canonical's
|
|
572
|
-
// ThemeData (both light + dark) and navigatorKey — see note below.
|
|
573
147
|
return Scaffold(
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
148
|
+
// The thread screen's back affordance is the AppBar — CometChatThreadedHeader
|
|
149
|
+
// has NO onBack/onError param (the docs show one; it does not exist, DOCS-BACKLOG F5).
|
|
150
|
+
// A pushed route gets the back button automatically.
|
|
151
|
+
appBar: AppBar(title: const Text('Thread')),
|
|
152
|
+
body: SafeArea(
|
|
153
|
+
child: Column(
|
|
154
|
+
children: [
|
|
155
|
+
CometChatThreadedHeader( // note the 'ed' — see the map above
|
|
156
|
+
parentMessage: parentMessage, // NOT `message:` (DOCS-BACKLOG F1)
|
|
157
|
+
loggedInUser: CometChatUIKit.loggedInUser!, // required
|
|
158
|
+
),
|
|
159
|
+
Expanded(
|
|
160
|
+
child: CometChatMessageList(
|
|
161
|
+
user: user, group: group, parentMessageId: parentMessage.id,
|
|
162
|
+
),
|
|
163
|
+
),
|
|
164
|
+
CometChatMessageComposer(
|
|
165
|
+
user: user, group: group, parentMessageId: parentMessage.id,
|
|
166
|
+
),
|
|
167
|
+
],
|
|
579
168
|
),
|
|
580
169
|
),
|
|
581
170
|
);
|
|
582
171
|
}
|
|
583
172
|
}
|
|
584
173
|
```
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
)
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
`ChatBuilder.launchBuilder(context)` opens the builder's login / dashboard flow; once a user is logged in, the package's internal navigation handles conversations → messages.
|
|
620
|
-
|
|
621
|
-
For direct deep-links into a specific user or group thread (skipping the dashboard), use:
|
|
622
|
-
|
|
623
|
-
```dart
|
|
624
|
-
ChatBuilder.launchMessages(context: context, user: user);
|
|
625
|
-
ChatBuilder.launchMessages(context: context, group: group);
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
These are the two public entry points the `chat_builder` package exposes — see `chat_builder/lib/builder/chat_builder.dart` (inside the Flutter Visual Builder ZIP at https://preview.cometchat.com/downloads/cometchat-builder-flutter.zip).
|
|
629
|
-
|
|
630
|
-
On `^6.0.1`, any `Scaffold` whose body chain reaches `CometChatMessageComposer` should use `resizeToAvoidBottomInset: true` (or omit it — `true` is the default), because the composer clamps the keyboard height to `viewInsets` (ENG-34434). See this file's `SCAFFOLD_NO_RESIZE` rule — `false` is only the pre-6.0.1 stopgap.
|
|
631
|
-
|
|
632
|
-
### Calls + builder
|
|
633
|
-
|
|
634
|
-
If any `VoiceAndVideoCalling.*` flag is enabled in the builder settings (e.g. `VoiceAndVideoCalling.oneOnOneVoiceCalling` — there is NO `CometChatBuilderSettings` type; the canonical app uses plain static-field holders like `VoiceAndVideoCalling`/`CoreMessagingExperience` in `builder_settings.dart`), the `chat_builder` package handles incoming/outgoing call surfaces internally (it ships its own call routes). External wiring still required:
|
|
635
|
-
1. Add `cometchat_calls_uikit` to `pubspec.yaml`
|
|
636
|
-
2. iOS `Info.plist` + Android `AndroidManifest.xml` permissions per `cometchat-flutter-v6-calls`
|
|
637
|
-
3. `navigatorKey: CallNavigationContext.navigatorKey` on the root `MaterialApp` — kit 6.0.1 requires this for incoming-call routing (Bug 1; see `cometchat-flutter-v6-calls` §1.7). Note the canonical wires this **unconditionally** in `ChatBuilder.createApp()` (it does NOT gate on whether calls are enabled), and the "Alternative: host-app wrapper" guidance above does the same — so if you mounted `ChatBuilder.createApp()` or followed that MaterialApp template, this is already in place
|
|
638
|
-
4. Push wiring — defer to `cometchat-flutter-v6-push`. The real token-registration API is `CometChatNotifications.registerPushToken(PushPlatforms.FCM_FLUTTER_ANDROID, fcmToken: …)`; a class named `PNRegistry` does **not** exist anywhere in the SDK or UI Kit (verified against `cometchat_sdk/lib/notification/main/cometchat_notifications.dart` 2026-06-03 — supersedes the inverted [[project_sdk_symbol_audit_2026_05_14]] claim)
|
|
639
|
-
5. **6.0.1 GA status:** the beta2 outgoing→in-call transition bug is FIXED in 6.0.1 ([[project_v6_flutter_calls_partial]]). V6 calls now work end-to-end once the navigatorKey line in step 3 is in place — V5 is no longer required for calls.
|
|
640
|
-
|
|
641
|
-
### What is NOT honored in v1
|
|
642
|
-
|
|
643
|
-
Skills emits a launch-button trigger, not the full multi-tab layout the `chat_builder` package's internal `Dashboard` provides. Customers get the dashboard once they tap "Open chat" — but the host-app surface is intentionally minimal so Step 3c placement (route, tab, dialog) can decide the mount shape. Chat-feature toggles ARE honored via the builder JSON. **Theme color + typography are honored ONLY if the mounted root is `ChatBuilder.createApp()` (or a `MaterialApp` that replicates its `CometChatColorPalette` `ThemeData` extension + `fontFamily`)** — the bare-`Scaffold` wrapper above does NOT apply that palette, so on that path the kit falls back to default colors. See the "Alternative: host-app wrapper" guidance for the exact `ThemeData` wiring. For deep customization beyond what the builder JSON allows, fall back to the code-driven path (see this file's standard placement pattern) and skip `chat_builder` entirely.
|
|
174
|
+
> **SIZE it the mobile way — `references/layout.md`.** The kit's list widgets expand to fill their parent, so the failure mode here is an **unbounded height** error or a collapsed list, and the fix is always the same: give the list a bounded box (`Expanded`/`Flexible` inside a `Column`, or a sized parent) instead of letting content drive it. Never nest the surface in an unbounded `SingleChildScrollView`/`Column` without `Expanded`.
|
|
175
|
+
> **Match the data scope to the REQUEST.** Real apps ship seeded groups, so a plain `CometChatConversations` lists both 1:1s and groups. A **DM-only** ask scopes the list to user conversations via `conversationsRequestBuilder`; a **groups-only** app scopes to groups; a generic "add chat" keeps BOTH. Reuse the builder — never hand-roll a client-side filter, and don't add a Groups tab to a 1:1-only app.
|
|
176
|
+
> **Prod auth:** mint a per-user auth token server-side and call `loginWithAuthToken` — the Auth Key is dev-only (`references/lifecycle.md`).
|
|
177
|
+
|
|
178
|
+
## Growing on request
|
|
179
|
+
Add each only when asked: **Users / Groups / Calls tabs** (`CometChatUsers` · `CometChatGroups` · `CometChatCallLogs`) · **group details** (`CometChatGroupMembers` + `CometChatChangeScope`) · **calls** (→ `-calls`; incoming calls = only `navigatorKey: CallNavigationContext.navigatorKey` on the root `MaterialApp` — never mount `CometChatIncomingCall` yourself, that doubles the kit's overlay) · **features** (→ `-features`). The full tab-based app is the union of these — recipe in `-placement`. A scoped-DOWN ask (chat tab, bottom sheet, embedded panel) → the matching `-placement` variant.
|
|
180
|
+
|
|
181
|
+
## Deep references (load ONLY when the task needs them)
|
|
182
|
+
- `setup-credentials.md` — detect signals · version_conflict · dashboard creds · the settings asset.
|
|
183
|
+
- `lifecycle.md` — init-once + hot restart · gating the first frame · prod auth-token · logout.
|
|
184
|
+
- `layout.md` — mobile sizing (bounded height · `Expanded` · SafeArea · keyboard).
|
|
185
|
+
- `docs-map.md` — intent → live doc page (component twins **+ the SDK-docs section**) · DOCS-GAP protocol · the pages that are wrong.
|
|
186
|
+
- `anti-patterns.md` — v5 carry-overs · unbounded height · render-before-login · the two-barrel trap.
|
|
187
|
+
- `troubleshooting.md` — symptom → cause → fix.
|
|
188
|
+
|
|
189
|
+
## Common pitfalls (top 5 — full list in `references/anti-patterns.md`)
|
|
190
|
+
- **version_conflict** (v5 installed) · **wrong Region** · **Auth Key shipped to prod** · **rendering a widget before `login` succeeds**.
|
|
191
|
+
- **Emitting v5 architecture into a v6 app.** v6 REMOVED the extension pattern — no `UIKitSettings.extensions`, no `CometChatUIKitChatExtensions`, no `DataSource`/`ChatConfigurator`/`*ExtensionDecorator`, no `CometChatUIKit.getDataSource()`. Dashboard-enabled extensions surface **automatically** with zero client code. Also gone: the v5 combined shells (`CometChatConversationsWithMessages`, `CometChatUsersWithMessages`, `CometChatMessages`, `CometChatUI`) — v6 has no shell widget; the host composes screens. Full map: `cometchat-flutter-v6-migration`.
|
|
192
|
+
- **Trusting the docs on the `[verified]` signatures above.** The thread-header params, `onThreadRepliesClick`, and the search callbacks were wrong on the live pages (`DOCS-BACKLOG.md` PART 4 F1/F2/F3/F5) — **all four are now corrected upstream** (re-verified against `cometchat/docs`@`2ebb1db`, 2026-09-09), so the `[verified]` names now agree with the pages; keep them. `initFromSettings` is different: it is deliberately undocumented and stays that way (F4 WONTFIX), so this skill is its only reference.
|
|
193
|
+
|
|
194
|
+
## Verify it works
|
|
195
|
+
Run the app: `init` then `login` both hit `onSuccess` → the conversations screen renders **full-size** (no sliver, no unbounded-height exception) → tap a conversation → messages send/receive → **"reply in thread" opens the thread screen and back returns** → the search field pushes search, a result navigates, back pops → the composer stays visible with the keyboard open → every pushed screen pops back. Blank screen ⇒ rendered before `login` resolved, or wrong Region/App ID. No bounded height, no thread wiring, or a dead search field ⇒ **under-delivery**. Tab-based app ⇒ verify per `-placement`.
|
|
196
|
+
> Build the feature; do **not** write tests or run a test framework unless asked (`RULES.md`) — the above is an advisory human pass.
|
|
197
|
+
|
|
198
|
+
## Explain what you built (REQUIRED close — `RULES.md` §19)
|
|
199
|
+
Don't end on a silent code dump. Briefly: **(1) what I wired** (3–5 bullets, NAME the files); **(2) decisions & why**, flagging dev-only AS dev-only (Auth Key → server token for prod; the `<uid>`); **(3) what I did NOT touch** (additive — routing/state/theme intact). Then offer THREE options as a selectable choice and **WAIT** for the pick:
|
|
200
|
+
- **① Add another feature** — first check what's already wired, and ASK which dashboard extensions are already on (you can't read per-app state). Suggest 3–4 that are neither (**calls · push · polls · stickers · translation · AI smart replies · moderation**). **Never suggest reactions, mentions, quoted reply or threads — they are ON by default in v6**; offer to customize them instead. → `-features` / `-calls`.
|
|
201
|
+
- **② Customize theming** — ask for a brand/preset theme or talk through options → `-customization`.
|
|
202
|
+
- **③ Test it manually** — do NOTHING further; hand it back.
|
|
203
|
+
|
|
204
|
+
A capability not in this pack: say so honestly + link CometChat's docs.
|