Repository navigation
docs(ai-migration): moderation v2 flag, override typing, send side effects, thread-in-place layout - #3416
Open
oliverlaz wants to merge 1 commit into
Open
docs(ai-migration): moderation v2 flag, override typing, send side effects, thread-in-place layout#3416oliverlaz wants to merge 1 commit into
oliverlaz wants to merge 1 commit into
Conversation
β¦fects, thread-in-place layout
- mute and flag need the moderation v2 feature flag, default actions included
- stale override keys slip past TypeScript outside inline literals; type with satisfies
- register send side effects once per client and subscribe from components
- isDate / instanceof Date guards on timestamps are always false
- partial updates reject a set: { custom } key
- a thread that replaces the channel, and DOM queries on removed classes
- warn about a second wave of compile errors behind removed imports
oliverlaz
requested review from
MartinCupela and
NikolaGoranNaumovski
as code owners
November 6, 2026 12:42
1 of 2 tasks
|
Important Review skippedReview was skipped because the changed files are too large to review. π Files whose diffs exceed the per-file size limit: 1
Retrying the review will skip these files again. If they are generated content such as fixtures or snapshots, exclude them with
|
oliverlaz
added a commit
to GetStream/stream-chat-js
that referenced
this pull request
Nov 6, 2026
β¦et, Date guards (#2006) ## CLA - [x] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required). - [ ] Code changes are tested ## Description of the changes, What, Why and How? Ticket: [REACT-1307](https://linear.app/stream/issue/REACT-1307). A v14/v9 β v15/v10 migration run surfaced three things `v10-breaking-changes.md` didn't say. Docs only. - **Moderation needs the v2 flag.** v9's `client.muteUser` / `unmuteUser` / `flagUser` / `flagMessage` hit the v1 `/moderation/*` endpoints. They were removed in #1836, and the `client.moderation` replacements only call `/api/v2/moderation/{mute,unmute,flag}`. On an app without the v2 moderation feature flag these fail with `403` "this endpoint needs a feature flag, contact support to get it enabled" (reported on `10.0.0-rc.34`). The moderation entry now says so and suggests trying a mute and a flag against the app before upgrading. - **Partial updates keep custom fields flat.** The custom-data entry named only `updateUsersPartial`. It now lists every partial update (`updateMessagePartial`, `channel.updatePartial`, `channel.updateMemberPartial`, `updateThreadPartial`), says `custom` is a reserved key in `set` (rejected with ``field `custom` is reserved``), and notes TypeScript can't catch it because every generated `set` is `Record<string, any>`. - **`ts instanceof Date`** joins the silent timestamp failures. The "Behaviour changes that still compile" table gets matching rows. React guide counterpart: GetStream/stream-chat-react#3416. ## Changelog - docs: moderation v2 feature flag, flat `set` in partial updates, `Date` guards on timestamps
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3416 +/- ##
==========================================
- Coverage 90.22% 90.18% -0.04%
==========================================
Files 630 630
Lines 20411 20411
Branches 6429 6429
==========================================
- Hits 18415 18408 -7
- Misses 1996 2003 +7 β View full report in Codecov by Harness. π New features to boost your workflow:
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: https://linear.app/stream/issue/REACT-1307
π― Goal
A v14 β v15 migration run by an agent following
ai-migration-v14-v15.mdreported gaps in the guide. This PR adds the ones that hold up against the code and that the guide didn't already cover. Docs only. Companionstream-chatguide change: GetStream/stream-chat-js#2006.π Implementation details
ai-docs/ai-migration-v14-v15.md. Most of the diff is Prettier re-padding the silent-break table, because the new rows are wider.anyand hides later breaks (e.g. the removedchannel.search) until it's replaced.name/imageonCustomChannelDataoverriding the SDK type, and for mute / flag failing with403without the moderation v2 flag. The timestamp row now coversisDate/instanceof Date, the override rowuseMemoandsatisfies, and the thread-layout row a thread that replaces the channel plus DOM queries in code.constoruseMemoskip the excess-property check. Adds asatisfies Partial<ComponentContextValue>example.client.moderation.*(v14 used the v1client.muteUser/flagMessage), so even apps without moderation code of their own are affected.overrideSubmitHandler. Registers onesendMessageRequestfor the client's lifetime that components subscribe to through a ref. It explains why per-component registration doesn't work:config.setdeep-merges and skipsundefined, andreset('channel')clears all channel config.isDate(ts)/ts instanceof Dateare alwaysfalsenow; the Β§16 detection grep finds them.set: { custom }in a partial update is rejected (field `custom` is reserved).common.search.ariaLabelis also the SDK's search placeholder, so mapping a placeholdert('Search')to it is correct..ts/.tsx/.jsDOM queries.The new TSX snippets (Β§10, Β§13, Β§19) were type-checked against
srcwithtsconfig.lib.json; the Β§10 example rejects the staleThreadHeaderkey as described. The403message text comes from the migration report (reproduced there onstream-chat10.0.0-rc.34), not from code.π¨ UI Changes
None (docs only).