Skip to content

[DX-630] Add Kotlin Chat API references#3241

Open
m-hulbert wants to merge 13 commits intomainfrom
dx-630-kotlin-chat-api
Open

[DX-630] Add Kotlin Chat API references#3241
m-hulbert wants to merge 13 commits intomainfrom
dx-630-kotlin-chat-api

Conversation

@m-hulbert
Copy link
Contributor

@m-hulbert m-hulbert commented Mar 4, 2026

Description

This PR adds a Kotlin Chat API reference into the docs. It follows a similar format to the JavaScript ones, however should be idiomatic where necessary. Uses the Dokka references as source.

Checklist

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Kotlin SDK API reference documentation covering ChatClient configuration, Connection management, Room operations, Messages, Presence, Typing indicators, Message and Room Reactions, and Occupancy. Updated navigation to provide structured access to individual API guides.

@m-hulbert m-hulbert requested a review from sacOO7 March 4, 2026 09:22
@m-hulbert m-hulbert self-assigned this Mar 4, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fd1535fd-c770-4024-94a5-76584accaee8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The pull request restructures the Kotlin SDK navigation entry from an external link to an internal documentation hub, then adds eleven comprehensive API reference documentation pages for the Kotlin Chat SDK covering ChatClient, Connection, Rooms, Room, Messages, Message, MessageReactions, RoomReactions, Presence, Occupancy, and Typing interfaces.

Changes

Cohort / File(s) Summary
Navigation Structure
src/data/nav/chat.ts
Replaces single external Kotlin SDK link with nested internal documentation structure containing multiple API reference pages (ChatClient, Connection, Rooms, Room, Messages, Message, MessageReactions, Presence, Occupancy, Typing, RoomReactions).
Kotlin API Documentation
src/pages/docs/chat/api/kotlin/chat-client.mdx, connection.mdx, messages.mdx, message.mdx, message-reactions.mdx, room-reactions.mdx, room.mdx, rooms.mdx, presence.mdx, occupancy.mdx, typing.mdx
Comprehensive API reference pages documenting Kotlin SDK interfaces, methods, properties, data structures, parameters, return types, error handling, usage examples, and both listener-based and Flow-based consumption patterns.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 In the warren of docs, a structure takes flight,
Kotlin's APIs now organized just right,
ChatClient to Typing, each page shines anew,
Navigation flows smoothly through Ably's chat view,
Hops gleefully with reference complete! 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding Kotlin Chat API references to the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dx-630-kotlin-chat-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@GregHolmes GregHolmes force-pushed the dx-630-kotlin-chat-api branch 2 times, most recently from ea78770 to 2cb6203 Compare March 4, 2026 16:01
Copy link
Contributor

@GregHolmes GregHolmes left a comment

Choose a reason for hiding this comment

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

Looks good! Just left a couple comments.

@sacOO7 sacOO7 requested a review from ttypic March 5, 2026 16:59
@sacOO7
Copy link
Contributor

sacOO7 commented Mar 5, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
src/pages/docs/chat/api/kotlin/message-reactions.mdx (1)

15-18: Remove bold prefixes from bullet labels.

The strategy bullets use bold prefixes (**Unique**, etc.). Please switch to plain bullet labels to match style guidance.

As per coding guidelines "Avoid em-dashes, Latin abbreviations, slang, and bold prefixes in bullet points".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/docs/chat/api/kotlin/message-reactions.mdx` around lines 15 - 18,
Update the three bullets in message-reactions.mdx to remove the bold markdown
around the strategy names; replace "**Unique**:", "**Distinct**:", and
"**Multiple**:" with plain text labels "Unique:", "Distinct:", and "Multiple:"
so the bullets read "Unique: One reaction per client...", "Distinct: One
reaction of each type...", and "Multiple: Unlimited reactions..."; keep the rest
of the sentences unchanged to match the style guideline against bold prefixes.
src/pages/docs/chat/api/kotlin/typing.mdx (1)

104-112: Consider documenting TypingSetEventType values.

The type property references TypingSetEventType but its possible values aren't documented. If this type has specific enum values (similar to how TypingEventType documents Started/Stopped), consider adding a hidden table or inline description for completeness.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/docs/chat/api/kotlin/typing.mdx` around lines 104 - 112, The docs
reference TypingSetEvent.type (TypingSetEventType) but don't list its possible
values; add documentation for TypingSetEventType (either a hidden <Table
id='TypingSetEventType'> or an inline description) enumerating each enum member
and its meaning (similar to TypingEventType's Started/Stopped example) and
update the TypingSetEvent table to link to that TypingSetEventType entry so
readers can see the allowed values and semantics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/pages/docs/chat/api/kotlin/message-reactions.mdx`:
- Around line 75-80: Update the documented exception type for the suspend
functions send(), delete(), and clientReactions() so their "Returns" sections
reference ChatException instead of ErrorInfo (the Kotlin Chat SDK throws
ChatException on suspend failures); locate the three Returns blocks for send(),
delete(), and clientReactions() and replace the ErrorInfo mention with
ChatException, preserving the rest of the sentence. Additionally, remove the
bold prefixes from the bullet list items near the top of the file (the three
bullets that currently start with bold text) to match the writing style
guideline.

In `@src/pages/docs/chat/api/kotlin/occupancy.mdx`:
- Around line 52-57: The docs incorrectly say the suspend function get() throws
ErrorInfo; update the return/throws section for OccupancyData to state that
suspend failures throw ChatException (which wraps ErrorInfo) to match the
ChatClient suspend semantics. Locate the paragraph under "Returns" for
OccupancyData and replace the reference to `ErrorInfo` with `ChatException`,
keeping the note that it wraps `ErrorInfo` for clarity.

In `@src/pages/docs/chat/api/kotlin/presence.mdx`:
- Around line 44-49: Update the documentation return sections in this
presence.mdx file to state that these suspend functions throw ChatException
(which wraps ErrorInfo) instead of ErrorInfo directly; find each occurrence of
`ErrorInfo` in the "Returns" paragraphs for the suspend methods and replace the
text to reference `ChatException` consistent with the ChatClient API docs and
mention that ChatException contains the underlying ErrorInfo details.

In `@src/pages/docs/chat/api/kotlin/room-reactions.mdx`:
- Around line 45-50: Update the documentation for the suspend function send() in
room-reactions.mdx so that the documented thrown type is ChatException instead
of ErrorInfo; replace the reference to [`ErrorInfo`] with [`ChatException`]
(which wraps ErrorInfo) in the "Returns" / error sentence so it matches the
Kotlin Chat SDK convention used in chat-client.mdx.

In `@src/pages/docs/chat/api/kotlin/room.mdx`:
- Around line 70-75: Update the error documentation for the suspend functions
attach() and detach(): replace mentions of throwing [`ErrorInfo`] with
[`ChatException`] and point the link to
/docs/chat/api/kotlin/chat-client#chatexception; specifically edit the
Returns/description text for the attach() and detach() sections so they read
that the suspend function completes when the room is attached/detached or throws
a [`ChatException`] on failure (ChatException wraps ErrorInfo).

---

Nitpick comments:
In `@src/pages/docs/chat/api/kotlin/message-reactions.mdx`:
- Around line 15-18: Update the three bullets in message-reactions.mdx to remove
the bold markdown around the strategy names; replace "**Unique**:",
"**Distinct**:", and "**Multiple**:" with plain text labels "Unique:",
"Distinct:", and "Multiple:" so the bullets read "Unique: One reaction per
client...", "Distinct: One reaction of each type...", and "Multiple: Unlimited
reactions..."; keep the rest of the sentences unchanged to match the style
guideline against bold prefixes.

In `@src/pages/docs/chat/api/kotlin/typing.mdx`:
- Around line 104-112: The docs reference TypingSetEvent.type
(TypingSetEventType) but don't list its possible values; add documentation for
TypingSetEventType (either a hidden <Table id='TypingSetEventType'> or an inline
description) enumerating each enum member and its meaning (similar to
TypingEventType's Started/Stopped example) and update the TypingSetEvent table
to link to that TypingSetEventType entry so readers can see the allowed values
and semantics.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 880a6552-3542-454e-83dd-7dce979f23ec

📥 Commits

Reviewing files that changed from the base of the PR and between d41d6e4 and 2cb6203.

📒 Files selected for processing (12)
  • src/data/nav/chat.ts
  • src/pages/docs/chat/api/kotlin/chat-client.mdx
  • src/pages/docs/chat/api/kotlin/connection.mdx
  • src/pages/docs/chat/api/kotlin/message-reactions.mdx
  • src/pages/docs/chat/api/kotlin/message.mdx
  • src/pages/docs/chat/api/kotlin/messages.mdx
  • src/pages/docs/chat/api/kotlin/occupancy.mdx
  • src/pages/docs/chat/api/kotlin/presence.mdx
  • src/pages/docs/chat/api/kotlin/room-reactions.mdx
  • src/pages/docs/chat/api/kotlin/room.mdx
  • src/pages/docs/chat/api/kotlin/rooms.mdx
  • src/pages/docs/chat/api/kotlin/typing.mdx

m-hulbert and others added 13 commits March 11, 2026 14:04
Add navigation entries for all 11 Kotlin Chat API reference pages,
replacing the external Dokka SDK link with inline page links mirroring
the JavaScript API reference structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ChatException section, experimental annotations on realtime and
stateDispatcher properties, Required column consistency for param
tables, and DSL builder overload method signature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add DSL builder overload method signature for rooms.get() and apply
Required column consistency to parameter tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add experimental channel property, convert property tables to use
description-based nullability instead of Required column for interface
properties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add extension function overload signatures for update() and delete(),
remove nullable type syntax from parameter tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Separate with() overloads into distinct signature blocks with code
examples, convert property tables to description-based nullability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove nullable type syntax from parameter tables, convert
PresenceMember to description-based nullability for interface
properties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove nullable type syntax from parameter tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert property tables to description-based nullability for interface
properties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@m-hulbert m-hulbert force-pushed the dx-630-kotlin-chat-api branch from 2cb6203 to f75777b Compare March 11, 2026 14:05
@m-hulbert m-hulbert requested a review from GregHolmes March 11, 2026 14:08
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.

3 participants