refactor: remove dead MessageMenu and finish useAudioPlayer rename#3556
Merged
isekovanic merged 1 commit intodevelopfrom Apr 17, 2026
Merged
Conversation
… rename MessageMenu was left in the v9 public surface even though the overlay path no longer renders it; the source file carried a `// TODO: V9: Either remove this or refactor it` note. Delete the component, its DEFAULT_COMPONENTS entry, and its barrel re-export. The surrounding MessageMenu folder stays — MessageActionList, MessageActionListItem, MessageReactionPicker, and MessageUserReactions are the live replacements and remain overridable via WithComponents. Also finish the useAudioPlayerControl -> useAudioPlayer rename. The byte-identical `useAudioPlayer.ts` was already being imported directly by the internal callers (AudioAttachment, AudioRecordingPreview); only the barrel still pointed at the old name. Flip the barrel and delete the dead duplicate file.
5 tasks
Contributor
SDK Size
|
isekovanic
approved these changes
Apr 17, 2026
isekovanic
pushed a commit
that referenced
this pull request
Apr 17, 2026
## Summary Adds `ai-docs/ai-migration.md` — a compact, machine-friendly v8 → v9 migration reference built for AI coding agents (Claude Code, Cursor, Copilot, etc.). The human-oriented v8 → v9 guide at https://getstream.io/chat/docs/sdk/react-native/basics/upgrading-from-v8/ is ~40k tokens. Loading it wholesale eats most of an agent's context window before any code work begins. This sibling doc is ~4k tokens (5× smaller) — prose rationale stripped, rename tables/decision rules/source pointers kept. Customers point their agent at the raw GitHub URL. It is **not** shipped in the npm package. ### Key agent-oriented features - **§0 primer** tells agents not to trust training data for v9 symbols (their cutoff predates v9) and names the correct `node_modules` path — the installed package is `stream-chat-react-native-core`, not `stream-chat-react-native` (which is the bare-RN wrapper). - **§1 detection greps** let agents scope the work with a single `rg` pass and skip sections whose patterns don't match the customer codebase. - **§3 big-3 structural migrations** enforce ordering: `WithComponents`, 5 component renames, inverted audio semantics — done first because many leaf renames evaporate after the big moves. - **§6 behavior changes** captures runtime-semantic shifts that aren't pure renames (`messageContentOrder` default swap, `deletedMessagesVisibilityType` removal, swipe-to-reply boundary, `MessageActionType.type` field, etc.). - **§7 JSON rename block** is the full v8 → v9 symbol map in a single parseable block for programmatic find/replace. - **§9 verification workflow** gives agents a hard gate: `rg` + `tsc` commands that must come back clean before the agent declares done. ### Stacked on #3556 This PR targets `refactor/v9-finish-message-menu-and-audio-hook` so the guide can accurately claim `useAudioPlayer` is the v9 hook name and `MessageMenu` is removed. GitHub will auto-retarget to `develop` when #3556 merges. ## Test plan - [x] Verified every v9 symbol in the guide resolves in `package/src/` - [x] Verified every `node_modules/` path referenced exists under `package/src/` - [x] Verified every `rg` pattern is syntactically valid (no exit-2 from ripgrep) - [x] Confirmed all "removed" claims in the JSON block are genuinely absent from v9 source (only i18n translation keys and stale JSDoc comments mention them) - [ ] Dogfood check: paste the raw URL into Claude Code on a fresh v8 example app and have it migrate ## Related docs updates Human migration guide edits (correcting the MessageMenu and AudioAttachment claims that this agent guide is also correcting) are a separate PR in the `docs-content` repo.
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.
Summary
Two small V9 cleanups that finish incomplete refactors.
1. Remove dead
MessageMenucomponentMessageMenuwas left in the v9 public surface but the overlay path no longer renders it. The source file carried an explicit// TODO: V9: Either remove this or refactor it, as its logic is offloaded to other components nownote from the original author. Customers who customizedMessageMenuin v8 had an override that silently no-op'd in v9 — a type error is more helpful.package/src/components/MessageMenu/MessageMenu.tsxMessageMenuimport +DEFAULT_COMPONENTSentry indefaultComponents.ts./MessageMenu/MessageMenure-export from the components barrelMessageMenu/folder stays —MessageActionList,MessageActionListItem,MessageReactionPicker, andMessageUserReactionsare the live replacements and remain overridable viaWithComponents.2. Finish
useAudioPlayerControl→useAudioPlayerrenameThe v9 docs already document
useAudioPlayerControl → useAudioPlayer, andsrc/hooks/useAudioPlayer.tswas added. But the barrel still exporteduseAudioPlayerControlfrom the byte-identical older file, so the rename never actually shipped. Internal callers (AudioAttachment,AudioRecordingPreview) were already importing the new name directly — only the barrel was stale.src/hooks/index.tsbarrel now exports./useAudioPlayersrc/hooks/useAudioPlayerControl.tsdeleted (byte-identical duplicate)Test plan
yarn tsc --noEmit— passesTZ=UTC yarn jest src/components/MessageMenu/__tests__/— 30/30 tests passuseAudioPlayer)Related docs updates
The v8→v9 human migration guide needs follow-up edits in
docs-content(separate PR) to reflect:MessageMenuremoved (not "still exported but inert")useAudioPlayerControl → useAudioPlayeris now a real rename