Android docs audit — UI Kit v6 + Chat SDK v5
Every entry below was found by mechanically diffing the docs against the shipped source, not by reading. Each row names the source file + line that proves it. Raised while building the Android skill pack (Linear ENG-38207).Source of truth used
Method: extract every
.setX(...) call from each page’s Kotlin (XML Views) tab → check it
against every fun declared in the three kit modules → subtract Android-framework methods. 120
documented setters checked; the misses below are what remained.
Reproduce: python3 extractor in the ENG-38207 working notes; re-runnable against any kit tag.
A. Wrong method name — documented call does not compile
B. Wrong signature — right name, wrong arity/params
C. Removed API — page documents a v5 surface that no longer ships
D. Stale guidance — compiles, but teaches the wrong default
E. Missing artifacts
New findings (added during the fix pass)
Fix log — all applied on this branch
Behaviour gaps (found by the SKILL⇄DOCS⇄SOURCE audit, not by compiling)
Tracked with the skill-side fixes in
cometchat-skills/THREE-WAY-AUDIT.md.
Round 2 — the three-way audit (skills ↔ docs ↔ source)
test-suite/scripts/three-way-audit.mjs in the skills repo compares three independent claims about
the same API. Source is the arbiter — the installed UI Kit, Chat SDK, Calls SDK and Cards SDK.
Phantoms fixed in this round
False positives the audit itself had to learn (recorded so the next platform doesn’t repeat them)
- Calls SDK / Cards SDK.
setCallCategory,setCardSchema,setThemeMode,setActionCallbackare real — they ship incalls-sdk-android/cards-android, which the first pass didn’t scan. Without that, correct docs would have been “fixed” into incorrect ones. - V5 “before” blocks. A
```java title="V5"fence inupgrading-from-v5should name removed APIs; the audit now skips them. - Comment lines. Warning that “X was removed” is documentation, not a claim X exists.
sdk/android/v5/is the CURRENT SDK. An early version of the version filter excluded it and silently audited zero SDK pages — which is why R3–R5 were invisible in round 1.
Standing result
PHANTOM in SKILLS = 0 — no Android skill teaches an API that does not ship. The only remaining
docs phantoms are the four in message-template.mdx, the page already flagged (C1) for rewrite.
Skill gaps (not defects)
The audit reports ~216 real APIs the docs teach that the skills never name. That is the intended bake-vs-fetch split: skills bake the hot path and route everything else to the docs.md twin
via core/references/docs-map.md. Listed for visibility, not as a backlog.
Round 3 — the fresh-app run (built + executed on an emulator)
A NEW app was scaffolded from nothing, following only the skills, installed on a booted emulator and driven by hand. Static audits cannot find these: they only appear when the app runs.
Verified working after the fixes, on device:
init OK → login OK → conversations list renders
with real data (avatars, unread badges, receipts, presence) → tap opens the message screen for the
right entity → back returns → keyboard opens with the composer above it → a message sends and is
delivered. The cometchatPrimaryColor from the customization skill is visibly applied.
F1 and F2 are worth raising with the kit team too: F1 is a dependency-hygiene issue in the published
artifact (a consumer should not need to know about prism4j), and F2 means every published Android
recipe produces a visibly broken status bar.
Round 4 — component-wise acceptance on the emulator
Each drop-in was hosted alone, sized exactly as the skills prescribe, and driven on a booted emulator. Evidence is the UI hierarchy (uiautomator dump), not a screenshot impression.
C-1 — CometChatCallLogs requires the Calls SDK and calling to be initialized (DOCS gap)
Neither is the UI Kit misbehaving: a missing library cannot work, and the Calls SDK’s message names
its own fix. The defect is that
call-logs.mdx documented the component with zero mention that the
Calls SDK is required at all — a reader following only that page hits a runtime failure with no
warning. It compiles fine in every state, so no build gate can warn either.
The non-obvious part worth documenting: with the UI Kit you do not call CometChatCalls.init()
yourself — initFromSettings does it, but only when "uiKit": { "enableCalling": true } is set
in cometchat-settings.json. A developer who adds the artifact and expects it to work will hit
state 2 and has no reason to connect it to a JSON flag they never set.
(An earlier revision of this audit framed C-1 as a kit defect and recommended escalation. That was
wrong — the exception originates in the Calls SDK as intentional guidance, and a missing dependency
failing is correct behaviour. Corrected: docs-only.)
Round 5 — the Compose fresh-app run
A second fresh app, Jetpack Compose cohort, built from the…-compose-* skills only and run on the
emulator. The Compose recipes compiled first time and rendered correctly — theming
(lightColorScheme(primary = …)), Scaffold(contentWindowInsets = WindowInsets.statusBars),
weight(1f) + imePadding() all behaved as the skills describe. One severe finding, and it is
not Compose-specific — it sits in the shared init path:
F4 — enableCalling: true without the Calls artifact kills the app at LAUNCH
initFromSettings auto-initializes the Calls SDK when the flag is set. Without the dependency the
throw lands in onCreate, before any UI renders — so the symptom (app won’t start at all) is
maximally distant from the cause (a boolean in a JSON file). Setting enableCalling: false with no
other change: init OK → login OK, app runs.
This is worse than C-1: C-1 fails when you use a calling component; F4 fails when you launch the
app, whether or not calling is ever used. It is trivially hit by copying a settings file between
projects — which is exactly how it was found.
The two directions, together:
Round 6 — Chat SDK v5 device run (headless, no UI Kit)
A third fresh app depending on onlycom.cometchat:chat-sdk-android:5.0.+, built from
cometchat-android-v5-sdk alone. Verified on the emulator:
CometChat.initFromSettings reads the same assets/cometchat-settings.json as the UI
Kit — confirmed working without the UI Kit present.
S-3 — the SDK skill conflated two DIFFERENT login overloads (SKILL bug, now fixed)
The shipped SDK has:
The skill wrote it as
login(uid, authKeyOrToken, …), which reads as “put either credential in the
middle slot”. Following that for the production path passes a token where an apiKey is expected
— the wrong overload, and it fails at auth rather than at compile time. Fixed: both overloads are
now named explicitly, with the trap in Common pitfalls. Docs were correct here; the skill was not.
Round 7 — found by RUNNING the review harness on a device
The review harness executed on a booted emulator for the first time (skills repoAUDIT-086).
The first kit view it inflated crashed, and the cause is a documentation gap:
Scoped to Views on purpose.
getting-started-jetpack was deliberately left alone: the Compose
cohort themes through the CometChatTheme composable
(chatuikit-compose/.../theme/Theme.kt:13), so it does not inflate Material Views and the XML
theme requirement does not apply to it. Adding the same warning there would have been a new docs
bug, not a fix.
Reproduced, then fixed, in the harness itself: test-suite/harness/android ran on
Theme.AppCompat.DayNight.NoActionBar and every emit died at attach() with exactly this
exception; it now inherits CometChatTheme.DayNight like any integrating app must.
ROOT CAUSE — a v5 UI Kit checkout is vendored inside the docs repo
/.cometchat-uikit-android/ is a shallow clone of cometchat/cometchat-uikit-android at tag
v5.2.9 (26 MB, its own .git, untracked and NOT gitignored). It is a working artifact, not docs
content — and it is the wrong major for the v6 pages it sits beside.
Every “phantom API” found in the v6 docs exists in that v5 checkout:
6 of 6. These pages are not randomly wrong — they are correctly documenting v5 under a v6
heading. The most economical explanation is that they were written or verified against this
checkout. (Correlation + physical presence in the repo, not proof of intent — but the pattern is
exact, and the fix is the same either way.)
Note the v5 module layout differs too: this clone has a single
chatuikit/ module, whereas v6 ships
chatuikit-core + chatuikit-kotlin + chatuikit-compose. Anyone checking “does this API exist?”
against it gets a confident, wrong answer.
Recommended
- Remove it from the docs repo (or at minimum add it to
.gitignore— today it is 26 MB of untracked noise in everygit status, and a nested.gitinside a repo invites accidental commits). - If a reference checkout is genuinely wanted for docs authoring, it must be the v6 source —
cometchat-team/uikit-android@master-v6— and it should be pinned to the version the docs claim, with the version stated in the path or a README beside it. - Better still: verify against the published artifact (the
.aarGradle already resolves), which cannot drift from what customers actually install. That is what caught all six of these.
endtyping,
"Strat Typing", getRecieverUID, setAttachmemnt, getReason.
Still owed (not fixed here)
- C1 full rewrite of
message-template.mdx(636 lines) againstBubbleFactory— needs docs-team authoring; a banner is not a substitute. - D1
getting-started-*→initFromSettings+ gitignored settings file instead of hardcodedAPP_ID/AUTH_KEYconstants. Behaviour change; wants product sign-off. - D2/D3 AI Integration Quick Reference accordion backfill (v6 components, all of SDK v5).
Round 8 — phantom CALLBACK TYPES on the search page (three-way audit)
Surfaced bythree-way-audit.mjs after the skills started teaching CometChatSearch. The page
documents the right method NAMES, but types every callback with a class that does not exist in
6.0.5. This sits in the machine-readable “AI Integration Quick Reference” accordion — the block
an AI agent reads first — so an agent would emit v5-Java-style SAM construction
(new OnItemClick<Conversation>() { … }) that cannot compile against v6.
Verified absent from the kit:
OnItemClick, OnBackPress, OnError, OnEmpty, OnLoad are
not declared anywhere in chatuikit-kotlin / chatuikit-core. The only such type that IS real is
OnClick (used by e.g. setOnAcceptClickListener(OnClick?)), which is why the family reads
plausible. 13 sites fixed on this branch.
Deliberately NOT changed: the same OnItemClick<T> spelling in upgrading-from-v5.mdx is
inside fences labelled title="V5 — …". Those are BEFORE examples of the old v5 Java API, where
the name is correct — “fixing” them would break the migration story.
Also confirmed, not a bug: setOnConversationClicked / setOnMessageClicked (past tense) DO
ship — they are aliases of setOnConversationClick / setOnMessageClick
(CometChatSearch.kt:2431,2436). Only their declared TYPES were wrong.
Round 9 — the drift gate wired into CI, and what it then found
three-way-audit.mjs is now a CI gate on the skills side (npm run verify:sync:android-v6, folded
into verify:ci:android) — the Android equivalent of what RN did with sync-check.mjs. Wiring it
up meant fixing it first: it read only ```kotlin/java fences, so an API documented in a props
table or in the “AI Integration Quick Reference” accordion counted as undocumented. It now also
reads inline-code mentions and accordion JSON keys — which immediately exposed six phantoms that
fence-scanning could never see.
R6 is the same defect class as B1 (the 3-arg thread callback) on a different page — evidence the
v5 listener idiom is still being carried into v6 pages by hand.
Result:
PHANTOM in DOCS and PHANTOM in SKILLS are both 0 under the wider scan.
Still advisory, not defects: the gate’s DOCS GAP (2) names setOnConversationClick /
setOnMessageClick — the docs use the …Clicked aliases while the skills teach the canonical
names. Both ship (the aliases are real, CometChatSearch.kt:2431,2436), so this is a naming
inconsistency to settle, not broken code. SKILL GAP (333) is long-tail by design: the pack is
deliberately thin and fetches the long tail from docs at runtime.