Skip to content

docs(flutter calls): fix the Calls SDK API errors across /calls/flutter — including listeners that cannot be constructed - #492

Merged
raj-dubey1 merged 83 commits into
cometchat:docs/skills-v5-tempfrom
anshuman-cometchat:docs/flutter-calls-sdk-corrections
Sep 9, 2026
Merged

docs(flutter calls): fix the Calls SDK API errors across /calls/flutter — including listeners that cannot be constructed#492
raj-dubey1 merged 83 commits into
cometchat:docs/skills-v5-tempfrom
anshuman-cometchat:docs/flutter-calls-sdk-corrections

Conversation

@anshuman-cometchat

@anshuman-cometchat anshuman-cometchat commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Two passes over /calls/flutter, both verified against the shipped cometchat_calls_sdk 5.0.6.
Sibling to the Flutter headless Calls SDK skill, cometchat-team/cometchat-skills#184 — the same
way #489 paired with cometchat-team/cometchat-skills#183.


Pass 1 — the Tier-2 Dart gate: 56 errors across 25 pages → 3

The one that matters most

The documented token flow is deprecated and mis-typed — and it is the invariant the whole
calling flow hangs off (init → login → token → joinSession).

  • CometChatCalls.generateToken is @Deprecated in 5.0.6: "use generateCallToken; auth
    token is now managed internally after login()"
  • it takes two positional arguments, not a named sessionId:
  • its callback yields GenerateToken — while the pages typed it for CallToken, which
    belongs to the replacement

So the pages were a hybrid: the deprecated method name with the new method's callback type. And
no page mentioned generateCallToken at all — the current token API was undocumented, and the
documented one could not run.

The rest

What Scope
D1 CometChatCalls.SessionSettingsBuilder() — a top-level class, not a member 23 occurrences, 13 pages
D3 Five listener types are plural in the SDK 34 occurrences, 16 pages
D4 remove*Listener takes the listener object; pages called them with no argument and built the listener inline, so there was nothing to pass 5 sites
D5 CallLog.sessionId, not sessionID 2
D6 CometChatConstants does not exist — the constants are CometChatReceiverType, CometChatCallType, CometChatCallStatus in the Chat SDK 1 page
D7 login / loginWithAuthToken hand back a nullable User, dereferenced unguarded 3

Pass 2 — what the gate could not see

Pass 1 renamed the five listener types. It did not fix their shape, and the shape is the part
that does not compile.
This came out of building a Flutter harness from these pages and running
flutter analyze over it (skills#184).

All five listener types are abstract classes

SessionStatusListeners, ParticipantEventListeners, MediaEventListeners,
ButtonClickListeners and LayoutListeners are abstract class in 5.0.6. Every page builds them
with named callbacks — SessionStatusListeners(onSessionJoined: () { … }) — which the analyzer
rejects with instantiate_abstract_class. 34 sites across 16 pages.

Each is now a class that extends the type and overrides only the callbacks with a real body.
Empty stubs are dropped — the abstract class already gives every member a no-op body, so
onAudioMuted: () {} was pure noise — and a one-line comment names what was removed so the
example still shows what else exists.

The singular spellings in prose are fixed too (11 pages). Pass 1 only touched fences, so a
reader following a parameter table still typed an undefined type.

addLayoutListener / removeLayoutListener do not exist

CallSession exposes set layoutListener(LayoutListeners?) and its getter. Not an add/remove
pair — one slot, cleared by assigning null. 4 sites. This matters beyond the compile error:
only a single layout listener can ever be registered, and the add/remove spelling actively hid that.

Ringing — three Chat-SDK shapes

The page wrote Reality
Call(receiverID, receiverType, callType) Call has no positional parameters — required named receiverUid / receiverType / type
CallListener(onIncomingCallReceived: …) CallListener is a mixin — no constructor. Now class _AppCallListener with CallListener
joinCallSession(call.sessionId!) Call.sessionId is nullable — the force-unwrap turns a handled error into a crash

CometChat.initiateCall has no timeout parameter

The page documented it in two tables and a code sample with a "defaults to 45 seconds" story. The
signature is (Call, {onSuccess, onError}), and the repository beneath it takes only
receiver/receiverType/type — there is no client-side timeout at any layer. The section now
says what is true: the timeout is server-side, and to end an unanswered call earlier you cancel it
yourself with rejectCall(sessionId, CometChatCallStatus.cancelled) on your own timer.

User is exported by BOTH barrels

Ringing needs cometchat_calls_sdk and cometchat_sdk, and each declares a User, so the
file fails ambiguous_import until one side hides it. No page said so; the ringing page now does,
with the hide User import.


Deliberately NOT changed

The eight CometChatCalls.muteAudio / switchCamera / setAudioMode / PiP calls on
migration-guide-v5 sit inside its "v4" tab, showing the old API on purpose — the same shape
as upgrading-from-v5 on the UI Kit side. That page needs the gate's --exclude, not an edit. I
was one command from "fixing" correct content before checking the surrounding tab.

Verification, and what it does not cover

typecheck-fences-dart against the pinned 5.0.6, all 25 pages: 10 errors, every one accounted
for
— 8 are that v4 tab, 2 are the User clash, which is a shared-fence-project artifact and
a real trap, so it is documented rather than edited away. Zero unexplained.

Stated rather than hidden: 12 fences on these pages parse in no shape and are never checked.
Both D3 and the abstract-listener defect were hiding in exactly that blind spot — the second one
was found by a compiler pointed at a harness, not by this gate. Treat the residual number as a
floor, not a total.

raj-dubey1 and others added 30 commits August 11, 2026 17:33
Adds ui-kit/angular/llms-angular-v5.mdx — a machine-readable, Angular-v5-scoped
routing index of all 91 v5 pages as .md twins, for AI coding agents. Mirrors the
shape of ui-kit/react/llms-react-v7.mdx (branch docs/react-v7-feature-guides).

- Unlisted, NOT hidden: omitted from docs.json navigation so it never shows in
  the human sidebar, but still built, served as a .md twin, and indexed. Using
  `hidden: true` would auto-apply noindex and drop it from search + the global
  llms.txt, which defeats the purpose. docs.json is deliberately untouched.
- Scoped to v5 only; the 2.0/, 3.0/ and v4/ trees are excluded so agents are
  never routed at dead API surfaces.
- Angular-specific framing the React index has no equivalent for: kebab-case
  selectors, @input() rather than props, content-projection/TemplateRef rather
  than render props, and env config in src/environments/environment.ts.

Also fixes four content defects surfaced while building the index:

- api-reference/formatter-config-service.mdx, api-reference/
  rich-text-editor-service.mdx and guides/rich-text-formatting.mdx shipped with
  NO frontmatter at all despite being in docs.json navigation, so they rendered
  untitled. Adds title/description per house style (see
  api-reference/chat-state-service.mdx) and drops the two leading H1s that would
  now duplicate the frontmatter title.
- overview.mdx "AI Integration Quick Reference" listed peer deps as
  @cometchat/chat-sdk-javascript + dompurify, missing
  @cometchat/cards-angular@^1.0.0 which @cometchat/chat-uikit-angular@5.1.0
  added. Verified against the published package.

NOT fixed here, needs an owner decision: the same accordion claims Angular
"v18, v19, v20, v21, v22" but the published peer range at 5.1.0 is
@angular/core ">=17.0.0 <22.0.0" — v22 is excluded (install hard-fails with
ERESOLVE) and v17 is supported but undocumented. Either the docs or the peer
range is wrong; that is a support-policy call, not a typo.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…e docs (ENG-38205)

RN-G14 — the Podfile requirement that BREAKS EVERY FIRST BARE-RN INSTALL.
  The UI Kit is a Swift pod depending on SPTPersistentCache and
  DVAssetLoaderDelegate, neither of which defines a module, so on a
  static-library build — the React Native default — `pod install` fails
  outright. Both official sample apps already carry the two modular_headers
  lines; the integration page never mentioned them. Added, with the verbatim
  error so it is searchable, plus the LANG=en_US.UTF-8 note (CocoaPods dies
  with an opaque Encoding::CompatibilityError when the locale is unset, and
  the trace points at Ruby rather than at the real cause).

RN-G8 — accordion coverage 91% -> 100% (55/55 pages).
  Added the AI Integration Quick Reference to call-features,
  calling-integration, campaigns, core-features and extensions. Each carries
  the trap for its area, not filler: core-features states reactions and
  mentions are CORE in v5 so enabling the legacy dashboard extensions is
  unnecessary; extensions states most render themselves once enabled so
  emitting client code duplicates them; calling-integration states that
  INSTALLING the package is the enable switch (there is no
  setCallingEnabled() in RN) and that simulators capture no camera or mic.

RN-G11 — the events page named five APIs that do not exist as exports.
  CometChatMessageEvents -> MessageEvents (un-prefixed) · CometChatCallEvents
  -> CallUIEvents · CometChatGroupEventListener -> CometChatGroupsEvents
  (plural) · CometChatConversationEventListener -> CometChatConversationEvents
  · CometChatUserEventListener -> CometChatUIEvents. All five replacements
  verified present in the kit's public exports, and ccUserBlocked confirmed to
  live in CometChatUIEvents.ts before accepting that last mapping.

RN-G9 (partial) — three docs-side import bugs fixed:
  mentions-formatter-guide imported TextStyle from the kit; it is a
    react-native type. Now imported from 'react-native'.
  call-logs imported CallLogRequestBuilder from the CHAT sdk. It lives in the
    CALLS sdk and is only reachable as CometChatCalls.CallLogRequestBuilder —
    wrong on both counts.
  ai-assistant-chat-history imported ChatHistoryStyle purely to annotate an
    object literal; dropped, the type is inferred.

NOT fixed here — these are KIT bugs, not doc bugs. OutgoingCallConfiguration,
EnterKeyBehavior, SingleLineMessageComposerConfiguration and CometChatReceipt
are all DOCUMENTED public API that src/index.ts does not export. The docs
describe the intended behaviour correctly; the barrel is incomplete. Deleting
those sections would remove documented capability, and EnterKeyBehavior is a
STRING ENUM so a literal will not type-check either — there is no doc-side
workaround. Each needs a one-line export in the kit, which is a different
repo and a public-API decision.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…s schema

The Quick Reference is the FIRST thing an agent reads when a skill fetches a
page, so it has to carry that page's whole contract — not just a name list.
The JavaScript SDK already does this (median 10 rows across its 20 documented
pages); React Native's were a name list or a bare code snippet.

13 hot-path pages upgraded to the same field schema — Package · Import ·
Key methods · Key classes · Primary output · Prerequisites · Constraints ·
Listeners registered · Request builder · Related.

RN SDK pages with a real contract table: 6 -> 16. Median rows: 5 -> 8.

The two fields that were missing everywhere are the ones that matter most,
and every value is verified against the installed .d.ts:

  Primary output — is it a Promise, what does it resolve to, what does it
    reject with. Without it an agent does not know to await, or what to catch.
    e.g. deleteMessage resolves a TOMBSTONE not void; getLoggedinUser returns
    User | NULL and null is the normal no-session answer; markAsRead is
    untyped; addMessageListener returns VOID, not a subscription.

  Constraints — what the API will NOT do, which a page cannot express by
    omission. e.g. there is no sendCardMessage() (card/interactive messages
    are receive-only, and an agent will infer one from the three send*
    methods that do exist); login is VARIADIC AND UNTYPED so TypeScript
    catches nothing; startTyping/endTyping return void so do not await them;
    blockUsers takes an ARRAY; reactions are core in v5 with no extension to
    enable; ban is half a round trip and needs BannedMembersRequestBuilder +
    unbanGroupMember shipped alongside it.

Existing code snippets are preserved beneath each table — the table answers
"what is the contract", the snippet answers "what does it look like".

Zero phantom methods: every CometChat.* named in the new tables verified
present in the SDK catalog.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…ent pages

Every value is read from the kit's own component declarations
(@cometchat/chat-uikit-angular 5.1.0), so the accordion cannot drift from the
shipped API — regenerate after a kit bump rather than hand-editing.

Schema follows cometchat#466 but adapted for a UI component: its SDK rows (Key methods,
Listeners registered) become Selector / Key inputs / Key outputs / View slots.
Import and Selector are separate rows because the exported class name and the
template selector differ, and confusing them is a known failure mode.

Bubbles get different Mounting/Prerequisites/Constraints rows: the message list
renders them when a matching message arrives, so telling an author to add one to
imports[] would be wrong guidance.

notification-feed.mdx is left untouched — its hand-authored accordion carries
per-input types, defaults and automaticBehaviors that cannot be generated from
type declarations, and a generated table would be a regression.
…g index

Reverted the previous commit — it deepened the Quick References toward the JS
SDK's full contract schema, which is the wrong direction.

The Quick Reference's job is ROUTING, not documentation. Pages are long. An
agent scans the accordion to decide "is the method I need on this page?" — if
yes it opens the page, if no it moves to the next one. Making the accordion
long forces the agent to read a long accordion instead of a long page, which
saves nothing. Compact and COMPLETE beats rich and partial.

So the real defect was never depth — it was MISSES. A method a page covers
but does not list is invisible: the agent scans, does not see it, and moves
on, even though the answer was right there.

  receive-messages was the worst — 7 methods covered but unindexed, including
  getMessageDetails and ALL FOUR unread-count variants. Anyone asking "how do
  I get the unread count" would have skipped the page that answers it.

Fixed both shapes:
  2 pages had a table whose Key Methods row was incomplete -> completed
  30 pages had a SNIPPET-ONLY accordion with no index at all -> added a
    compact Key Methods + Key Classes index above the existing snippet

SDK pages with a method index: 6 -> 36. Routing misses: 16 -> 0.

init/login/logout/getLoggedinUser are deliberately excluded from non-setup
pages: they appear in nearly every example as boilerplate, and indexing them
everywhere would make the index useless. The index must say what a page is
ABOUT, not what its example happens to call.

Every method verified present in the SDK catalog; the original snippets are
untouched beneath each index.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…dex (cometchat#446 shape)

Follows the shape landed for React in cometchat#446. The point is what it removes: no prop
dump, so an agent can scan the accordion and only read on if what it needs is
listed. Props/Events/Customization become anchors into the page's own sections —
all 99 verified to resolve.

Adds rows that are not derivable from type declarations and are where composition
actually goes wrong: Primary output, Stitching, Automatic behaviour (what the kit
already does, so it is not hand-rolled). Authored for the 12 mountable surfaces;
bubbles get the short form since you never mount them.

Mechanical rows (component, selector, CSS root class, imports) come from the kit's
own declarations and its stylesheets — 71 of 81 selectors have a verifiable root
class. notification-feed.mdx preserved: its hand-authored accordion is richer than
anything generatable here.
…dexes

Same fix as the SDK side, applied to the UI Kit: a component a page
demonstrates but does not list in its Quick Reference is invisible — the agent
scans the index, sees nothing, and moves to the next page even though the
answer was there.

15 pages fixed. The biggest was component-styling, which styles 21 components
and indexed none of them — anyone asking "how do I style the avatar / badge /
action sheet" would have skipped the one page that answers it. Also fixed:
components-overview (the component index itself did not list Conversations,
MessageHeader or MessageList), the four formatter guides, and four task guides.

Scaffolding is deliberately EXCLUDED from pages it is not about, exactly as
init/login are on the SDK side. CometChatThemeProvider, CometChatI18nProvider,
CometChatUIEventHandler, CometChatUiKitConstants and CometChatUIKit wrap or
support nearly every example; indexing them everywhere would stop the index
discriminating, which is the one thing it exists to do. Each is kept on the
page that IS about it (theme, localize, events, methods, integration).

8 pages are left untouched by design: they use a JSON-format accordion whose
`"component"` key already names the page's subject — CometChatConversations on
conversations, CometChatMessageList on message-list, and so on. Their apparent
"misses" are incidental example usage (an Avatar inside a custom-view sample),
not what the page documents. Mutating structured JSON that may be parsed
downstream is riskier than the routing benefit.

Result: 32 pages were already complete, 15 fixed, 8 correct in a different
format. Every component named is verified present in catalogs/rn-v5.json.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
 routing-table form

The AI Integration Quick Reference is a routing index: the agent scans it to
decide whether to open the page. 18 RN pages were carrying a shape that cannot
serve that job.

UI Kit (14) — replaced the JSON-blob accordion that docs#446 deleted from all
35 React component pages. Those blobs inlined the whole prop contract at 33-120
lines each, so there was nothing left to open the page for. Now a Field/Value
table: Component, Package, Import, Data props, Primary output, Other actions,
View slots, Styling, Prerequisites, Stitching -- names only, each linking into
the section that holds the detail.

SDK (4) — ai-agents, delivery-read-receipts, retrieve-group-members and
additional-message-filtering carried code dumps instead of the field table
their docs#466 twins use. Method and class names verified against the shipped
RN SDK, not copied from JS: createUploadFileRequest/uploadAttachments do not
exist in the RN SDK, so nothing from JS's upload-files table was reused.

Also fixes ccCallFailled -> ccCallFailed in call-buttons, incoming-call and
outgoing-call. All three shipped kits (5.3.0, 5.3.2, 5.3.4) emit ccCallFailed;
the misspelling would have sent the agent looking for an event that is never
fired. The v4 archive still carries it and was left alone.

Conceptual pages (overview, key-concepts, rate-limits, upgrading-from-v3,
message-structure-and-hierarchy, users-overview) were left untouched: docs#466
deliberately gives their JS twins no Quick Reference at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ents-overview, conversations

Every change verified against the public API surface of the CometChatUIKitSwift
5.1.19 xcframework (the artifact github.com/cometchat/cometchat-uikit-ios pins,
sha256 a0f19887…). Nothing here is inferred from prose or from another page.

components-overview.mdx
  - Removes the "Composite Components" section and every reference to
    CometChatMessages / CometChat{Users,Groups,Conversations}WithMessages. These
    are v4 components; 5.1.19 contains none of them (0 occurrences in the public
    .swiftinterface, no ObjC @interface, absent from the source tree). The page
    was actively RECOMMENDING them as the quick-integration path.
  - Replaces them with the host-composed pattern the clean recipe pages already
    teach: a list component + your own chat screen (MessageHeader + MessageList
    + MessageComposer), linking to ios-conversation / ios-one-to-one-chat /
    ios-tab-based-chat rather than duplicating them.
  - Rewrites "Configurations": MessageHeaderConfiguration, MessageListConfiguration
    and MessageComposerConfiguration do not exist in v5 either — that whole section
    described the v4 pass-config-into-a-composite model. Now shows per-instance
    configuration with verified API: set(user:), set(controller:), set(subtitleView:),
    set(emptyView:), set(errorView:), placeholderText, hideBackButton.
  - Re-roots the hierarchy diagram at YourNavigationController / MessagesVC so the
    ownership boundary is explicit.
  - AI Quick Reference: compositeComponents -> a `composition` block that positively
    states no composite ships and names the three parts. An agent reading only that
    block now gets the right answer instead of a phantom.

conversations.mdx
  - Six styles + onSearchClick are public VARS, not set(label:) methods. Converted
    to property assignment: conversations.avatarStyle = …, .badgeStyle, .dateStyle,
    .receiptStyle, .statusIndicatorStyle, .typingIndicatorStyle, .onSearchClick.
  - CometChatMentionTextFormatter and CometChatURLTextFormatter do not exist. The
    kit ships CometChatTextFormatter and CometChatMentionsFormatter (plural) only —
    there is no URL formatter at all, so the example no longer implies one.
  - Custom empty state: the API takes a UIView, not a closure. Now assigns
    emptyStateView (inherited from CometChatListBase) with set(emptyView:) noted as
    the builder equivalent, plus emptyStateTitleText/emptyStateSubTitleText for the
    keep-the-default case.
  - CometChatMessages -> your own MessagesVC, with user/group passed from
    conversation.conversationWith.
  - AI Quick Reference slot names: tailView -> trailView, loadingStateView ->
    loadingView, and emptyStateView/errorStateView retyped as UIView rather than
    () -> UIView.

Both pages now pass the docs-vs-kit API check with zero findings.

Ref: cometchat-skills DOCS-BACKLOG G12 / features.ios-v5.json IOS-DOCS-001.
CometChatSearch's documented API diverged furthest from the shipped component.
Every replacement below is taken from the 5.1.19 public .swiftinterface.

Removed — these do not exist on CometChatSearch:
  set(onError:) / set(onEmpty:)      failures and empty results are VIEWS, not
                                     callbacks: set(errorView:), set(emptyView:),
                                     errorStateTitleText, errorStateSubTitleText
  set(conversationsRequestBuilder:)  no request builder at all; scope with
  set(messagesRequestBuilder:)       set(searchIn:) + set(searchFilters:initialFilter:),
                                     or user/group for a single conversation
  set(initialView:)                  no pre-search view API exists — section removed
                                     rather than left describing something unbuildable
  set(leadingViewForMessage:)        the ForMessage granular slots do not exist. The
  set(titleViewForMessage:)          only message-level slot is set(listItemViewForMessage:)
  set(subtitleViewForMessage:)       (plus the per-media variants). The granular slots
  set(trailingViewForMessage:)       exist for CONVERSATIONS only, as assignable
                                     properties: leading/title/subtitle/tailViewForConversation

Documented correctly for the first time:
  SearchScope  = .conversations | .messages
  SearchFilter = .messages | .conversations | .unread | .groups | .photos | .videos
                 | .links | .documents | .audio

AI Quick Reference (the block agents read first) had nine wrong entries. Fixed:
dropped the two request builders, onBack/onError/onEmpty, and hideNavigationBar/
hideBackButton/hideReceipts — CometChatSearch inherits UIViewController, NOT
CometChatListBase, so it has none of the list-base chrome. Added the five
per-media listItemViewFor* slots that were missing, and marked
onConversationClicked/onMessageClicked as assignable properties.

Also replaced the CometChatMessages composite references (IOS-DOCS-001) with the
host-composed MessagesVC, and repointed an itemView cross-reference from
CometChatMessages to CometChatMessageList.

search.mdx now passes the docs-vs-kit API check with zero findings.
Running total across ui-kit/ios: 19 pages / 76 findings -> 17 pages / 55 findings.
…References

docs#466 puts a consistent ~10-row field set on all 19 JS SDK method pages.
Ours had the right table form but a fraction of the rows: Package appeared on
1 page and Import on 0, against 19/19 in the reference PR. Import is the single
row an agent most needs to write working code, so its absence defeated the
routing index on every SDK page.

Adds the three mechanical rows -- Package, Import, Prerequisites -- which carry
the same value on every page and need no per-page judgement. Package and Import
lead the table, matching cometchat#466's row order.

setup-sdk and authentication-overview are skipped for Prerequisites: they are
themselves the pages the row links to, and must not cite themselves.

Still thinner than cometchat#466 and tracked separately: Primary output (4/38),
Related (5/38), Constraints (0/38) and Full reference (0/38) each need per-page
authoring rather than a mechanical fill.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
raj-dubey1 and others added 14 commits August 25, 2026 17:10
docs(android): Update UI Kit v6 docs to 6.0.5
Flutter was the only platform with none. On the skills-v5-temp base, react has
128 Quick References and 3 llms indexes, android 112/2, angular 81/1,
react-native 56/2, ios 34/2 - and flutter 0 and 0. This closes the index half.

Structure and conventions follow the reference PRs for the same feature:
cometchat#446 (React v7), cometchat#466 (JS SDK), cometchat#471 (Angular v5), cometchat#476 (React
Native). Unlisted rather than hidden, for the reason those PRs give: in Mintlify
hidden auto-applies noindex, which would drop the page from search and from the
auto global llms.txt - and the whole point is that an agent can discover it. Not
registered in docs.json, same as every prior index.

  ui-kit/flutter/llms-flutter-v6.mdx  70 links, all 54 UI Kit pages
  sdk/flutter/llms-flutter-v5.mdx     58 links, all 52 SDK pages

Both are 100 percent page coverage with zero dead links, verified by resolving
every href against the tree.

The Platform rules section is the part that carries real weight, and every claim
in it was verified against cometchat_chat_uikit 6.1.0 rather than recalled:

- TWO barrels with different surfaces. Chat widgets do not resolve from the
  calls barrel and vice versa, so a screen showing both imports both. This is
  the most common Flutter-specific compile failure.
- Lists need a bounded box or layout throws at render, not at build.
- Kit widgets paint their own surface; the app ThemeData does not reach inside.
- Theming is ThemeExtension, and registering on only one of light/dark silently
  leaves the other on kit defaults.
- v5's CometChatUIKit.getDataSource() is gone; v6 uses MessageTemplateUtils.
- Custom message types need addTemplate, not templates - templates only
  registers the bubble and the message is filtered out before it can render,
  with no error. A hand-rolled MessagesRequestBuilder does not help because the
  list always overrides uid/guid/types/categories on it.
- Messages sent with CometChat.send*Message must emit ccMessageSent or a
  mounted list never shows them.
- SDK: onSuccess AND onError are both required - compile-checked, omitting
  onError is missing_required_argument.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ent pages

Flutter had 0 of these while react has 128, android 112, angular 81,
react-native 56 and ios 34. This closes the UI Kit half.

Format follows the reference PRs (cometchat#446, cometchat#466, cometchat#471, cometchat#476): an
Accordion straight after the frontmatter, a Field/Value table, and rows that let
an agent decide whether the page is worth opening at all.

Generated from the compiler-verified prop tables rather than hand-written, so
every prop named here provably exists on the widget and the row cannot drift
from the kit on the next release. 35 in-page anchors, all resolving.

Two rows are Flutter-specific and are the reason a generic template would not
have done:

- Import carries the RIGHT BARREL per widget. Calling widgets resolve only from
  cometchat_calls_uikit.dart, so call-buttons, incoming-call, outgoing-call and
  call-logs also get an explicit Barrel row saying so. Importing a calling
  widget from the chat barrel is the most common Flutter compile failure and no
  other platform has this split.
- Layout warns that list widgets fill their parent and need an Expanded or a
  sized box, because the failure is an unbounded-height throw at render rather
  than a build error.

Plus the two traps found by building on the kit: message-list carries the
addTemplate-not-templates rule, and message-composer carries the ccMessageSent
requirement for messages sent outside it.

Classification is by TYPE, not name, after three passes got it wrong:
messagesRequestBuilder ends in Builder but is data, hideThreadView ends in View
but is a bool toggle, headerView is a HeaderFooterBuilder typedef with neither
Widget nor Function in its name, and onError is typed OnError? so only the
on-plus-capital convention identifies it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ree broken snippets fixed

Completes the Quick Reference set for Flutter: 14 UI Kit pages landed earlier,
38 SDK pages here - the same count React Native shipped.

Key methods and Key classes are extracted from each page's OWN dart fences and
ranked by how often the page uses them, so the rows describe what the page
actually teaches rather than a generic API list. Every extracted method was then
put to the analyzer, and that is what turned up the snippet bugs below. 263
links and reference anchors, all resolving.

The Constraints row carries the one thing true of nearly every call on this
platform and that no Promise-based SDK's docs can say: onSuccess and onError are
BOTH required, and awaiting the call alone gives you nothing to act on.

Three phantom methods the pages documented, none of which exist on CometChat:

- login-listeners: addLoginListener -> addloginListener. The SDK really does
  spell it with a lowercase l while removeLoginListener uses a capital L, so the
  page's snippet could not compile. Added a note, because the inconsistency is
  surprising enough that a reader will assume the doc is the typo.
- reactions: removeMessageReactionListener -> removeMessageListener. The page
  registers a MESSAGE listener and then removed a reaction listener that has
  never existed; reaction events arrive through the message listener.
- receive-messages: getUnreadMessageCountForUser does not exist on Flutter at
  all - there is no per-user variant, only ForAllUsers and ForGroup. Replaced
  the two pseudo-code snippets (they were positional, the real API is named
  parameters) with getUnreadMessageCountForAllUsers plus a map lookup.

markAsUnread was flagged too but is correct in place: it appears in
upgrading-from-v4-guide only as a note that v5 removed it.

Worth noting these survived the earlier 90-to-0 audit because that gate ran over
ui-kit pages only; the SDK pages have never been compile-checked. All three
replacements compile against cometchat_sdk 5.0.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…te at sdk pages

The 90-to-0 audit ran over ui-kit pages only. Pointing the same Tier-2 gate at
sdk/flutter found six kit-API errors; two were correct-as-written and four were
real.

reactions.mdx was written against an API that does not exist:
- message.getReactions() -> message.reactions. getReactions() exists only on
  internal request/API classes, never on BaseMessage. Also .reactions is
  non-nullable, so no null-aware access is needed.
- MessageReaction is not a class in this SDK. ReactionRequest.fetchNext returns
  List<Reaction>, so the loop variable and the updateMessageWithReactionInfo
  parameter are both Reaction. Fixed the two loops, the prose, and the helper
  snippet.

delivery-read-receipts.mdx: markConversationAsDelivered and
markConversationAsRead each take TWO positional arguments
(conversationWithId, conversationType) plus required onSuccess/onError. Both
snippets passed a single Conversation object, which cannot compile. Replaced
with the id plus CometChatConversationType form.

Correct as written, left alone: the two upgrading-from-v4-guide errors are
Before-v4 snippets demonstrating removed APIs, exactly like upgrading-from-v5 on
the ui-kit side. That page needs the same --exclude the ui-kit gate already
gives its migration page.

After the fixes: 52 files, 163 fences, 139 analyzed, 0 kit-API errors. 24 fences
still parse in no shape and are NOT checked - a real coverage gap on this page
set, not a pass.

Every replacement compiles against cometchat_sdk 5.0.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…Kit pages

Correcting an earlier claim. I said the Quick Reference set was closed after the
14 component pages; rechecking against the platforms in the reference PRs shows
it was not. Measured on CURRENT-version pages only - earlier counts were
inflated by v4/v5 archive subdirectories that git grep matched recursively:

  ui-kit/react-native  56 of 56    sdk/react-native  44 of 54
  ui-kit/ios           34 of 52    sdk/ios           52 of 61
  ui-kit/android       33 of 62    sdk/android       46 of 55
  ui-kit/react         29 of 40
  ui-kit/flutter       14 of 54  <- lowest of any platform

React Native has one on every single UI Kit page, guides and hubs included, so
component-only coverage was not the convention. This takes flutter to 54 of 54.

Non-component pages get page-appropriate rows rather than a fixed schema, which
is what the other platforms do: guides name Key widgets, Init and Related;
theming names the mechanism and its constraints; hub pages route.

Classes and methods are extracted from each page's own fences and ranked by use,
with a fallback to inline code spans for the seven hub pages that carry no
fences at all - a stub block on those would have been worse than none.

Six pages carry a hand-written row for something no extraction can know:
theme-introduction and component-styling explain that a kit widget paints its own
surface so the app ThemeData never reaches inside; message-template carries the
addTemplate-not-templates rule; customization-datasource records that
getDataSource is gone in v6; events carries the ccMessageSent requirement; and
upgrading-from-v5 notes its Before snippets are v5 and are meant not to compile.

122 links and anchors across the 54 blocks, all resolving. Fence gate still
clean at 355 analyzed, 0 kit-API errors.

sdk/flutter stays at 38 of 52 by design: the 14 without a block are conceptual
and hub pages, which cometchat#476 deliberately left alone on React Native for the same
reason.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Closes the known gap this PR shipped with. Every prop row on the twelve
component pages now carries a description; there are zero "—" cells left.

  CometChatMessageList   64
  CometChatSearch        35   (was 35 of 35 empty)
  CometChatGroupMembers  34
  CometChatUsers         25

The descriptions are not written into the pages by hand. They come from ///
comments added to the kit fields themselves in
cometchat-team/chat-uikit-flutter#581, and the table generator harvests them - so
the docs pick up future edits on the next run instead of drifting from the kit.
That PR takes the kit to 1033 of 1033 constructor fields documented across 81
widgets, so the same regeneration will fill descriptions well beyond these
twelve pages once it lands.

Tables stay pinned to the published 6.1.0 API. Only descriptions were taken from
the newer source; no field was added, removed or retyped, so the pages continue
to describe the version people actually have.

Existing hand-written descriptions were left alone - only cells reading "—" were
touched.

One thing worth noting for anyone regenerating: the harvest keeps the whole ///
comment when it fits a table cell rather than cutting at the first sentence.
Cutting lost the half that mattered on the props that most need it - addTemplate
read "Merges templates with the defaults." and dropped the clause explaining that
it also folds the type into the fetch filter, which is the entire reason to
prefer it over templates.

Fence gate clean at 355 analyzed, 0 kit-API errors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…-v6-uikit-api-corrections

docs(flutter): AI-agent docs layer — scoped LLM indexes, Quick References, and kit-vs-docs fixes
Pointing the Tier-2 Dart gate at /calls/flutter for the first time found 56
kit-API errors across 25 pages. Every fix below is verified against
cometchat_calls_sdk 5.0.6; the count is now 3.

D1 - SessionSettingsBuilder is a top-level class, not a member of
CometChatCalls. 23 occurrences on 13 pages wrote
CometChatCalls.SessionSettingsBuilder(), which cannot compile. Every page that
configures a session was affected.

D2 - the documented token flow was both deprecated AND mis-typed.
CometChatCalls.generateToken is marked @deprecated in 5.0.6 ("use
generateCallToken; auth token is now managed internally after login()"), takes
two POSITIONAL arguments rather than a named sessionId:, and yields
GenerateToken - while the pages passed a named argument and typed the callback
for CallToken, which belongs to the replacement. No page mentioned
generateCallToken at all, so the current token API was undocumented and the
documented one could not run. Switched to generateCallToken(sessionId,
onSuccess: (CallToken token), onError:).

D3 - five listener types do not exist under the names the docs construct:
SessionStatusListener, MediaEventsListener, ParticipantEventListener,
ButtonClickListener and LayoutListener are all plural in the SDK
(SessionStatusListeners, MediaEventListeners, ...). 34 occurrences across 16
pages. The gate never saw these - they sit in fences it cannot parse - so they
were found by probing the catalog instead.

D4 - the remove*Listener methods take the listener OBJECT, and the pages both
called them with no argument and constructed the listener inline, so there was
nothing to pass. Hoisted each listener into a field and registered it from
there, which is the only shape in which removal can work.

D5 - CallLog exposes sessionId, not sessionID.

D6 - CometChatConstants does not exist. Receiver, call type and call status
constants live in the Chat SDK as CometChatReceiverType, CometChatCallType and
CometChatCallStatus.

D7 - CometChatCalls.login and loginWithAuthToken hand back a NULLABLE User, so
the examples dereferenced it unguarded.

Deliberately NOT changed: the eight CometChatCalls.muteAudio / switchCamera /
setAudioMode / PIP calls on migration-guide-v5 are inside its "v4" tab, showing
the old API on purpose - the same shape as upgrading-from-v5 on the UI Kit side.
That page needs the gate's --exclude, not an edit.

Still open, stated rather than hidden: 3 errors remain, and 12 fences on these
pages parse in no shape and are NOT checked at all - so the real number is a
floor, not a total.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ntom parameter and a name clash

cometchat#492 fixed the listener NAMES (singular → plural, 34 occurrences). It did not fix their
SHAPE, and the shape is the part that does not compile.

## All five listener types are `abstract class`es

`SessionStatusListeners`, `ParticipantEventListeners`, `MediaEventListeners`,
`ButtonClickListeners` and `LayoutListeners` are declared `abstract class` in
`cometchat_calls_sdk 5.0.6`. Every page builds them with named callbacks —
`SessionStatusListeners(onSessionJoined: () { … })` — which the analyzer rejects with
`instantiate_abstract_class`. **34 sites across 16 pages.**

Each is now a class that EXTENDS the type and overrides only the callbacks that had a real
body. Empty stubs are dropped: the abstract class already gives every member a no-op body,
so `onAudioMuted: () {}` was pure noise. A one-line comment names the ones removed so the
example still tells you what else is available.

The singular spellings in PROSE were fixed too (11 pages) — cometchat#492 only touched fences, so a
reader following a table still typed an undefined type.

## `addLayoutListener` / `removeLayoutListener` do not exist

`CallSession` has `set layoutListener(LayoutListeners?)` and a getter. Not an add/remove
pair — ONE slot, cleared by assigning `null`. 4 sites. This one matters beyond the compile
error: it means only a single layout listener can ever be registered, which the add/remove
spelling actively hides.

## Ringing: three Chat-SDK shapes

- `Call(receiverID, receiverType, callType)` → **`Call` has no positional parameters.** It
  takes required NAMED `receiverUid` / `receiverType` / `type`.
- `CallListener(onIncomingCallReceived: …)` → **`CallListener` is a `mixin`.** No
  constructor. Rewritten as `class _AppCallListener with CallListener`.
- `joinCallSession(call.sessionId!)` → **`Call.sessionId` is nullable.** The force-unwrap
  turns "a signal arrived without a session" into a crash.

## `CometChat.initiateCall` has no `timeout` parameter

The page documented it in two tables and a code sample, with a "defaults to 45 seconds"
explanation. The signature is `(Call, {onSuccess, onError})`, and the repository beneath it
takes only receiver/receiverType/type — there is no client-side timeout at any layer. The
section now says what is actually true: the timeout is server-side, and to end an unanswered
call earlier you cancel it yourself with `rejectCall(sessionId, CometChatCallStatus.cancelled)`
on your own timer.

## `User` is exported by BOTH barrels

Ringing needs `cometchat_calls_sdk` and `cometchat_sdk` together, and each declares a `User`.
The file fails `ambiguous_import` until one side hides it. No page said so; the ringing page
now does, with the `hide User` import.

## Verification

`typecheck-fences-dart` against the pinned 5.0.6, all 25 pages: **10 errors, every one
accounted for.** 8 are the deliberate "v4" tab on `migration-guide-v5` (that page needs the
gate's `--exclude`, not an edit — same shape as the other platforms' migration pages). The
other 2 are the `User` clash above, which is a shared-fence-project artifact and a real
trap, so it is documented rather than edited away.

Unchanged and still true from cometchat#492: **12 fences on these pages parse in no shape and are
never machine-checked.** The abstract-listener defect was itself found outside the gate —
by running the analyzer over a harness built from these pages — so that number is a
standing caveat, not a footnote.

Sibling: cometchat-team/cometchat-skills#184.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@anshuman-cometchat anshuman-cometchat changed the title docs(flutter calls): fix the Calls SDK API errors across /calls/flutter docs(flutter calls): fix the Calls SDK API errors across /calls/flutter — including listeners that cannot be constructed Sep 7, 2026
@raj-dubey1

Copy link
Copy Markdown
Contributor

Docs review — Flutter Calls SDK v5 API corrections

Verdict: request changes (a P0 was introduced by the edit; the API renames themselves are correct, verified against cometchat_calls_sdk@5.0.7 + cometchat_sdk@5.0.7).

🔴 P0 — the edit broke the very snippets it set out to fix (must fix)

Wherever a listener lived inside a _setupX() method, unwrapping the closure left a stray ); and turned the assignment into a statement ending in ,non-compiling Dart. 12 occurrences across 5 files (each appears in both the step snippet and its "Complete Example"):

_sessionListener = _SessionStatusListener(),   // ← trailing comma, should be ;
);                                             // ← orphaned close-paren = syntax error
  • calls/flutter/background-handling.mdx:113-114 (+ ~204, ~222)
  • calls/flutter/custom-control-panel.mdx:234-235, 260-261 (+ ~356, ~362)
  • calls/flutter/custom-participant-list.mdx:232-233 (+ ~375)
  • calls/flutter/in-call-chat.mdx:125-126 (+ ~326)
  • calls/flutter/share-invite.mdx:60-61 (+ ~271)

Correct form:

_sessionListener = _SessionStatusListener();
CallSession.getInstance()?.addSessionStatusListener(_sessionListener);

(The top-level, non-_setup conversions in events / audio-modes / call-layouts / idle-timeout / pip / raise-hand / recording / screen-sharing / participant-management are clean.)

🟡 P1 — base branch: this fix won't reach production on its own

PR targets docs/skills-v5-temp, which is diverged from main (ahead 75 / behind 43). calls/flutter/** already exists on main with these same errors, so prod needs the fix — but merging here only lands it on the temp branch; it reaches prod solely via the still-open umbrella PR #482 (skills-v5-tempmain). Please confirm that path actually ships this.

🟡 P2 — pre-existing, worth fixing while here

Several pages build settings with a cascade but never call .build(), passing a SessionSettingsBuilder where joinSession wants the built SessionSettings (custom-control-panel, custom-participant-list, in-call-chat, share-invite, voip-calling, background-handling).

✅ Verified correct against 5.0.7 source

Pluralized listeners (SessionStatusListeners/MediaEventListeners/LayoutListeners/ParticipantEventListeners/ButtonClickListeners, abstract with no-op defaults) · removeXListener(instance) · layoutListener setter/getter (the "listener that can't be constructed" fix) · generateTokengenerateCallToken(sessionId, …) · login onSuccess User? · SessionSettingsBuilder() as top-level (not a CometChatCalls. static) · sessionIDsessionId · ringing Call(receiverUid:, receiverType:, type:) + CometChatReceiverType/CallType/CallStatus (old CometChatConstants.* doesn't exist in v5) · initiateCall has no timeout · CallListener mixin · callInitiator as User? cast · import … hide User collision note.

Build safety: all 20 files MODIFIED (no renames/removes/adds) → 0 nav breaks, 0 redirect need, 0 orphans.


Automated docs-PR review (Claude Code). Verified against the published pub.dev packages, not from memory.

anshuman-cometchat and others added 3 commits September 8, 2026 15:25
…ogs builder is wrong three ways

Found by diffing the published `cometchat_calls_sdk 5.0.6` against the calls-core monorepo's
`dev-v5` branch, then putting every documented API through `flutter analyze`.

## `overview` states both platform floors too low

- **"Android: Minimum API Level 24 (Android 7.0)"** → `android/build.gradle` pins
  **`minSdkVersion 26`** (Android 8.0)
- **"iOS: Minimum iOS 12"** → the podspec says **`s.platform = :ios, '13.0'`**

Neither is a warning. A reader who sets `minSdk 24` on the strength of this page gets a failed
Android build, and this page is the only place a Flutter dev looks for the floor.

Upstream `dev-v5` (5.0.7) raises iOS again to **15.1** and bumps the native `CometChatCallsSDK`
pin 5.0.0 → 5.0.4 — worth a note when that ships, since an iOS floor moving is breaking for
consumers.

## The call-logs builder — three errors in one line

`CallLogRequest.CallLogRequestBuilder().setLimit(30).setSessionType("video").build()`

- `CallLogRequestBuilder` is a **top-level class** — there is no `CallLogRequest.` prefix
- it has **no `setX()` methods at all** — it exposes public *fields*, so it takes cascaded
  assignments, not chained calls
- the call-type field is **`callType`**; nothing named `sessionType` exists on it

`(CallLogRequestBuilder()..limit = 30..callType = "video").build()`

**The part worth calling out to readers**, and now a `<Note>` on the page: this is the
*opposite* shape to `SessionSettingsBuilder`, which really does take cascaded setter calls
(`..setType(...)`). Two builders that look alike in the same file and are not. The parameter
table is now a field table.

Fixed on `call-logs` (7 sites), `recording`, and `migration-guide-v5` — the last two present
it as current v5 API, outside any v4 tab.

## `Recordings.recordingURL` → `recordingUrl`

Lowercase `rl`, in a sample and a property table on `recording` and `call-logs`. `Recordings`
has exactly `rid`, `recordingUrl`, `startTime`, `endTime`, `duration`.

## Verification

`typecheck-fences-dart` against the pinned 5.0.6, all 25 pages: **10 errors, unchanged and
every one still accounted for** — 8 are the deliberate "v4" tab on `migration-guide-v5`, 2 are
the `User` clash documented on the ringing page. The parseable-fence count improved (10 as-is,
up from 9). Note `recordingURL` on `call-logs` sat in one of the **12 fences that parse in no
shape**, so no gate would ever have caught it.

Sibling: cometchat-team/cometchat-skills#184.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…the setup page should say so

`cometchat_calls_sdk` **5.0.7** was published to pub.dev on 2026-09-02, and `^5.0.3` — the
constraint this page prints — resolves to it. Two consequences the pages did not carry.

## The iOS floor is now 15.1

The podspec says `s.platform = :ios, '15.1'` in 5.0.7; it was `13.0` through 5.0.6. `overview`
now says 15.1 (it said 12), and `setup` gains a warning next to the Info.plist section —
because this breaks on a routine `flutter pub upgrade`, with a `pod install` failure whose
cause is three steps removed from what changed.

The dependency snippet is pinned to `^5.0.7` for the same reason: `^5.0.3` resolves to the same
package, but the floor is what makes the platform requirement legible.

## Android `minSdk = 26` gets a warning, not just a number

`overview` already carries the corrected 26 from the previous commit. `setup` now says it where
the manifest permissions are, and says *why* it is not negotiable: Gradle takes the maximum
across the dependency graph, so a lower app value is a manifest-merger error rather than a
warning.

## Still owed, and not fixed here

**Transcription shipped in 5.0.7 and `/calls/flutter` has no page for it** —
`startTranscription` / `stopTranscription` / `isTranscribing`, four `SessionSettingsBuilder`
setters (both of whose buttons default to hidden), `TranscriptRequestBuilder` →
`TranscriptRequest.fetchNext(onSuccess:onError:)` → `List<Transcript>`, and a
`hasTranscriptions` call-log filter. iOS has `/calls/ios/transcription`; Flutter has nothing.
That is a new page, not an edit, so it is filed rather than attempted here — DOCS-BACKLOG D3,
with the full compile-verified surface.

Also filed, in a different page tree: `ui-kit/flutter/getting-started` states `minSdk = 24` and
`platform :ios, '13.0'`, and **`cometchat_chat_uikit` depends on `cometchat_calls_sdk`
unconditionally** — so those floors cannot be met by any UI Kit app, calling or not
(DOCS-BACKLOG D7).

## Verification

`typecheck-fences-dart` against the pinned SDK, all 25 pages: **10 errors, unchanged and every
one accounted for** — 8 the deliberate "v4" tab on `migration-guide-v5`, 2 the `User` clash
documented on the ringing page.

Sibling: cometchat-team/cometchat-skills#184.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… in 5.0.7 with no docs at all

`cometchat_calls_sdk` 5.0.7 (published 2026-09-02) added transcription as a complete feature —
control, caption settings, and retrieval — and `/calls/flutter` had no page for any of it.
`^5.0.3`, the constraint the setup page prints, resolves to 5.0.7, so this has been shipping to
readers undocumented.

New page `/calls/flutter/transcription`, registered in `docs.json` under Features after
`recording`.

## Written from the package, because there was nothing to copy

I expected to model this on `/calls/ios/transcription`. **That page does not exist** — the iOS
tree has no transcription page either. So every shape here was read off the published 5.0.7
package and compile-verified, not adapted from a sibling.

## Two things the page says that no other page on this tree does

**Transcription has two different error channels.** `startTranscription()` and
`stopTranscription()` **throw** a `CometChatCallsException` — they are the only pair on this
surface that reports failure that way. `TranscriptRequest.fetchNext` does the opposite, and its
own doc comment is explicit about it: errors go through `onError` only, the future never fails,
and it resolves with an empty list when `onError` fired. So `await` alone will not surface a
problem. Both are documented, with a `try`/`catch` example for the first.

**Both transcription buttons are hidden by default.** `hideTranscriptionButton` and
`hideClosedCaptionButton` default to `true`, joining `hideRecordingButton`,
`hideShareInviteButton` and `hideChatButton` — five of fifteen `hide*` setters now default the
opposite way to the rest, and nothing said so. Wiring a click handler without passing `false`
gives you a control that can never fire, which is indistinguishable from a broken listener.

## Also covered

- `enableAutoStartTranscription`, `setCaptionLanguage` (a method, default `"en-US"`)
- `TranscriptRequestBuilder` — both the setter methods and the equivalent field assignments the
  package's own doc comment uses; `defaultLimit` 30, `maxLimit` 1000 with larger values clamped
  and non-positive values rejected at fetch time
- pagination behaviour that is worth relying on: empty page through `onSuccess` at either
  boundary, `fetchPrevious` never requesting a page below the first, and
  `ERROR_REQUEST_IN_PROGRESS` for overlapping fetches on one request
- the `Transcript` fields (all nullable) and `CallLogRequestBuilder.hasTranscriptions`
- an error-code table naming which call raises which

## Verification

Every snippet on the page compiles against the published 5.0.7. The tree-wide fence gate is
unchanged at **10 errors, all still accounted for** — 8 the deliberate "v4" tab on
`migration-guide-v5`, 2 the `User` clash on the ringing page. **Zero from this page.**

Note only 3 of the page's fences are extractable by the gate; the rest are short statements it
skips, so they were compiled separately rather than assumed.

Closes DOCS-BACKLOG D3.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
anshuman-cometchat added a commit to anshuman-cometchat/docs that referenced this pull request Sep 8, 2026
…against

`ui-kit/flutter/getting-started` says `minSdk = 24` and `platform :ios, '13.0'`;
`call-features` says `minSdkVersion 24` and `platform :ios, '12.0'`. **No Flutter UI Kit app can
satisfy any of those**, and the failure is a build error, not a warning.

## Why

`cometchat_chat_uikit` 6.1.1 depends on **`cometchat_calls_sdk` unconditionally** — it sits in
the main `dependencies:` block, not behind an opt-in — and that package pins
`minSdkVersion 26` and `platform :ios, '15.1'` (5.0.7; iOS was 13.0 through 5.0.6).

Gradle and CocoaPods both take the **maximum** across the dependency graph, so a lower app-level
value is a manifest-merger error on Android and a failed `pod install` on iOS.

Proof rather than inference — resolving a pubspec whose only dependency is
`cometchat_chat_uikit: ^6.1.0`:

```
cometchat_chat_uikit     direct main      6.1.1
cometchat_calls_sdk      transitive       5.0.7
cometchat_sdk            transitive       5.0.7
```

## Why it was easy to get wrong

The kit's own AAR really does allow `minSdkVersion 21`, and its own podspec really does say
`9.0`. Reading the kit in isolation gives a lower answer; only the resolved graph is right. The
documented 24 looks like it came from exactly that reasoning — close, and still unbuildable.

## The fix

Both pages now say `minSdk = 26` and `platform :ios, '15.1'`, each with a short note saying
**why** — that the Calls SDK comes along with the kit whether or not the app uses calling, and
that the maximum across the graph is what binds. On `call-features` that note matters twice,
since a reader there is enabling calling and would otherwise assume the floor is calling's price
rather than the kit's baseline.

## Scope

Current (unversioned = v6) pages only. The archived `ui-kit/flutter/v4/` and `ui-kit/flutter/v5/`
trees are left alone — they document older versions with their own floors.

This is a different page tree from the `/calls/flutter` corrections in cometchat#492, which
is why it is a separate PR. Companion skills change: 10 sites across 8 `cometchat-flutter-v6-*`
skills carried the documented numbers and have been corrected in
cometchat-team/cometchat-skills#184.

Closes DOCS-BACKLOG D7.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… and fix what they were hiding

Three of these are defects I introduced in this PR's first pass. The rest were real all along and
invisible, because the fences they lived in never parsed and so were never checked.

## The corruption — 12 sites, 5 pages

The listener rewrite replaced `X = SessionStatusListeners(` … `);` with `X = _Listener(),` and
left the original call's trailing `);` behind:

```dart
_sessionListener = _SessionStatusListener(),
);
```

An unbalanced paren makes the whole fence unparseable, which is why the gate reported it as
"parsed in NO shape" rather than as an error. I read that as a pre-existing blind spot. It was my
own damage. Fixed on `background-handling` (2), `custom-control-panel` (4),
`custom-participant-list` (2), `in-call-chat` (2), `share-invite` (2).

## What the unchecked fences were hiding

**`CometChatMessages` does not exist** in the Flutter v6 kit. `ChatScreen.build` returned it. The
messages screen composes the three real widgets, and `CometChatMessageList` needs a bounded parent
or it collapses:

```dart
Column(children: [
  CometChatMessageHeader(group: chatGroup),
  Expanded(child: CometChatMessageList(group: chatGroup)),
  CometChatMessageComposer(group: chatGroup),
])
```

**Every group call in `in-call-chat` was wrong**, in three separate copies of the same block:

| Written | Actual |
|---|---|
| `CometChat.getGroup(id)` | requires `onSuccess:` **and** `onError:` |
| `CometChat.joinGroup(id, type)` | same — both callbacks required |
| `CometChat.createGroup(group)` | takes a **named** `group:`, plus both callbacks |
| `group.groupType` | the field is **`group.type`** |
| `group.hasJoined` on the result | `getGroup` returns **`Group?`** — dereferenced unguarded |

The `try`/`catch` around them could never have worked either: these report through `onError`, so a
missing group never throws. Rewritten to branch on the callback result.

**`Participant.uid` is `String?`** but `muteParticipant` / `pauseParticipantVideo` /
`pinParticipant` take a non-null `String`. Six sites on `custom-participant-list` passed the
nullable straight through. Guarded rather than force-unwrapped — a participant event can carry a
null uid, and `!` turns that into a crash.

## Verification

With the gate's matching fixes (cometchat-team/cometchat-skills#184): **every fence on
`/calls/flutter` now parses — 12 unparseable → 0 — and kit-API errors are 10 → 0, across 48
analyzed fences, up from 35.**

The residual is now genuinely zero rather than "zero except the ones we can't read."

Closes DOCS-BACKLOG D1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
anshuman-cometchat added a commit to anshuman-cometchat/docs that referenced this pull request Sep 8, 2026
…against

`ui-kit/flutter/getting-started` says `minSdk = 24` and `platform :ios, '13.0'`;
`call-features` says `minSdkVersion 24` and `platform :ios, '12.0'`. **No Flutter UI Kit app can
satisfy any of those**, and the failure is a build error, not a warning.

## Why

`cometchat_chat_uikit` 6.1.1 depends on **`cometchat_calls_sdk` unconditionally** — it sits in
the main `dependencies:` block, not behind an opt-in — and that package pins
`minSdkVersion 26` and `platform :ios, '15.1'` (5.0.7; iOS was 13.0 through 5.0.6).

Gradle and CocoaPods both take the **maximum** across the dependency graph, so a lower app-level
value is a manifest-merger error on Android and a failed `pod install` on iOS.

Proof rather than inference — resolving a pubspec whose only dependency is
`cometchat_chat_uikit: ^6.1.0`:

```
cometchat_chat_uikit     direct main      6.1.1
cometchat_calls_sdk      transitive       5.0.7
cometchat_sdk            transitive       5.0.7
```

## Why it was easy to get wrong

The kit's own AAR really does allow `minSdkVersion 21`, and its own podspec really does say
`9.0`. Reading the kit in isolation gives a lower answer; only the resolved graph is right. The
documented 24 looks like it came from exactly that reasoning — close, and still unbuildable.

## The fix

Both pages now say `minSdk = 26` and `platform :ios, '15.1'`, each with a short note saying
**why** — that the Calls SDK comes along with the kit whether or not the app uses calling, and
that the maximum across the graph is what binds. On `call-features` that note matters twice,
since a reader there is enabling calling and would otherwise assume the floor is calling's price
rather than the kit's baseline.

## Scope

Current (unversioned = v6) pages only. The archived `ui-kit/flutter/v4/` and `ui-kit/flutter/v5/`
trees are left alone — they document older versions with their own floors.

This is a different page tree from the `/calls/flutter` corrections in cometchat#492, which
is why it is a separate PR. Companion skills change: 10 sites across 8 `cometchat-flutter-v6-*`
skills carried the documented numbers and have been corrected in
cometchat-team/cometchat-skills#184.

Closes DOCS-BACKLOG D7.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
anshuman-cometchat and others added 2 commits September 8, 2026 17:22
From Raj Dubey's review, P2. A Dart cascade returns the RECEIVER, so
`final s = SessionSettingsBuilder()..setTitle(x);` binds the BUILDER to `s`, not the settings.

Two failure modes followed. A snippet that stopped there taught readers to pass a builder to
`joinSession` — a type error they hit rather than the page. And a call site that rescued it with
`s.build()` read as though `s` were already settings, which is the opposite of what the variable
name promised.

12 sites across 6 pages, now the idiom used everywhere else on the tree — parenthesise the
cascade, then build:

```dart
final sessionSettings = (SessionSettingsBuilder()
    ..hideControlPanel(true))
    .build();
```

The redundant `.build()` at the rescuing call sites goes with it.

Worth naming plainly: **the fence gate cannot see this class at all.** An unconsumed builder
produces no type error, so "0 kit-API errors across 48 fences" was true and did not mean correct.
It is the same blind spot as the unparseable fences in a different shape, and it took a human
reader to find it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two conflicts, and one of them says the base got there first.

## transcription.mdx — add/add, and theirs is better

Someone else documented Flutter transcription while this branch was open
(`Document Flutter call transcription and closed captions`). Their page is 342 lines to my 188
and covers everything mine did — including both facts I thought were mine to contribute: that
start/stop throw rather than reporting through a callback, and that both buttons default to
hidden. It also covers built-in UI controls, caption settings, reading transcript content, and a
complete example, none of which I had.

**Took theirs wholesale and dropped mine.** Keeping a second, thinner page would have been worse
than useless. DOCS-BACKLOG D3 is satisfied either way — the gap it recorded is closed, just not
by me.

## call-logs.mdx — kept my table, took their row

The base's version still lists `setLimit(int)` / `setSessionType(String)` / etc. — the `setX()`
methods this PR removed because `CallLogRequestBuilder` has no such methods; it exposes public
fields. Kept the verified field table.

But the base added a genuinely real row I did not have: **`hasTranscriptions`**, new in 5.0.7 and
confirmed against the package. Folded in as a field, with a note that it is the one member of
this builder that ALSO has a setter (`setHasTranscriptions`, added for parity with the other
SDKs) — so the exception is documented rather than silently inconsistent.

Also verified before accepting: `CallLog.getTranscriptions()` and the `transcriptions` field are
both real.

## One defect rode in with the merge

Both the base's new "Access Transcripts" section and the adopted transcription page build call
logs with `CallLogRequest.CallLogRequestBuilder().setLimit(30)` — the exact nested-prefix +
`setX()` form this PR removed everywhere else. Same builder, same fix, now consistent across the
tree.

## Verification

`typecheck-fences-dart` against the pinned 5.0.7, whole tree: **51 fences analyzed (up from 48),
0 unparseable, 0 kit-API errors.** The three extra fences are the adopted page's.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@anshuman-cometchat

Copy link
Copy Markdown
Contributor Author

Thanks — this was a genuinely useful review. All three points addressed; one of them I'd have got wrong without it.

🔴 P0 — already fixed, in 5c7a8bf

Same diagnosis, same 12 sites, same 5 files. The review lands just after the repair commit, so it reads as outstanding but isn't — re-checked on the current head and there are 0 occurrences of the pattern.

Worth saying plainly: that corruption was mine. The listener rewrite replaced X = SessionStatusListeners(); and left the original call's trailing ); behind. It surfaced as "12 fences parsed in NO shape" in the Dart gate, and I initially read that as a pre-existing blind spot rather than damage I'd just done. Your independent confirmation of the exact same site list is a good check on that.

🟡 P1 — you're right, and I nearly concluded the opposite

My first check said calls/flutter/** doesn't exist on main. That was wrong: it was a query against a local ref that didn't exist, and empty output looked like evidence. Re-queried through the API:

  • calls/flutter/ on main: 27 files
  • call-logs.mdx: 6 nested CallLogRequest.CallLogRequestBuilder occurrences
  • events.mdx: 15 constructed listeners
  • overview.mdx: API Level 24 and Minimum iOS 12 — both too low

So prod does carry these, and this PR reaches it only via #482 (docs/skills-v5-tempmain), which is open. Flagging that as a real dependency rather than claiming it's handled — I can't confirm #482's timeline.

Related, same shape, different tree: #500 corrects ui-kit/flutter/getting-started and call-features, which state minSdk = 24 / iOS 13.0 and 12.0. cometchat_chat_uikit depends on cometchat_calls_sdk unconditionally, so its minSdk 26 / iOS 15.1 bind every UI Kit app whether or not it uses calling — verified by resolving a pubspec whose only dependency is the UI Kit.

🟡 P2 — real, fixed in e048c10: 12 sites, 6 pages

A cascade returns the receiver, so final s = SessionSettingsBuilder()..setTitle(x); binds the builder to s. Two failure modes: a snippet that stops there teaches readers to pass a builder to joinSession (a type error they hit, not the page), and a call site that rescues it with s.build() reads as though s were already settings. Now the idiom used everywhere else on the tree:

final sessionSettings = (SessionSettingsBuilder()
    ..hideControlPanel(true))
    .build();

The gate is structurally blind to this class, which is worth recording: an unconsumed builder produces no type error, so "0 kit-API errors across 48 fences" was true and did not mean correct. Same blind spot as the unparseable fences in a different shape — it took a human reader to find it.

Two things from the merge

transcription.mdx was an add/add — and yours got there first. Someone documented Flutter transcription while this branch was open. That page is 342 lines to my 188 and covers everything mine did, including both facts I thought I was contributing (start/stop throw rather than reporting via callback; both buttons default to hidden), plus built-in UI controls, caption settings and a complete example. Took theirs and dropped mine — a second, thinner page would have been worse than useless.

One defect rode in with the merge. Both the new "Access Transcripts" section and the adopted transcription page build call logs with CallLogRequest.CallLogRequestBuilder().setLimit(30) — the exact nested-prefix + setX() form this PR removes elsewhere. Fixed in both. On the call-logs table I kept the verified field list and folded in your hasTranscriptions row, noting it's the one member of that builder that also has a setter (setHasTranscriptions, added for parity with the other SDKs). CallLog.getTranscriptions() and the transcriptions field both verified real in 5.0.7.

State

Conflicts resolved; MERGEABLE / CLEAN. Gate on the whole /calls/flutter tree against the pinned cometchat_calls_sdk 5.0.7: 51 fences analyzed, 0 unparseable, 0 kit-API errors.

The zero-unparseable is new since your review and is the part I'd weight most — the tree previously had 12 fences the gate silently skipped, and the two largest defects it eventually found (a phantom CometChatMessages, and every CometChat.getGroup/joinGroup/createGroup call being wrong) were hiding in exactly those.

@raj-dubey1
raj-dubey1 merged commit 85878ef into cometchat:docs/skills-v5-temp Sep 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants