Skip to content

Updated code#399

Merged
ranjanravi85 merged 4 commits into
mainfrom
feature/flutter-uikit-card-message
Jun 24, 2026
Merged

Updated code#399
ranjanravi85 merged 4 commits into
mainfrom
feature/flutter-uikit-card-message

Conversation

@raj-cometchat

@raj-cometchat raj-cometchat commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Description

Related Issue(s)

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

Screenshots (if applicable)

@raj-cometchat raj-cometchat requested a review from raj-dubey1 June 24, 2026 11:02
@raj-cometchat raj-cometchat self-assigned this Jun 24, 2026
@mintlify

mintlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Jun 24, 2026, 11:09 AM

Aligns the Calls page install instructions with getting-started and
upgrading-from-v5, which moved off Cloudsmith to pub.dev in this PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
raj-dubey1
raj-dubey1 previously approved these changes Jun 24, 2026
@jitvarpatil

Copy link
Copy Markdown
Contributor

Docs review — 🔴 Request changes

Flutter docs PR (5 files) doing three good things — documenting the SDK AIAssistantListener + 3 new MessageListener AI callbacks, migrating the Flutter UIKit install from Cloudsmith v6.0.0 → pub.dev ^6.0.4 across 3 pages, and adding UIKit AI-event + card-action docs. Build-safe (0 nav breaks, 0 orphans, 0 missing redirects, 0 broken links in changed files). But two code examples reference APIs that don't exist in the SDK/UIKit and won't compile if copied — those are the blockers.

🔴 P1 — broken code examples (wrong API names; won't compile)

1. sdk/flutter/real-time-listeners.mdx (lines 298–311) — AIAssistantListener example uses 4 nonexistent event classes + 1 wrong property.
Verified against both the published cometchat_sdk dartdoc and the SDK source. The only AIAssistant*Event subtypes are RunStarted/RunFinished, ToolStarted/ToolArgument/ToolEnded/ToolResult, CardStarted/CardReceived/CardEnded, ContentReceived, MessageEnded. Fixes:

  • L298 AIAssistantToolCallStartedEventAIAssistantToolStartedEvent
  • L307 AIAssistantTextMessageStartedEventno such class (no text-"started" event; text streaming is ContentReceived deltas → MessageEnded). Drop this branch.
  • L309 AIAssistantTextMessageContentEventAIAssistantContentReceivedEvent
  • L310 event.content → the field is delta (String?), not content
  • L311 AIAssistantTextMessageEndedEventAIAssistantMessageEndedEvent

(The RunStarted, Card*, RunFinished branches and event.id / event.cardId / event.getCard() are all correct.)

2. ui-kit/flutter/methods.mdx (lines 242–243) — card-action handler has a wrong param type and a nonexistent property.
Verified against release-2026-v6.0.4 and the published cometchat_chat_uikit 6.0.4 dartdoc:

  • L242 void ccCardActionClicked(BaseMessage message, CometChatCardActionEvent action) — the listener interface declares the second param as dynamic action, so overriding it with CometChatCardActionEvent is an invalid Dart @override (won't analyze/compile). Use dynamic action and cast inside, e.g. final event = action as CometChatCardActionEvent;.
  • L243 action.actionUrlno such property. CometChatCardActionEvent exposes action, cardJson, elementId. There is no actionUrl.

✅ What passed (checked)

  • Build / structure: 0 unresolved nav refs, 0 orphans, 0 removed/renamed URLs (0 redirects needed), 0 broken internal links in the changed files. (Aside: a pre-existing broken link /sdk/flutter/calling-overview in sdk/flutter/overview.mdx — not touched by this PR, worth a separate fix.)
  • Version migration: Cloudsmith cometchat_chat_uikit: 6.0.0 → pub.dev ^6.0.4, applied consistently across call-features.mdx, getting-started.mdx, upgrading-from-v5.mdx. 6.0.4 is the current pub.dev latest — correct and a real improvement.
  • SDK MessageListener additions (onAIAssistantMessageReceived/onAIToolResultReceived/onAIToolArgumentsReceived) — all exist with matching types.
  • SDK AIAssistantListener + addAIAssistantListener/removeAIAssistantListener/onAIAssistantEventReceived(AIAssistantBaseEvent) — confirmed.
  • UIKit CometChatAIAssistantEvents.add/removeAIAssistantListener, CometChatAIAssistantEventsListener, CometChatUIEvents.addUiListener, and the ccCardActionClicked event — all confirmed on 6.0.4.
  • Overlap with Updated docs #398: resolved — Updated docs #398 merged earlier today and this branch already includes its onCardMessageReceived row/override with no duplication or conflict.

Both blockers are tightly scoped — happy to push the exact corrected code blocks (right class names, delta, and the dynamic-param + cast for the card handler) if useful.

🤖 Automated docs review (Mintlify link/redirect/content checks + API verification against published cometchat_sdk / cometchat_chat_uikit 6.0.4 and source).

@jitvarpatil jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — ✅ Approve

The two P1 blockers from the earlier review are fixed correctly, verified against the published cometchat_sdk / cometchat_chat_uikit 6.0.4 dartdoc and source.

1. SDK AIAssistantListener example (sdk/flutter/real-time-listeners.mdx) — all event branches now use real classes:

  • AIAssistantToolStartedEvent (was AIAssistantToolCallStartedEvent)
  • the nonexistent AIAssistantTextMessageStartedEvent branch removed
  • AIAssistantContentReceivedEvent + event.delta (was AIAssistantTextMessageContentEvent + event.content)
  • AIAssistantMessageEndedEvent (was AIAssistantTextMessageEndedEvent)
  • RunStarted/Card*/RunFinished + event.id/event.cardId/event.getCard() all correct.

2. UIKit card-action handler (ui-kit/flutter/methods.mdx) — now void ccCardActionClicked(BaseMessage message, dynamic action) with an if (action is CometChatCardActionEvent) check, accessing the real fields elementId, action, cardJson. The invalid param type and nonexistent actionUrl are gone.

Still passing: 0 nav breaks, 0 orphans, 0 missing redirects, 0 broken links in changed files; pub.dev cometchat_chat_uikit: ^6.0.4 migration consistent across all 3 pages; all other SDK/UIKit symbols verified.

Only leftover is a pre-existing broken link /sdk/flutter/calling-overview in sdk/flutter/overview.mdx — unrelated to this PR, worth a separate fix.

LGTM. 🚀

🤖 Automated docs review (Mintlify link/redirect/content checks + API verification against published cometchat_sdk / cometchat_chat_uikit 6.0.4 and source).

@ranjanravi85 ranjanravi85 merged commit f09c663 into main Jun 24, 2026
4 of 5 checks passed
@mintlify

mintlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Docs PR opened: #401

Replaced generic titles on four Flutter SDK and UI Kit pages with descriptive SEO-friendly titles, preserving original labels as sidebarTitle.

Note: failed to automatically merge

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.

4 participants