Repository navigation
fix: correct issues found during the comment cleanup - #3334
Conversation
- getLastReceived checks the first message too. - WAV encoding interleaves audio with three or more channels at the right offsets; the internal encodeToWaw is renamed to encodeToWav. - NumericInput steps an empty value to min, or to 0 without a lower bound, instead of emitting "-Infinity". - .xlsb files get their own MIME type and the spreadsheet icon. - MessageRepliesCountButton uses labelSingle only for a single reply. - InfiniteScroll and InfiniteScrollPaginator remove the wheel listener on unmount when useCapture is true. - useStateStore returns a new selection when it gains a key or an array selection grows with the same prefix. - createTextComposerEmojiMiddleware no longer mutates its defaults, so options passed to one call do not leak into later ones. - Replacing a channel releases only that channel's reply threads, not threads of other channels bound as a slot base. - DownloadButton renders nothing for an unsafe URL instead of a link to about:blank. - The poll creation dialog does not send the composer when no poll was created. - NotificationList swaps immediately only to a newer notification of the same type; an older one waits for the dwell window. - useLatestMessagePreview maps only the sending status to a delivery status. - A nested WithDragAndDropUpload keeps its style.
- Delete the unused CardAudio component (its styles stay) and the unused
useThreadState hook.
- Drop the mock-builders helpers for the ChannelState, ChannelAction and
Typing contexts, which no longer exist.
- Remove unreachable branches: the email case in renderText's link branch,
VirtualizedMessageList's null check on its always-defined message array, and
the ID fallbacks in useIncomingMessageAnnouncements.
- Remove the unused unreadCount parameter of the internal
useUnreadMessagesNotification and the array fallback for hasMoreHead.
- Replace the mention regex in mentionsMarkdownPlugin with the equivalent
endsWith('@') check.
- Move a mid-file import in AttachmentContainer to the top.
- Tests: drop a dead context mock and an ignored Channel prop, and re-enable
the snap-back spec in MessageList, which passes.
- handleActionWarning and reactionHandlerWarning no longer point at the removed ChannelAction and ChannelState contexts. - Test names drop history wording, ticket IDs and an em-dash. - Doc links to AriaLiveAnnounceOptions and TranslationDictionary, which do not resolve in their files, become code spans.
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review info
π Walkthrough
Merge Risk: βͺ Minimal Β· up to
|
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## docs/tidy-src-comments #3334 +/- ##
==========================================================
+ Coverage 87.02% 87.72% +0.70%
==========================================================
Files 547 545 -2
Lines 16251 16217 -34
Branches 5097 5077 -20
==========================================================
+ Hits 14142 14227 +85
+ Misses 2109 1990 -119 β View full report in Codecov by Harness. π New features to boost your workflow:
|
|
Size Change: -1.39 kB (-0.16%) Total Size: 847 kB π¦ View Changed
βΉοΈ View Unchanged
|
## [15.0.0-rc.3](v15.0.0-rc.2...v15.0.0-rc.3) (2026-10-28) ### β BREAKING CHANGES * channel.watch() resolves with the channel instance to use (the channel, or the instance that superseded it), not the server response: read channel.data, channel.state and channel.messagePaginator instead. - channel.watch() sends no query for a channel already watched and loaded unless it asks for options the current watch was not sent with, so it no longer refreshes one: refresh with channel.reload(), load other messages through channel.messagePaginator. - A channel.watch() while another with the same options is in flight joins it instead of sending a request. * **MessageList:** useMessageListScrollManager no longer takes onScrollToTop. Loading older messages keeps the message the reader was looking at in place, also when loading starts at the very top, instead of pinning the newly loaded page to the top. - InfiniteScrollPaginator's loadNextDebounceMs now rate-limits the edge check while scrolling (the first check runs at once, then at most once per loadNextDebounceMs) instead of waiting until scrolling stops for that long. Older and newer pages start loading before the reader reaches the edge. - MessageList and VirtualizedMessageList pass showNotification to NewMessageNotification only when a message from someone else arrives while the list is scrolled up. Being on an older message set no longer shows it; ScrollToLatestMessageButton signals that. - In a channel, ScrollToLatestMessageButton shows the current user's unread count from the channel's read state instead of counting message.new events, so messages a reconnect brought in are included. In a thread it counts new replies from 0. * marker: the removals are v14 API, so the branch has a `fix!:` commit with a `BREAKING CHANGE:` footer, per the AGENTS.md convention. The footer to keep in the squash commit: * `MessageList` no longer accepts `messages`, `hasMore`, `jumpToLatestMessage`, `loadingMoreNewer` or `messageLimit`, and `VirtualizedMessageList` no longer accepts `messages`; the lists render and paginate the message paginator. `CustomClasses.chatContainer` and the `ComponentContext.LoadingErrorIndicator` slot are removed. Inside `ChatView` the channel list no longer renders its own `str-chat <theme>` scope. See ai-docs/v15-breaking-changes.md (BC-019, BC-046, BC-047, BC-073, BC-074). Verification: `yarn lint`, `tsc -p tsconfig.lib.json --noEmit`, `yarn types:scripts`, `yarn validate-translations` and `yarn test` (281 files, 3090 tests) pass. `yarn build`, `validate-cjs`, `validate-esm`, `validate-entry-isolation`, and the tutorial and vite example builds passed before the rebase onto the guides branch, which brought in only docs and the api-surface script. The ai-chatbot example build was not verified: it hung locally in a sandboxed environment. The theme-scope change was not checked visually in a browser. ### UI Changes No intended visual change inside `ChatView`. Outside `ChatView`, the channel list picks up the design tokens again, as in v14. The `MessageList` loading indicator now appears while older messages load. No screenshots: the examples need Stream credentials to run. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Gallery items can display message-specific timestamp overrides. * Reply-count buttons honor a messageβs custom thread-opening behavior. * Standalone channel lists now inherit the chat theme, and channel-detail actions use workspace navigation. * `useMessagePaginator` and `useIsCooldownActive` are available from the package entry point. * Message timestamps can render with an explicit message outside a message context. * **Bug Fixes** * Message-list loading indicators and pagination behavior now reflect active page loads more accurately. * Workspace navigation warns when navigation actions are used without a provider. * **Breaking Changes** * Removed legacy message-list props and the `LoadingErrorIndicator` component override slot. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ### Bug Fixes * correct issues found during the comment cleanup ([#3334](#3334)) ([7f87026](7f87026)) * **examples:** translate the voice visualization keys in the vite example ([#3352](#3352)) ([c88ab33](c88ab33)), closes [#3347](#3347) * **MediaRecorder:** stop the recording timer when the preview unmounts ([#3351](#3351)) ([3c8b30a](3c8b30a)) * **MessageList:** keep the reader's place on older pages and count only arrived messages as new ([#3342](#3342)) ([ab00d67](ab00d67)) * remove dead v15 surface and restore v14 behaviors found by the API audit ([#3328](#3328)) ([d721f40](d721f40)), closes [#3327](#3327) [#3305](#3305) [#3237](#3237) ### Features * **ai-components:** add useHeardText for voice-paced text ([#3348](#3348)) ([ec7c956](ec7c956)), closes [#3343](#3343) [#3344](#3344) [#3344](#3344) [#3343](#3343) [#3339](#3339) [#3347](#3347) * **ai-components:** add VoiceWave and VoiceGlow voice-agent visualizations ([#3347](#3347)) ([216d00d](216d00d)), closes [#3339](#3339) [#3339](#3339) [#3339](#3339) ### Refactors * call Channel.watch(), which replaces ensureWatched() in stream-chat ([#3346](#3346)) ([0100d98](0100d98))
|
π This PR is included in version 15.0.0-rc.3 π The release is available on: Your semantic-release bot π¦π |
Goal
Fix the code issues noticed while tidying comments in #3332. Each item was checked against the code (and against
stream-chat10.0.0-rc.22 where it depends on LLC behavior) before changing anything. Stacked on #3332: its branch is the base, so merge that first.Implementation details
Three commits, kept apart so they can be reviewed separately:
fix: correct logic bugs (each with a regression test that fails without the fix)
getLastReceivednever checked the first message (i > 0).encodeToWawis renamed toencodeToWav(not exported from any entry point).NumericInput: stepping an empty field with nominemitted"-Infinity"; it now steps tomin, or 0..xlsbmapped to the.xlamMIME type, so it got the fallback icon.MessageRepliesCountButtonwith onlylabelSinglerendered "1 " for any count.InfiniteScroll/InfiniteScrollPaginatornever removed thewheellistener whenuseCapturewas true. The existing test pinned the wrong removal and is updated.useStateStorereturned the stale cached selection when the selection gained a key or an array selection grew with the same prefix. Otherwise unchanged; seven new tests cover the cache.createTextComposerEmojiMiddlewaremutated its module-level defaults, leaking one call's options into later calls.cid) are released; without one the behavior is unchanged.DownloadButtonrendered a link toabout:blankfor an unsafe URL; it now renders nothing.send()even whencreatePoll()returned without a poll, which would send drafted text instead.NotificationListimmediately swapped in an older notification of the same type (with a LIFO queue), skipping the dwell window.useLatestMessagePreviewcast any message status to a delivery status (e.g.receivedleaked into the publicdeliveryStatus).WithDragAndDropUploaddropped itsstyle.refactor: remove dead internal code: the unused
CardAudiocomponent anduseThreadStatehook,mock-buildershelpers for contexts removed in v15, unreachable branches, an unused internal parameter, a mid-file import. The skipped snap-back spec inMessageList.test.tsxpasses (and fails with its guard disabled), so it is re-enabled. Public API is untouched; everything removed is internal perscripts/api-surface.mts.chore: reword stale text:
handleActionWarning/reactionHandlerWarningno longer mention the removed ChannelAction/ChannelState contexts, test names drop history wording and ticket IDs, and{@link}targets that do not resolve become code spans. Not()copy changed.Not changed here, open for a decision: jump-to-latest from older history does not scroll (the v10 paginator suppresses the focus signal by default and autoscroll skips the merge into the head), the missing
str-chat__message-text-innerclass,CalloutputtingclassNameon its close button, theSlotbase remounting on the first and last layer, unused public props (getErrorNotification,acceptedFiles,activeChannel,overflowCount,MessageReactions.reverse) andAudioPlayerState.playbackErrornever being written.Checks:
yarn lint,tsc -p tsconfig.lib.json --noEmit,yarn validate-translationsandyarn test(287 files, 3126 tests) pass.yarn types:testsgoes from 1004 to 1000 errors, none on changed lines.UI Changes
No visual changes. Behavior changes are limited to the fixes above.
Summary by CodeRabbit
New Features
Bug Fixes