Skip to content

docs(ai-migration): make the v9 β†’ v10 guide agent-ready and re-verify against V10 - #3918

Merged
oliverlaz merged 2 commits into
V10from
docs/v10-agent-migration-guide
Nov 3, 2026
Merged

oliverlaz merged 2 commits into
V10from
docs/v10-agent-migration-guide

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Ticket: https://linear.app/stream/issue/REACT-1307

Goal

Make the v9 β†’ v10 guide the input of a prebuilt migration prompt: a coding agent gets one URL plus the user's repo and has to migrate accurately. The guide had grown by accretion, which hurt that:

  • "Part I" and "Β§19" each appeared twice;
  • Verify sat in the middle of the guide;
  • K.8 came before K.6;
  • detection greps hard-coded src/;
  • there was history from release candidates, and many bug-fix sections with nothing for an integrator to do.

Changes

ai-docs/ai-migration-v9-to-v10.md: structure

  • The order is now:
    1. Title and verified line
    2. Rules (old Β§0 folded in)
    3. Companion documents
    4. Workflow, definition of done and report template
    5. Detection (rg -t js -t ts -g '!**/node_modules/**', keyed on v9 names)
    6. Quick reference (20 rows added)
    7. A consolidated "Breaks that compile" table (~40 rows, each with a Detect command)
    8. Parts A–S
    9. Verification, with a leftover-identifier grep
    10. An index mapping every v10-breaking-changes.md section to a guide section
  • IDs:
    • Verify is now an unnumbered ## Verification, so every existing Β§19 reference (all of them mean i18n) stays valid.
    • The duplicate Part I (i18n) is now Part S.
    • K.x sections are in order.
    • Every Β§ reference in ai-docs/ resolves to a unique heading.
  • Sections with no integrator action are one-liners: L.8–L.10, M.1, M.3–M.5, M.7, P.10, P.14, P.16, P.18, P.19, P.21, P.22, Q.2. Their full text moved to section 17 of v10-breaking-changes.md.

Accuracy, re-verified at 74884ff55

  • fix: v10 sdk regressionsΒ #3916: a channel or thread reopened on an older page now jumps to the latest messages, and useJumpToLatestOnOpen is exported. Covered in Β§8, Β§R.5, the breaks table and the reference.
  • Wrong claim fixed: <Chat> does not replace an app's statusReporter; the app's reporter wins (Β§R.2).
  • Other fixes:
    • Β§16.3: capability gating;
    • useMutedUsers() returns UserMuteResponse[];
    • the typing type;
    • deleted_by is removed;
    • DEFAULT_BACKEND_SORT is not exported;
    • a dead stream-chat-js link.
  • Names that only existed in release candidates are removed. Checked against the v9.11.1 / stream-chat 9.54.4 tags:
    • the channel.state.*Store handles and mutedUsersStore;
    • WatcherState, which was in Β§4's After snippet;
    • MutedUsersState, normalizeTimestamp, getChannelUnreadState and *WithLocalUpdate.
  • Remaining stale mentions fixed: channel.deactivate() and client.activeChannels in channel-state-ui-migration.md, and the markRead description in v10-docs-impact.md.
  • ai-migration.md (v8 β†’ v9) has a banner pointing to this guide.

How it was checked

  • Every identifier in the guide was checked against the SDK source, stream-chat-js src/ and @stream-io/i18n / state-store. All 1,292 root exports were listed with the TS compiler, and every recommended hook is a root export.
  • About 40 v10 snippets typecheck against package/src.
  • The detection, breaks-table and leftover greps were run on the v9 and v10 SampleApps.

Needs a decision

  • Deep link vs reopen-at-latest. If an app starts jumpToMessage in a screen-level useLayoutEffect, the SDK's jump to the latest messages may fire first. The SDK tests only cover a jump started before <Channel> mounts, so the guide recommends that order. Worth a test or a guard in the hook.
  • Phase 1 asks which pre-release to use when no stable 10.x exists. Check that this fits the prebuilt prompt during the RC period.

Notes

  • The raw link to the stream-chat-js guide resolves once its PR is merged into release-v10.
  • The local package/node_modules/stream-chat is rc.26; yarn install brings it to rc.30.

Related PRs

The three guides link to each other; review together:

… against V10

Restructure ai-docs/ai-migration-v9-to-v10.md for coding agents: rules,
companion documents, a phased workflow with a definition of done and a
report template, root-agnostic detection, a consolidated table of breaks
that still compile, and verification with a leftover-identifier grep at
the end. Duplicate ids are resolved (i18n is Part S, Verify is unnumbered),
K.x is in order, and every Β§ reference resolves.

Re-verify against V10 HEAD: cover #3916's reopen-at-latest default and
useJumpToLatestOnOpen, correct the statusReporter, useMutedUsers, typing
and DEFAULT_BACKEND_SORT claims, and drop names that only existed in
release candidates. Sections with no integrator action shrink to one line,
with their detail moved to v10-breaking-changes.md. The v8 β†’ v9 guide now
points at this one.
client.moderation.flagMessage and flagUser take an object
({ message_id } / { user_id }), not a positional id.
@oliverlaz
oliverlaz merged commit de21c4a into V10 Nov 3, 2026
6 checks passed
@oliverlaz
oliverlaz deleted the docs/v10-agent-migration-guide branch November 3, 2026 11:09
oliverlaz added a commit to GetStream/stream-chat-js that referenced this pull request Nov 3, 2026
…reaking changes at HEAD (#1984)

Ticket: https://linear.app/stream/issue/REACT-1307

## Goal

Make the v9 β†’ v10 migration docs usable as the input of a prebuilt
migration prompt: a coding agent gets one URL plus the user's repo, and
has to migrate accurately. Until now `stream-chat` had only the
exhaustive audit (`v10-breaking-changes.md`), and no execution guide.

## Changes

**New `ai-docs/ai-migration-v9-to-v10.md`** (entry guide, ~1.2k lines)
- Rules for the agent: the installed `node_modules/stream-chat` is the
source of truth, verify before writing, stop on a missing symbol,
smallest edit, a green build is not done.
- Companion documents, a phased workflow (preflight β†’ install β†’ detect β†’
apply β†’ silent breaks β†’ verify β†’ report), a definition of done and a
report template.
- Detection greps keyed on v9 names that search the whole repo, not just
`src/`.
- A quick reference of about 125 v9 β†’ v10 rows, each linked to a
reference anchor.
- Inline before/after snippets for the high-impact changes. All 25 v10
snippets compile with `tsc --strict` against `src/`.
- Breaks that compile, each with a Detect command.
- A leftover-identifier grep covering removed methods and events and all
376 removed type names.
- An index that maps all 243 reference anchors to guide sections or
"reference only".
- Server-side code (secret, token signing, webhooks, admin endpoints) is
detected and routed to `@stream-io/node-sdk`, not ported onto
`stream-chat`.

**`ai-docs/v10-breaking-changes.md`, re-verified at `fdfcb296` (rc.30)**
- New break: the #1969 regen dropped `call_level` from
`PushPreferenceInput` / `PushPreferencesResponse`. It also re-exported
`BlocklistBehavior` and `ModerationAction`, which the rename table
listed as removed.
- Read events after #1981:
- The `read-events` capability is checked via
`channel.readEventsEnabled`.
  - The reporter path resolves `null` instead of throwing.
  - Only a direct `markRead()` / `markUnread()` throws.
- Other entries updated to HEAD behaviour:
  - mark-read throttling is per channel/thread;
  - recovery re-queries loaded pages;
  - network-failed messages get `status: 0`;
  - thread participants are merged;
  - joined/invite filters and `addFilterResolvers`;
  - watcher, ban and member-removal events;
  - `user.updated` reaches threads;
  - the composer restores `custom` from drafts and edits.
- **No anchor renamed or removed.** The React and RN guides link to
them. One anchor was added: `composer-custom-data-restore`.

## How it was checked
- Every identifier on the "after" side was checked mechanically to exist
in `src/`; the only misses are v9 names, placeholders and prose.
- The detection and verification greps were run against a v9 fixture
app.
- `prettier --check` passes.

## Open questions for review
- For channels, should `updatePartial` set custom fields as
`'custom.name'` dot paths or as flat keys? React's
`ChannelManagementView` uses dot paths, while the docs-snippet test uses
flat keys.
- The reference still has a few notes for rc users (`ensureWatched`,
renamed paginator members). The guide has none. Keep them or drop them?


## Related PRs

The three guides link to each other; review together:
- stream-chat-js: #1984
(merge first: the React and RN guides link to its raw URL)
- stream-chat-react:
GetStream/stream-chat-react#3377
- stream-chat-react-native:
GetStream/stream-chat-react-native#3918
oliverlaz added a commit to GetStream/stream-chat-react that referenced this pull request Nov 4, 2026
…79..BC-084 (#3377)

Ticket: https://linear.app/stream/issue/REACT-1307

## Goal

Make the v14 β†’ v15 guide the input of a prebuilt migration prompt: a
coding agent gets one URL plus the user's repo and has to migrate
accurately.

## Implementation details

**`ai-docs/ai-migration-v14-v15.md`, restructured for agents.** Section
numbers and existing anchors are unchanged.
- Rules for the agent, and companion documents with raw URLs: the new
stream-chat v9 β†’ v10 agent guide, the JS reference, this reference and
the i18n guide.
- A phased workflow, a definition of done and a report template.
- A detection block keyed on v14 names. It searches the whole repo,
including CSS, `package.json`, CI files and `.nvmrc`.
- A quick reference of about 80 rows.
- A Detect column on all rows of the "Breaks that do not fail to
compile" table, plus 6 new rows.
- A closing Verification section, placed before the index:
- a leftover-identifier grep over about 150 v14 names, plus a CSS grep;
- single-copy checks for `stream-chat`, `@stream-io/state-store` and
`dayjs`;
  - a runtime smoke list.

**`ai-docs/v15-breaking-changes.md`: missed changes added since #3346**
(numbered from BC-079: master's BC-078 is the `CustomCommandData` /
`DefaultCommandData` removal)
- BC-079: `useUserRole().canEdit` is now the permission alone.
- BC-080: edit, copy and download rules moved onto
`defaultMessageActionSet` items as `isVisible`.
- BC-081: the quote renders above a poll; poll messages get the
`--has-poll` class.
- BC-082: custom preview slots mount only while their preview is
visible.
- BC-083: message action handlers reject on failure (#3360, #3362).
- BC-084: the first-message padding is removed (#3370).
- Explicit `bc-NNN` anchors; the index's links did not resolve before.

The guide's index and the reference now hold the same 84 IDs.

**Corrections**
- Reconnect: `client.connectionRecovery` reloads the active channels and
threads. The guide now warns that reloading again on
`connection.recovered` reloads twice.
- The Β§9 typing slice is `Record<string, EventPayload<'typing.start'>>`,
so the type guard is gone.
- rc pins and rc history are removed.

**Other files**
- `ai-docs/ai-migration.md` (v13 β†’ v14) has a one-line banner pointing
to the v14 β†’ v15 guide.
- `AGENTS.md`: the stale "Per-component request-handler props removed"
reference now links to `#14-request-handlers`.

## How it was checked
- Every identifier in the guide was checked against `src`,
stream-chat-js `release-v10` and `@stream-io/i18n` / `state-store`. No
stale or invented name remains on the "after" side.
- All links resolve: 99 internal links in the guide, 84 in the
reference, and the 5 links to stream-chat-js anchors.
- The detection and leftover greps were run on a synthetic v14 app and
on `examples/`.
- The new snippets type-check, and prettier passes.

## Notes
- The raw link to the stream-chat-js guide resolves once its PR is
merged into `release-v10`.
- The local `node_modules/stream-chat` is rc.28, while `package.json`
wants rc.29.

## UI Changes

None (docs only).


## Related PRs

The three guides link to each other; review together:
- stream-chat-js: GetStream/stream-chat-js#1984
(merge first: the React and RN guides link to its raw URL)
- stream-chat-react:
#3377
- stream-chat-react-native:
GetStream/stream-chat-react-native#3918


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Clarified which version upgrades are covered by the migration guide
and linked readers to the guide for upgrading from v14 to v15.
* Updated the breaking-changes reference with newly documented changes
and clarified that active channels reload through the client after
reconnect.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@stream-ci-bot

Copy link
Copy Markdown
Contributor

πŸŽ‰ This PR is included in version 10.0.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants