[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MF3RS5AX52FH592FQ8PRTT":3,"skill-same:01M6MF3RS5AX52FH592FQ8PRTT":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6MF3RS5AX52FH592FQ8PRTT","cometchat-android-v6-compose-placement",null,"Where the CometChat Android v6 chat UI goes in a Jetpack Compose app — the default conversations→message NavHost flow, growing to the tab-based app (chats\u002Fusers\u002Fgroups\u002Fcalls + detail, thread and search routes + incoming calls), a single one-to-one screen, or chat embedded in an existing composable, with a correct back stack and IME handling. Triggers: 'cometchat compose navigation', 'chat screen navhost', 'tab based chat compose', 'embed cometchat in a composable', 'full chat app jetpack compose'.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-android-v6-compose-placement\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"cometchat android v6 compose placement","cometchat","compose","android","stack","goes","full","ui","verified","flow","screen","layout","message","jvm","jetpack","chat ui","default","search","conversations","app","back","2026-11-10 10:12:30",false,"---\nname: cometchat-android-v6-compose-placement\ndescription: \"Where the CometChat Android v6 chat UI goes in a Jetpack Compose app — the default conversations→message NavHost flow, growing to the tab-based app (chats\u002Fusers\u002Fgroups\u002Fcalls + detail, thread and search routes + incoming calls), a single one-to-one screen, or chat embedded in an existing composable, with a correct back stack and IME handling. Triggers: 'cometchat compose navigation', 'chat screen navhost', 'tab based chat compose', 'embed cometchat in a composable', 'full chat app jetpack compose'.\"\nlicense: \"MIT\"\ncompatibility: \"Android minSdk >=28; compileSdk >=36; Kotlin >=2.1; AGP >=8.9.1; JVM target 11; com.cometchat:chatuikit-compose-android ^6 (Jetpack Compose cohort) — 6.1.x, verified 6.1.1; com.cometchat:chat-sdk-android ^5\"\nmetadata:\n  author: \"CometChat\"\n  version: \"1.0.0\"\n  tags: \"cometchat android placement layout v6 compose navhost scaffold\"\n---\n\n> **Ground truth:** catalog `android-v6.json` + `contracts.android-v6.json` (`core-chat-surface`, `chat-experience`) + the docs recipes (`conversation-message-view`, `tab-based-chat`, `one-to-one-chat` — Compose tab). Param shapes verified against the INSTALLED 6.0.5 Compose source.\n>\n> ⚠️ **Jetpack Compose cohort.** Screens are composables on a `NavHost`. The Views cohort (Activities + XML) is a separate skill.\n\n## Companion skills (read first)\n- `cometchat-android-v6-core` — install, credentials, `initFromSettings → login → render`, and **`references\u002Flayout.md`** (the ONE sizing standard). Sizing rules live THERE.\n- `cometchat-android-v6-compose-components` — the param conventions (`onX` \u002F `hideX` \u002F `@Composable` slots).\n\n## Use this skill when\n\"add a chat route to my NavHost\", \"build the full chat app in Compose\", \"open a chat screen for this user\", \"embed the conversation list in an existing composable\", \"the composer is under the keyboard\".\n\n## Prerequisites & install\n\n> ⚠️ **Build setup (same for Compose):** `android.useAndroidX=true` in `gradle.properties`. On 6.1.1 that's all: the POMs carry the `annotations-java5` exclusion and chat-sdk 5.0.7 is all-AndroidX (verified: a clean Compose app builds with no exclude and Jetifier off). On 6.0.x you ALSO need `configurations.all { exclude(group = \"org.jetbrains\", module = \"annotations-java5\") }` + `android.enableJetifier=true`, or the FIRST build fails (~40 `Duplicate class` errors via `chatuikit-core-android`). Full block: `cometchat-android-v6-core` §Prerequisites & install.\nSame kit + `initFromSettings → login` gate as `core` — **no chat route is shown before login resolves**; gate the NavHost (or the start destination) on it. Compose cohort artifact only.\n\n## The rule that governs every layout: one screen per route\nCompose composes by **navigation**, not side-by-side panes. List, message, thread and search are separate `NavHost` destinations with a real back stack. Never build a web-style two-pane split on a phone.\n\n**Add Navigation Compose — the kit does not pull it in.** Every placement below uses `NavHost` \u002F `rememberNavController`; without the dependency the app fails with `Unresolved reference: rememberNavController`:\n```kotlin\n\u002F\u002F app\u002Fbuild.gradle.kts — 2.8.0 matches the kit's compose-bom 2024.09.00 (what the pack's Compose harness builds with)\nimplementation(\"androidx.navigation:navigation-compose:2.8.0\")\n```\n\n## Placement 1 — conversations → messages (the default)\nThe `core-chat-surface` contract. `core` carries the full code; the structure:\n\n```kotlin\n\u002F\u002F Two NavHost destinations, NOT an if\u002Felse swap — see the ⚠️ note below (the default surface\n\u002F\u002F includes threads). The selection is hoisted above the NavHost; Placement 3 shows the\n\u002F\u002F process-death-safe variant (route args + re-fetch by uid\u002Fguid).\n@Composable\nfun ChatApp() {\n    val navController = rememberNavController()\n    var selectedUser by remember { mutableStateOf\u003CUser?>(null) }\n    var selectedGroup by remember { mutableStateOf\u003CGroup?>(null) }\n\n    NavHost(navController, startDestination = \"conversations\") {\n        composable(\"conversations\") {\n            CometChatConversations(\n                modifier = Modifier.fillMaxSize(),\n                title = \"Chats\",\n                onItemClick = { conversation ->\n                    when (val entity = conversation.conversationWith) {\n                        is User -> { selectedUser = entity; selectedGroup = null }\n                        is Group -> { selectedGroup = entity; selectedUser = null }\n                    }\n                    navController.navigate(\"messages\")\n                },\n            )\n        }\n        composable(\"messages\") {\n            MessageScreen(selectedUser, selectedGroup) { navController.popBackStack() }\n        }\n        \u002F\u002F + composable(\"thread\") { ... } — its own destination (Thread route, Placement 3)\n    }\n}\n```\n```kotlin\n@Composable\nfun MessageScreen(user: User?, group: Group?, onBack: () -> Unit) {\n    Scaffold(contentWindowInsets = WindowInsets.statusBars) { padding ->\n        Column(\n            modifier = Modifier.fillMaxSize().padding(padding)\n                .consumeWindowInsets(padding).navigationBarsPadding().imePadding()\n        ) {\n            CometChatMessageHeader(\n                modifier = Modifier.fillMaxWidth(),\n                user = user, group = group,\n                hideBackButton = false, onBackPress = onBack,\n            )\n            CometChatMessageList(\n                modifier = Modifier.fillMaxWidth().weight(1f),   \u002F\u002F weight(1f) = the list scrolls\n                user = user, group = group,\n            )\n            CometChatMessageComposer(modifier = Modifier.fillMaxWidth(), user = user, group = group)\n        }\n    }\n}\n```\n> ⚠️ **Use a `NavHost`, not `if\u002Felse` — mandatory as soon as a THREAD is in play (the default\n> surface includes one), so Placement 1 already uses it. This is correctness, not polish.** `CometChatMessageList` resolves its `CometChatMessageListViewModel` from the enclosing\n> `ViewModelStoreOwner`. In one `if\u002Felse` composition scope both the main list and the thread list\n> share the Activity's store, so the thread REUSES the main chat's ViewModel, `parentMessageId` is\n> inert, and the thread screen silently renders the ENTIRE conversation — no error, no warning\n> (verified on device, 6.0.6). Each `NavHost` destination is its own `ViewModelStoreOwner`, which\n> is what makes the thread scope hold. A production app also gets a real back stack from it. Pass `User`\u002F`Group` (both `Parcelable`) or re-fetch by uid\u002Fguid on the destination (Placement 5's `getUser`\u002F`getGroup`) — safer across process death.\n\n**`weight(1f)` on the list is load-bearing**: without it the list is unbounded and the composer is pushed off-screen. `imePadding()` keeps the composer above the keyboard.\n\n## Placement 2 — a chat tab in an existing app\nPut `CometChatConversations` inside your existing `Scaffold` + `NavigationBar` tab. The tab shows the LIST; tapping a row navigates to the message route **above** the bottom bar (full-screen), so the composer isn't fighting the nav bar. Reuse the host's `NavHost` — additive, never rewrite the graph.\n\n## Placement 3 — grow to the full app (the tab-based recipe)\nThe `chat-experience` contract: a `NavigationBar` over four destinations — **Chats** (`CometChatConversations`) · **Users** (`CometChatUsers`) · **Groups** (`CometChatGroups`) · **Calls** (`CometChatCallLogs`) — each item click routing into the same message screen. Then, as the plan names them:\n\n```kotlin\n\u002F\u002F Four-tab navigation — each tab hosts one list component; rows route into the message screen.\n\u002F\u002F Every route you navigate to MUST be declared here: a bare \"messages\u002F{id}\" with no matching\n\u002F\u002F composable throws IllegalArgumentException on the first tap. Conversations\u002FUsers\u002FGroups all\n\u002F\u002F resolve to the same two message destinations, keyed user-vs-group.\n@Composable\nfun AppNavigation(navController: NavHostController) {\n    NavHost(navController, startDestination = \"chats\") {\n        composable(\"chats\") {\n            CometChatConversations(onItemClick = { conv ->\n                when (val e = conv.conversationWith) {   \u002F\u002F a conversation is WITH a User or a Group\n                    is User  -> navController.navigate(\"messages\u002Fu\u002F${e.uid}\")\n                    is Group -> navController.navigate(\"messages\u002Fg\u002F${e.guid}\")\n                }\n            })\n        }\n        composable(\"users\")  { CometChatUsers(onItemClick  = { user  -> navController.navigate(\"messages\u002Fu\u002F${user.uid}\") }) }\n        composable(\"groups\") { CometChatGroups(onItemClick = { group -> navController.navigate(\"messages\u002Fg\u002F${group.guid}\") }) }\n        composable(\"calls\")  { CometChatCallLogs() }\n\n        \u002F\u002F The message destination — re-fetch the entity by id (safe across process death), then reuse\n        \u002F\u002F MessageScreen from Placement 1. rememberUser\u002FrememberGroup wrap the verified Placement-5 getters.\n        composable(\"messages\u002Fu\u002F{uid}\") { back ->\n            rememberUser(back.arguments?.getString(\"uid\"))?.let { user ->\n                MessageScreen(user = user, group = null) { navController.popBackStack() }\n            }\n        }\n        composable(\"messages\u002Fg\u002F{guid}\") { back ->\n            rememberGroup(back.arguments?.getString(\"guid\"))?.let { group ->\n                MessageScreen(user = null, group = group) { navController.popBackStack() }\n            }\n        }\n        composable(\"members\u002F{guid}\") { back ->\n            \u002F\u002F Group details: CometChatGroupMembers with built-in kick\u002Fban\u002Fscope actions\n            rememberGroup(back.arguments?.getString(\"guid\"))?.let { group ->\n                CometChatGroupMembers(group = group)\n            }\n        }\n    }\n}\n\n\u002F\u002F Re-fetch by id with the Chat SDK (the Placement-5 getters), surfaced to Compose via produceState.\n@Composable fun rememberUser(uid: String?): User? = produceState\u003CUser?>(null, uid) {\n    val id = uid ?: return@produceState\n    CometChat.getUser(id, object : CometChat.CallbackListener\u003CUser>() {\n        override fun onSuccess(u: User) { value = u }\n        override fun onError(e: CometChatException) { \u002F* SURFACE it — ERR_UID_NOT_FOUND must not dead-end *\u002F }\n    })\n}.value\n@Composable fun rememberGroup(guid: String?): Group? = produceState\u003CGroup?>(null, guid) {\n    val id = guid ?: return@produceState\n    CometChat.getGroup(id, object : CometChat.CallbackListener\u003CGroup>() {\n        override fun onSuccess(g: Group) { value = g }\n        override fun onError(e: CometChatException) { \u002F* SURFACE it *\u002F }\n    })\n}.value\n```\n\n> ⚠️ **A Groups tap is NOT a Conversations tap.** `CometChatGroups` lists groups the user may not\n> have joined; routing one straight to the message screen renders the kit's error state with a\n> live-but-dead composer (verified on device). Gate on membership (`group.isJoined` — the field\n> `hasJoined` is private; `isJoined()` is the accessor) and join first when false —\n> `CometChat.joinGroup(guid, groupType, password, CallbackListener\u003CGroup>)` — the listener is REQUIRED (4 params), prompting for the password when `groupType` is\n> `CometChatConstants.GROUP_TYPE_PASSWORD`. Only a Conversations row is guaranteed joined, because\n> a conversation exists only once you are in it.\n\n- **Detail routes** — user detail (block\u002Funblock) and group detail via `CometChatGroupMembers` (kick\u002Fban\u002Fscope, role-gated).\n- **Thread route** — note Compose takes the parent as **params**, not setters:\n```kotlin\nCometChatThreadHeader(modifier = Modifier.fillMaxWidth(), parentMessage = parent)\nCometChatMessageList(\n    modifier = Modifier.fillMaxWidth().weight(1f),\n    user = user, group = group,          \u002F\u002F the SAME target, or replies silently never send\n    parentMessageId = parent.id,\n)\nCometChatMessageComposer(\n    modifier = Modifier.fillMaxWidth(),\n    user = user, group = group, parentMessageId = parent.id,\n)\n```\n- **Search route** — (import `com.cometchat.uikit.core.constants.SearchScope`) `CometChatSearch(searchScopes = listOf(SearchScope.CONVERSATIONS, SearchScope.MESSAGES), uid = ..., guid = ..., onConversationClick = ..., onMessageClick = ..., onBackPress = ...)`. Omit `uid`\u002F`guid` for global search; pass one to scope to the open chat.\n- **Incoming calls at app level** — `CometChatIncomingCall` driven by a global call listener, hoisted above the NavHost so a call surfaces from any tab (→ `cometchat-android-v6-calls`).\n\nEach tab keeps its own back stack (`navController` per tab, or `saveState`\u002F`restoreState` on the bottom-nav items).\n\n## Placement 4 — embed in an existing composable\nGive the component a bounded box: `Modifier.weight(1f)` inside a `Column`, `Modifier.height(360.dp)`, or `fillMaxSize()` in its own pane. **Never place it in an unbounded parent** (a `Column` with `verticalScroll`, or no weight) — the kit fills what you give it, and unbounded means nothing. Never nest `CometChatMessageList` inside another scrollable.\n\n## Placement 5 — deep entry from an arbitrary screen (known UID\u002FGUID)\n\"Open a chat with THIS user\" from one of your own screens (an order, an article, a ticket): gate on the same init\u002Flogin, resolve the entity with the Chat SDK, then navigate to the SAME message destination from Placement 1 with it (docs: `core` → `references\u002Fdocs-map.md` → `one-to-one-chat`):\n```kotlin\nCometChat.getUser(uid, object : CometChat.CallbackListener\u003CUser>() {   \u002F\u002F groups: CometChat.getGroup(guid, ...)\n    override fun onSuccess(user: User) {\n        navController.navigate(messageRouteFor(user))   \u002F\u002F or Placement 1: set selectedUser, then navigate(\"messages\")\n    }\n    override fun onError(e: CometChatException) { \u002F* SURFACE it (snackbar) — ERR_UID_NOT_FOUND must not dead-end *\u002F }\n})\n```\nVerified in the installed SDK: `CometChat.getUser(@NonNull String, @NonNull CallbackListener\u003CUser>)` \u002F `CometChat.getGroup(@NonNull String, @NonNull CallbackListener\u003CGroup>)`.\n\n## Sizing and the keyboard\nOwned by `core\u002Freferences\u002Flayout.md`; the Compose specifics: `Scaffold(contentWindowInsets = WindowInsets.statusBars)` + `.consumeWindowInsets(padding)` + `.navigationBarsPadding()` + **`.imePadding()`**, and `enableEdgeToEdge()` in the host Activity. Missing `imePadding()` is the #1 Compose complaint (composer under the keyboard).\n\n## Navigation & back-stack discipline\nEvery route pops correctly: `onBackPress` → `navController.popBackStack()`; thread\u002Fsearch\u002Fdetail → back returns to the message route; predictive-back safe. Never re-`init`\u002F`login` per screen — that happened once at startup.\n\n## Common pitfalls\nShowing a chat route before login resolves · a swallowed `getUser`\u002F`getGroup` `onError` (Placement 5) · missing `weight(1f)` (composer pushed off-screen) · missing `imePadding()` · unbounded parent (renders nothing) · nesting the message list in a scrollable · thread route missing the `user`\u002F`group` target · using `setParentMessageId(...)` (that's the Views cohort — Compose takes `parentMessageId =`) · rebuilding the host's nav graph instead of adding routes.\n\n## Verify it works\nCompile: `.\u002Fgradlew :app:assembleDebug   # in YOUR app (native-fence.mjs is a pack-repo gate, not installed by the CLI)`. On device: list → tap → message screen for the right entity; system back returns; composer stays visible with the keyboard open; nothing under the system bars; thread and search open AND return; on the grown app each tab renders and an incoming call surfaces from any tab.\n","> **Ground truth:** catalog `android-v6.json` + `contracts.android-v6.json` (`core-chat-surface`, `chat-experience`) + the docs recipes (`conversation-message-view`, `tab-based-chat`, `one-to-one-chat` — Compose tab). Param shapes verified against the INSTALLED 6.0.5 Compose source.\n>\n> ⚠️ **Jetpack Compose cohort.** Screens are composables on a `NavHost`. The Views cohort (Activities + XML) is a separate skill.\n\n## Companion skills (read first)\n- `cometchat-android-v6-core` — install, credentials, `initFromSettings → login → render`, and **`references\u002Flayout.md`** (the ONE sizing standard). Sizing rules live THERE.\n- `cometchat-android-v6-compose-components` — the param conventions (`onX` \u002F `hideX` \u002F `@Composable` slots).\n\n## Use this skill when\n\"add a chat route to my NavHost\", \"build the full chat app in Compose\", \"open a chat screen for this user\", \"embed the conversation list in an existing composable\", \"the composer is under the keyboard\".\n\n## Prerequisites & install\n\n> ⚠️ **Build setup (same for Compose):** `android.useAndroidX=true` in `gradle.properties`. On 6.1.1 that's all: the POMs carry the `annotations-java5` exclusion and chat-sdk 5.0.7 is all-AndroidX (verified: a clean Compose app builds with no exclude and Jetifier off). On 6.0.x you ALSO need `configurations.all { exclude(group = \"org.jetbrains\", module = \"annotations-java5\") }` + `android.enableJetifier=true`, or the FIRST build fails (~40 `Duplicate class` errors via `chatuikit-core-android`). Full block: `cometchat-android-v6-core` §Prerequisites & install.\nSame kit + `initFromSettings → login` gate as `core` — **no chat route is shown before login resolves**; gate the NavHost (or the start destination) on it. Compose cohort artifact only.\n\n## The rule that governs every layout: one screen per route\nCompose composes by **navigation**, not side-by-side panes. List, message, thread and search are separate `NavHost` destinations with a real back stack. Never build a web-style two-pane split on a phone.\n\n**Add Navigation Compose — the kit does not pull it in.** Every placement below uses `NavHost` \u002F `rememberNavController`; without the dependency the app fails with `Unresolved reference: rememberNavController`:\n```kotlin\n\u002F\u002F app\u002Fbuild.gradle.kts — 2.8.0 matches the kit's compose-bom 2024.09.00 (what the pack's Compose harness builds with)\nimplementation(\"androidx.navigation:navigation-compose:2.8.0\")\n```\n\n## Placement 1 — conversations → messages (the default)\nThe `core-chat-surface` contract. `core` carries the full code; the structure:\n\n```kotlin\n\u002F\u002F Two NavHost destinations, NOT an if\u002Felse swap — see the ⚠️ note below (the default surface\n\u002F\u002F includes threads). The selection is hoisted above the NavHost; Placement 3 shows the\n\u002F\u002F process-death-safe variant (route args + re-fetch by uid\u002Fguid).\n@Composable\nfun ChatApp() {\n    val navController = rememberNavController()\n    var selectedUser by remember { mutableStateOf\u003CUser?>(null) }\n    var selectedGroup by remember { mutableStateOf\u003CGroup?>(null) }\n\n    NavHost(navController, startDestination = \"conversations\") {\n        composable(\"conversations\") {\n            CometChatConversations(\n                modifier = Modifier.fillMaxSize(),\n                title = \"Chats\",\n                onItemClick = { conversation ->\n                    when (val entity = conversation.conversationWith) {\n                        is User -> { selectedUser = entity; selectedGroup = null }\n                        is Group -> { selectedGroup = entity; selectedUser = null }\n                    }\n                    navController.navigate(\"messages\")\n                },\n            )\n        }\n        composable(\"messages\") {\n            MessageScreen(selectedUser, selectedGroup) { navController.popBackStack() }\n        }\n        \u002F\u002F + composable(\"thread\") { ... } — its own destination (Thread route, Placement 3)\n    }\n}\n```\n```kotlin\n@Composable\nfun MessageScreen(user: User?, group: Group?, onBack: () -> Unit) {\n    Scaffold(contentWindowInsets = WindowInsets.statusBars) { padding ->\n        Column(\n            modifier = Modifier.fillMaxSize().padding(padding)\n                .consumeWindowInsets(padding).navigationBarsPadding().imePadding()\n        ) {\n            CometChatMessageHeader(\n                modifier = Modifier.fillMaxWidth(),\n                user = user, group = group,\n                hideBackButton = false, onBackPress = onBack,\n            )\n            CometChatMessageList(\n                modifier = Modifier.fillMaxWidth().weight(1f),   \u002F\u002F weight(1f) = the list scrolls\n                user = user, group = group,\n            )\n            CometChatMessageComposer(modifier = Modifier.fillMaxWidth(), user = user, group = group)\n        }\n    }\n}\n```\n> ⚠️ **Use a `NavHost`, not `if\u002Felse` — mandatory as soon as a THREAD is in play (the default\n> surface includes one), so Placement 1 already uses it. This is correctness, not polish.** `CometChatMessageList` resolves its `CometChatMessageListViewModel` from the enclosing\n> `ViewModelStoreOwner`. In one `if\u002Felse` composition scope both the main list and the thread list\n> share the Activity's store, so the thread REUSES the main chat's ViewModel, `parentMessageId` is\n> inert, and the thread screen silently renders the ENTIRE conversation — no error, no warning\n> (verified on device, 6.0.6). Each `NavHost` destination is its own `ViewModelStoreOwner`, which\n> is what makes the thread scope hold. A production app also gets a real back stack from it. Pass `User`\u002F`Group` (both `Parcelable`) or re-fetch by uid\u002Fguid on the destination (Placement 5's `getUser`\u002F`getGroup`) — safer across process death.\n\n**`weight(1f)` on the list is load-bearing**: without it the list is unbounded and the composer is pushed off-screen. `imePadding()` keeps the composer above the keyboard.\n\n## Placement 2 — a chat tab in an existing app\nPut `CometChatConversations` inside your existing `Scaffold` + `NavigationBar` tab. The tab shows the LIST; tapping a row navigates to the message route **above** the bottom bar (full-screen), so the composer isn't fighting the nav bar. Reuse the host's `NavHost` — additive, never rewrite the graph.\n\n## Placement 3 — grow to the full app (the tab-based recipe)\nThe `chat-experience` contract: a `NavigationBar` over four destinations — **Chats** (`CometChatConversations`) · **Users** (`CometChatUsers`) · **Groups** (`CometChatGroups`) · **Calls** (`CometChatCallLogs`) — each item click routing into the same message screen. Then, as the plan names them:\n\n```kotlin\n\u002F\u002F Four-tab navigation — each tab hosts one list component; rows route into the message screen.\n\u002F\u002F Every route you navigate to MUST be declared here: a bare \"messages\u002F{id}\" with no matching\n\u002F\u002F composable throws IllegalArgumentException on the first tap. Conversations\u002FUsers\u002FGroups all\n\u002F\u002F resolve to the same two message destinations, keyed user-vs-group.\n@Composable\nfun AppNavigation(navController: NavHostController) {\n    NavHost(navController, startDestination = \"chats\") {\n        composable(\"chats\") {\n            CometChatConversations(onItemClick = { conv ->\n                when (val e = conv.conversationWith) {   \u002F\u002F a conversation is WITH a User or a Group\n                    is User  -> navController.navigate(\"messages\u002Fu\u002F${e.uid}\")\n                    is Group -> navController.navigate(\"messages\u002Fg\u002F${e.guid}\")\n                }\n            })\n        }\n        composable(\"users\")  { CometChatUsers(onItemClick  = { user  -> navController.navigate(\"messages\u002Fu\u002F${user.uid}\") }) }\n        composable(\"groups\") { CometChatGroups(onItemClick = { group -> navController.navigate(\"messages\u002Fg\u002F${group.guid}\") }) }\n        composable(\"calls\")  { CometChatCallLogs() }\n\n        \u002F\u002F The message destination — re-fetch the entity by id (safe across process death), then reuse\n        \u002F\u002F MessageScreen from Placement 1. rememberUser\u002FrememberGroup wrap the verified Placement-5 getters.\n        composable(\"messages\u002Fu\u002F{uid}\") { back ->\n            rememberUser(back.arguments?.getString(\"uid\"))?.let { user ->\n                MessageScreen(user = user, group = null) { navController.popBackStack() }\n            }\n        }\n        composable(\"messages\u002Fg\u002F{guid}\") { back ->\n            rememberGroup(back.arguments?.getString(\"guid\"))?.let { group ->\n                MessageScreen(user = null, group = group) { navController.popBackStack() }\n            }\n        }\n        composable(\"members\u002F{guid}\") { back ->\n            \u002F\u002F Group details: CometChatGroupMembers with built-in kick\u002Fban\u002Fscope actions\n            rememberGroup(back.arguments?.getString(\"guid\"))?.let { group ->\n                CometChatGroupMembers(group = group)\n            }\n        }\n    }\n}\n\n\u002F\u002F Re-fetch by id with the Chat SDK (the Placement-5 getters), surfaced to Compose via produceState.\n@Composable fun rememberUser(uid: String?): User? = produceState\u003CUser?>(null, uid) {\n    val id = uid ?: return@produceState\n    CometChat.getUser(id, object : CometChat.CallbackListener\u003CUser>() {\n        override fun onSuccess(u: User) { value = u }\n        override fun onError(e: CometChatException) { \u002F* SURFACE it — ERR_UID_NOT_FOUND must not dead-end *\u002F }\n    })\n}.value\n@Composable fun rememberGroup(guid: String?): Group? = produceState\u003CGroup?>(null, guid) {\n    val id = guid ?: return@produceState\n    CometChat.getGroup(id, object : CometChat.CallbackListener\u003CGroup>() {\n        override fun onSuccess(g: Group) { value = g }\n        override fun onError(e: CometChatException) { \u002F* SURFACE it *\u002F }\n    })\n}.value\n```\n\n> ⚠️ **A Groups tap is NOT a Conversations tap.** `CometChatGroups` lists groups the user may not\n> have joined; routing one straight to the message screen renders the kit's error state with a\n> live-but-dead composer (verified on device). Gate on membership (`group.isJoined` — the field\n> `hasJoined` is private; `isJoined()` is the accessor) and join first when false —\n> `CometChat.joinGroup(guid, groupType, password, CallbackListener\u003CGroup>)` — the listener is REQUIRED (4 params), prompting for the password when `groupType` is\n> `CometChatConstants.GROUP_TYPE_PASSWORD`. Only a Conversations row is guaranteed joined, because\n> a conversation exists only once you are in it.\n\n- **Detail routes** — user detail (block\u002Funblock) and group detail via `CometChatGroupMembers` (kick\u002Fban\u002Fscope, role-gated).\n- **Thread route** — note Compose takes the parent as **params**, not setters:\n```kotlin\nCometChatThreadHeader(modifier = Modifier.fillMaxWidth(), parentMessage = parent)\nCometChatMessageList(\n    modifier = Modifier.fillMaxWidth().weight(1f),\n    user = user, group = group,          \u002F\u002F the SAME target, or replies silently never send\n    parentMessageId = parent.id,\n)\nCometChatMessageComposer(\n    modifier = Modifier.fillMaxWidth(),\n    user = user, group = group, parentMessageId = parent.id,\n)\n```\n- **Search route** — (import `com.cometchat.uikit.core.constants.SearchScope`) `CometChatSearch(searchScopes = listOf(SearchScope.CONVERSATIONS, SearchScope.MESSAGES), uid = ..., guid = ..., onConversationClick = ..., onMessageClick = ..., onBackPress = ...)`. Omit `uid`\u002F`guid` for global search; pass one to scope to the open chat.\n- **Incoming calls at app level** — `CometChatIncomingCall` driven by a global call listener, hoisted above the NavHost so a call surfaces from any tab (→ `cometchat-android-v6-calls`).\n\nEach tab keeps its own back stack (`navController` per tab, or `saveState`\u002F`restoreState` on the bottom-nav items).\n\n## Placement 4 — embed in an existing composable\nGive the component a bounded box: `Modifier.weight(1f)` inside a `Column`, `Modifier.height(360.dp)`, or `fillMaxSize()` in its own pane. **Never place it in an unbounded parent** (a `Column` with `verticalScroll`, or no weight) — the kit fills what you give it, and unbounded means nothing. Never nest `CometChatMessageList` inside another scrollable.\n\n## Placement 5 — deep entry from an arbitrary screen (known UID\u002FGUID)\n\"Open a chat with THIS user\" from one of your own screens (an order, an article, a ticket): gate on the same init\u002Flogin, resolve the entity with the Chat SDK, then navigate to the SAME message destination from Placement 1 with it (docs: `core` → `references\u002Fdocs-map.md` → `one-to-one-chat`):\n```kotlin\nCometChat.getUser(uid, object : CometChat.CallbackListener\u003CUser>() {   \u002F\u002F groups: CometChat.getGroup(guid, ...)\n    override fun onSuccess(user: User) {\n        navController.navigate(messageRouteFor(user))   \u002F\u002F or Placement 1: set selectedUser, then navigate(\"messages\")\n    }\n    override fun onError(e: CometChatException) { \u002F* SURFACE it (snackbar) — ERR_UID_NOT_FOUND must not dead-end *\u002F }\n})\n```\nVerified in the installed SDK: `CometChat.getUser(@NonNull String, @NonNull CallbackListener\u003CUser>)` \u002F `CometChat.getGroup(@NonNull String, @NonNull CallbackListener\u003CGroup>)`.\n\n## Sizing and the keyboard\nOwned by `core\u002Freferences\u002Flayout.md`; the Compose specifics: `Scaffold(contentWindowInsets = WindowInsets.statusBars)` + `.consumeWindowInsets(padding)` + `.navigationBarsPadding()` + **`.imePadding()`**, and `enableEdgeToEdge()` in the host Activity. Missing `imePadding()` is the #1 Compose complaint (composer under the keyboard).\n\n## Navigation & back-stack discipline\nEvery route pops correctly: `onBackPress` → `navController.popBackStack()`; thread\u002Fsearch\u002Fdetail → back returns to the message route; predictive-back safe. Never re-`init`\u002F`login` per screen — that happened once at startup.\n\n## Common pitfalls\nShowing a chat route before login resolves · a swallowed `getUser`\u002F`getGroup` `onError` (Placement 5) · missing `weight(1f)` (composer pushed off-screen) · missing `imePadding()` · unbounded parent (renders nothing) · nesting the message list in a scrollable · thread route missing the `user`\u002F`group` target · using `setParentMessageId(...)` (that's the Views cohort — Compose takes `parentMessageId =`) · rebuilding the host's nav graph instead of adding routes.\n\n## Verify it works\nCompile: `.\u002Fgradlew :app:assembleDebug   # in YOUR app (native-fence.mjs is a pack-repo gate, not installed by the CLI)`. On device: list → tap → message screen for the right entity; system back returns; composer stays visible with the keyboard open; nothing under the system bars; thread and search open AND return; on the grown app each tab renders and an incoming call surfaces from any tab.\n",{"name":5,"license":15,"metadata":45,"description":7,"compatibility":49},{"tags":46,"author":47,"version":48},"cometchat android placement layout v6 compose navhost scaffold","CometChat","1.0.0","Android minSdk >=28; compileSdk >=36; Kotlin >=2.1; AGP >=8.9.1; JVM target 11; com.cometchat:chatuikit-compose-android ^6 (Jetpack Compose cohort) — 6.1.x, verified 6.1.1; com.cometchat:chat-sdk-android ^5","main","cebc3dce495d7eb80d3b1d5841f877a4a92e162d","plugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-android-v6-compose-placement",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-android-v6-compose-placement",{"tool":66,"command":67},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-android-v6-compose-placement",{"tool":69,"command":70},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-android-v6-compose-placement","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-android-v6-compose-placement\u002FSKILL.md",true,[],[75,84,92,100,108,116],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":83},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":83},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":83},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":83},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":83},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]