Skip to content

Use Claude Code to sync docs with Browser and Node SDKs#657

Open
jhaaaa wants to merge 4 commits intomainfrom
browser-node-sdks-sync
Open

Use Claude Code to sync docs with Browser and Node SDKs#657
jhaaaa wants to merge 4 commits intomainfrom
browser-node-sdks-sync

Conversation

@jhaaaa
Copy link
Collaborator

@jhaaaa jhaaaa commented Feb 5, 2026

No description provided.

@jhaaaa jhaaaa requested a review from a team as a code owner February 5, 2026 02:36
@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-xmtp-org Ready Ready Preview, Comment Feb 18, 2026 5:40pm

Request Review

@macroscopeapp
Copy link

macroscopeapp bot commented Feb 5, 2026

Sync docs with Browser and Node SDKs by adding client registration checks, identifier-based conversation APIs, storage management, and sidebar link

Add Browser/Node code samples for client.isRegistered(), client.register(), identifier-based group/DM creation, message deletion, group permission APIs, inbox management and authorization, debug utilities, push preference streaming, and a new Browser storage page; update examples and sidebar to include the storage docs.

📍Where to Start

Start with the new Browser storage documentation in browser-storage.mdx, then review the sidebar addition in shared-sidebar.config.ts and sample updates in the core messaging pages.


Macroscope summarized 3ed32b6.


:::

## Check if client is registered
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not in mobile SDKs

)
```

```tsx [React Native]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

jha fix order of samples here

After a user calls `leaveGroup()`, you can check if their removal is still being processed using the `membershipState()` method. This is useful for showing appropriate UI while the group removal is being finalized.
After a user requests to leave a group, you can check if their removal is still being processed. This is useful for showing appropriate UI while the group removal is being finalized.

:::code-group
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

looks like Browser and Node do this differently than mobile

// Check if current user created the DM
const isDmCreator = dm.isCreator;
```

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

isCreator is not in RN

}
```

## Generate and look up inbox IDs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Browser/Node only, mobile
SDKs use it internally but don't expose it


:::

## Change the recovery identity
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not available in mobile SDKs


```js [Node]
// Check if the client is registered
const registered = await client.isRegistered();
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be

const registered = client.isRegistered;

or just replace that bit and change the if statement below to

if (!client.isRegistered) {
  // Register the client manually
  await client.register();
}

// Create a group using identifiers instead of inbox IDs
const group = await client.conversations.createGroupWithIdentifiers(
memberIdentifiers,
{ name: "Group Name", description: "Group description" }
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be

{ groupName: "Group Name", groupDescription: "Group description" }

// Create a group using identifiers instead of inbox IDs
const group = await client.conversations.createGroupWithIdentifiers(
memberIdentifiers,
{ name: "Group Name", description: "Group description" }
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

{ groupName: "Group Name", groupDescription: "Group description" }

// Delete a message by its ID
await conversation.deleteMessage(messageId);
```

Copy link
Contributor

Choose a reason for hiding this comment

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

deleteMessage is not part of the browser and node SDK yet

console.log(`Failed to delete message: ${error}`);
}
```

Copy link
Contributor

Choose a reason for hiding this comment

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

see comment above

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants