Skip to content

fix: add docs snippets; fix open api issues - #1913

Merged
szuperaz merged 11 commits into
release-v10from
docs-snippet-tests-v10
Oct 16, 2026
Merged

szuperaz merged 11 commits into
release-v10from
docs-snippet-tests-v10

Conversation

@szuperaz

@szuperaz szuperaz commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

https://linear.app/stream/issue/REACT-1069/migrate-client-side-chat-qa-tests-to-v10-of-stream-chat-js

Migrates the docs-snippets test project from v9 -> v10. It contains all docs and platfrom stream-chat-js docs snippets we have. Relevant docs branch: https://github.com/GetStream/getstream.io/pull/683 (will be kept in sync with getstream.io/main until we're ready to release stream-chat-js).

Most changes are to docs-snippet project, and src/gen, however, some client issues were found by the tests and those are fixed as well, so PR title is fix.

Fixed client issues

Most changes are type fixes, 1-2 behavioral; here are the most important ones:

  • queryThreadsAndHydrate / getThreadAndHydrate now return the already-registered Thread through the new ThreadManager.resolveQueried. Before, they built a second instance that activate() and incoming events didn't reach. A registered thread that is out of date and not open gets refreshed from the query result.
  • channel.sendEvent method expected the response Event type, instead of the request. So it expected fields like created_at, custom. Fixed it, this method now expects the event request type
  • client.devToken() is back (I think this was mistakenly removed with other server-side stuff)

TODOs

Apart from the client changes in this PR, we have 3 small, pending todos to generator/open api spec. All tracked in the docs-todo file. The run also caught a bunch of smaller API behavior issues; since these issues are present on api v1 and v2 as well, they're not blocking us. I'll verify the findings and pass them to the backend team once I have the time.

Comment thread src/channel.ts
custom: {},
// The API reads the AI indicator fields from `custom` and puts them on the event it
// delivers. They aren't app custom data, hence the assertion.
custom: {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one threw me off at first, but I verified that, for ai_indicator.update events, the message_id and ai_state fields need to be wrapped in custom, but then when the backend broadcasts the event, it will read these fields from custom and add them to event.message_id and event.ai_state.

@szuperaz
szuperaz marked this pull request as ready for review October 15, 2026 20:31
@szuperaz
szuperaz merged commit 53505e7 into release-v10 Oct 16, 2026
6 checks passed
@szuperaz
szuperaz deleted the docs-snippet-tests-v10 branch October 16, 2026 15:50
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