Skip to content

[DX-629] Add Chat React API references#3272

Open
m-hulbert wants to merge 12 commits intomainfrom
dx-629-chat-react-api-refs
Open

[DX-629] Add Chat React API references#3272
m-hulbert wants to merge 12 commits intomainfrom
dx-629-chat-react-api-refs

Conversation

@m-hulbert
Copy link
Contributor

Description

This PR adds an API reference for Chat in React using the new NestedTable and MethodSignature components. It should have parity with the TypeDoc references.

There is 1 commit per file, however I haven't yet updated the references in the conceptual content to point to these references yet to keep this PR smaller for review feedback. I will add that as a final commit once we are happy with this content.

Checklist

m-hulbert and others added 12 commits March 12, 2026 19:24
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>
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>
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>
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>
@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 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: 2c8dfbce-fb19-4a69-a358-2f562363cd42

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dx-629-chat-react-api-refs
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

@m-hulbert m-hulbert requested a review from splindsay-92 March 13, 2026 08:50
Copy link
Contributor

@splindsay-92 splindsay-92 left a comment

Choose a reason for hiding this comment

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

Just a few things so far, but mostly looks good!

| Property | Required | Description | Type |
| --- | --- | --- | --- |
| name | Required | The name of the room. | String |
| options | Optional | Options to use when creating the room. Must be memoized to prevent unnecessary room recreations. Room options are immutable after creation; differing options for the same room name cause errors. | <Table id='RoomOptions'/> |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| options | Optional | Options to use when creating the room. Must be memoized to prevent unnecessary room recreations. Room options are immutable after creation; differing options for the same room name cause errors. | <Table id='RoomOptions'/> |
| options | Optional | Options to use when creating the room. Must be memoized to prevent unnecessary room recreations. Room options are immutable after creation; differing options for the same room name will reject with a `RoomExistsWithDifferentOptions` error. | <Table id='RoomOptions'/> |

| --- | --- | --- | --- |
| name | Required | The name of the room. | String |
| options | Optional | Options to use when creating the room. Must be memoized to prevent unnecessary room recreations. Room options are immutable after creation; differing options for the same room name cause errors. | <Table id='RoomOptions'/> |
| children | Optional | Child components that will have access to the room context. | ReactNode or ReactNode[] |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| children | Optional | Child components that will have access to the room context. | ReactNode or ReactNode[] |
| children | Optional | Child components that will have access to the room context. | ReactNode, ReactNode[] or null |


| Property | Required | Description | Type |
| --- | --- | --- | --- |
| enableEvents | Optional | Whether to receive occupancy events. Enabling this increases message volume as the server sends additional updates for occupancy changes. Default false. | Boolean |
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we highlight the default values so they are clear please?

| code | Ably-specific error code. | Number |
| statusCode | HTTP status code corresponding to this error, where applicable. | Number |
| message | Additional information about the error. | String |
| cause | The underlying cause of the error, where applicable. | String, ErrorInfo, or Error |
Copy link
Contributor

Choose a reason for hiding this comment

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

This is now incorrect, ably-js lists this as an errorInfo only I believe, chat is likely using the same type now. I'll double check and update the codebase if I've not already done so :)


</Table>

<Table id='MessageReactionSummaryEvent' hidden>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the 'clipped' flag is missing from these summary event types.

| updateMessage | Updates a message's content. | [updateMessage()](#update) |
| deleteMessage | Soft-deletes a message. | [deleteMessage()](#delete) |
| history | Retrieves historical messages with pagination. | [history()](#history) |
| historyBeforeSubscribe | Retrieves messages sent before the subscription was established. Only available when a `listener` is provided. | [historyBeforeSubscribe()](#historyBeforeSubscribe) |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| historyBeforeSubscribe | Retrieves messages sent before the subscription was established. Only available when a `listener` is provided. | [historyBeforeSubscribe()](#historyBeforeSubscribe) |
| historyBeforeSubscribe | Retrieves messages sent before the subscription was established, up to the point of attachment. Only available when a `listener` is provided. | [historyBeforeSubscribe()](#historyBeforeSubscribe) |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

3 participants