Skip to content

refactor!: remove deprecated APIs ahead of v14 stable#3086

Open
oliverlaz wants to merge 4 commits intomasterfrom
refactor/remove-deprecated-apis
Open

refactor!: remove deprecated APIs ahead of v14 stable#3086
oliverlaz wants to merge 4 commits intomasterfrom
refactor/remove-deprecated-apis

Conversation

@oliverlaz
Copy link
Copy Markdown
Member

@oliverlaz oliverlaz commented Apr 2, 2026

🎯 Goal

Remove 19 deprecated APIs that have accumulated over multiple major versions (some since v10) before the v14 stable release. This reduces public API surface area and eliminates dead code paths, fallback patterns, and runtime deprecation warnings.

🛠 Implementation details

Removed items grouped by category:

Pin Permissions (7 items)

  • pinPermissions prop from MessageContext, MessageProps, MessageListProps
  • PinEnabledUserRoles and PinPermissions types
  • defaultPinPermissions constant
  • _permissions param from usePinHandler (signature is now (message, notifications))

Pagination Renames (6 items, #1804)

  • hasMore, hasMoreNewer, loadMore, loadMoreNewer from InfiniteScroll — use hasPreviousPage, hasNextPage, loadPreviousPage, loadNextPage
  • refreshing from LoadMoreButton, LoadMorePaginator, PaginatorProps — use isLoading
  • Removed deprecationAndReplacementWarning utility (zero callers remain)

Components & Exports (4 items)

  • Deleted StreamEmoji component
  • Renamed UploadButton/UploadButtonProps exports to FileInput/FileInputProps
  • Removed latestMessage prop from ChannelListItemUI — use latestMessagePreview
  • Removed popperOptions prop from EmojiPicker — use placement

Utilities (2 items)

  • Deleted moveChannelUp (replaced by moveChannelUpwards); updated useMessageNewListener
  • Deleted hasNotMoreMessages (negated duplicate of hasMoreMessagesProbably)

ChannelList Event Listener Hooks (10 items)

  • Deleted useChannelDeletedListener, useChannelHiddenListener, useChannelTruncatedListener, useChannelUpdatedListener, useChannelVisibleListener, useMessageNewListener, useNotificationAddedToChannelListener, useNotificationMessageNewListener, useNotificationRemovedFromChannelListener, useUserPresenceChangedListener
  • These hooks were standalone event listeners consuming ChannelList callback props (e.g. onChannelDeleted, onMessageNew, etc.) — channel list event handling is now managed internally by the stream-chat SDK's ChannelManager

Bug fix

  • Fixed wrong deprecation comment on MessageList.tsx where loadMoreNewer was incorrectly labeled as deprecated

See ai-docs/DEPRECATED_API_REMOVAL_PLAN.md for the full inventory and remaining items.

⚠ Breaking Changes

Removed API Replacement
pinPermissions prop channelCapabilities (already used at runtime)
PinPermissions, PinEnabledUserRoles types channelCapabilities
defaultPinPermissions constant channelCapabilities
usePinHandler(msg, permissions, notifications) usePinHandler(msg, notifications)
hasMore / hasMoreNewer (InfiniteScroll) hasPreviousPage / hasNextPage
loadMore / loadMoreNewer (InfiniteScroll) loadPreviousPage / loadNextPage
refreshing (LoadMoreButton, PaginatorProps) isLoading
StreamEmoji component (removed, no replacement)
moveChannelUp utility moveChannelUpwards
UploadButton / UploadButtonProps FileInput / FileInputProps
latestMessage prop (ChannelListItemUI) latestMessagePreview
popperOptions prop (EmojiPicker) placement
hasNotMoreMessages hasMoreMessagesProbably
useChannelDeletedListener hook Channel list events handled by useChannelListShape
useChannelHiddenListener hook -//-
useChannelTruncatedListener hook -//-
useChannelUpdatedListener hook -//-
useChannelVisibleListener hook -//-
useMessageNewListener hook -//-
useNotificationAddedToChannelListener hook -//-
useNotificationMessageNewListener hook -//-
useNotificationRemovedFromChannelListener hook -//-
useUserPresenceChangedListener hook -//-

🎨 UI Changes

No visual changes — all removals are API-only.

Remove 19 deprecated items from multiple major versions.

BREAKING CHANGE: remove deprecated public APIs
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Size Change: -4.19 kB (-0.68%)

Total Size: 609 kB

📦 View Changed
Filename Size Change
dist/cjs/emojis.js 2.96 kB +4 B (+0.14%)
dist/cjs/index.js 235 kB -1.97 kB (-0.83%)
dist/cjs/WithAudioPlayback.js 42.5 kB -176 B (-0.41%)
dist/es/emojis.mjs 2.47 kB +3 B (+0.12%)
dist/es/index.mjs 233 kB -1.88 kB (-0.8%)
dist/es/WithAudioPlayback.mjs 42.3 kB -176 B (-0.41%)
ℹ️ View Unchanged
Filename Size
dist/cjs/audioProcessing.js 1.32 kB
dist/cjs/mp3-encoder.js 1.27 kB
dist/css/emoji-replacement.css 456 B
dist/css/index.css 45.5 kB
dist/es/audioProcessing.mjs 1.31 kB
dist/es/mp3-encoder.mjs 756 B

compressed-size-action

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.44%. Comparing base (30e45fa) to head (1af4b5d).

Files with missing lines Patch % Lines
...ponents/InfiniteScrollPaginator/InfiniteScroll.tsx 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3086      +/-   ##
==========================================
+ Coverage   79.57%   80.44%   +0.86%     
==========================================
  Files         426      414      -12     
  Lines       12181    11975     -206     
  Branches     3914     3862      -52     
==========================================
- Hits         9693     9633      -60     
+ Misses       2488     2342     -146     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +37 to +44
if (!lockChannelOrder) {
const channelIndex = channels.findIndex(
(channel) => channel.cid === event.cid,
);
if (channelIndex <= 0) return channels;
const channel = channels[channelIndex];
return uniqBy([channel, ...channels], 'cid');
}
Copy link
Copy Markdown
Contributor

@arnautov-anton arnautov-anton Apr 2, 2026

Choose a reason for hiding this comment

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

This should probably use moveChannelUpwards function.

Disregard, it was only used in one hook which was deprecated too and should've been removed (done in 19be5ab).

last_read_at: '2023-12-15T11:49:21.667730943Z',
last_read_message_id: 'SmithAnne-jeIYWT39L56bs79f10Hao',
// @deprecated number of all unread messages across all my unread channels, equals unread_count
total_unread_count: 19,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@oliverlaz not sure why this is marked as deprecated, but I tested this and the WS event returns total_unread_count, so it should not be removed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't have the history here. I found it marked deprecated :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would keep it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The field is still returned by the WS backend and is not
actually deprecated.
@oliverlaz oliverlaz changed the title refactor: remove deprecated APIs ahead of v14 stable refactor!: remove deprecated APIs ahead of v14 stable Apr 7, 2026
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.

3 participants