Skip to content

feat: expose internal contexts and composer components in the public API#3242

Merged
oliverlaz merged 1 commit into
masterfrom
feat/export-virtualized-message-list-context
Jul 15, 2026
Merged

feat: expose internal contexts and composer components in the public API#3242
oliverlaz merged 1 commit into
masterfrom
feat/export-virtualized-message-list-context

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

Several components, hooks, and contexts are used internally and referenced by the docs, but were never re-exported from the package barrels β€” so consumers can't import them. This wires them into the public API. Purely additive barrel re-exports; no behavior change.

Newly exported

src/context/index.ts

  • VirtualizedMessageListContext, VirtualizedMessageListContextProvider, useVirtualizedMessageListContext, VirtualizedMessageListContextValue

src/components/index.ts

  • SummarizedMessagePreview, useLatestMessagePreview (+ its ChannelPreviewMessageType, ChannelPreviewDeliveryStatus, LatestMessagePreviewData, UseLatestMessagePreviewParams types)

src/components/MessageComposer/index.ts

  • VoiceRecordingPreviewSlot (component; only its Props type was exported before)
  • MessageComposerActions and AdditionalMessageComposerActions

Why

A docs audit of the v14 React SDK found multiple cookbook/reference pages instructing readers to import these symbols from stream-chat-react, which fails at runtime because the barrels don't re-export them. Rather than route the docs around them, expose the symbols (the docs update is in GetStream/docs-content#1431).

Notes

  • No collisions: none of the newly-exported names are exported elsewhere.
  • AdditionalMessageComposerActions and the four useLatestMessagePreview types ride along via export * β€” intentional; flag if you'd prefer narrower named exports.
  • Not exposed (left internal, unchanged): EditedMessagePreview, SendToChannelCheckbox, restorePreEditSnapshot.

Checks

  • yarn types βœ…
  • yarn eslint (changed files) βœ…
  • Barrel-only change; no tests added. Happy to add export-surface tests if desired.

Summary by CodeRabbit

  • New Features
    • Added support for voice recording previews in the message composer.
    • Exposed additional message composer actions.
    • Added summarized message preview functionality.
    • Added access to virtualized message list context functionality.

These components/hooks/contexts were used internally and referenced by the
docs but were never re-exported from the package barrels, so consumers could
not import them. Wire them into the public API:

- context: VirtualizedMessageListContext, VirtualizedMessageListContextProvider,
  useVirtualizedMessageListContext, VirtualizedMessageListContextValue
- components: SummarizedMessagePreview + useLatestMessagePreview (and its
  ChannelPreviewMessageType / ChannelPreviewDeliveryStatus /
  LatestMessagePreviewData / UseLatestMessagePreviewParams types)
- message composer: VoiceRecordingPreviewSlot component; MessageComposerActions
  and AdditionalMessageComposerActions

Purely additive barrel re-exports; no behavior change. yarn types and eslint pass.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2a37c152-7bcd-4edb-a571-644296c0adf9

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 05236db and 2a83f75.

πŸ“’ Files selected for processing (3)
  • src/components/MessageComposer/index.ts
  • src/components/index.ts
  • src/context/index.ts

πŸ“ Walkthrough

Walkthrough

Additional exports are added to the MessageComposer, components, and context barrel modules, including voice recording previews, composer actions, summarized message previews, and virtualized message list context.

Changes

Public barrel exports

Layer / File(s) Summary
Barrel export surface
src/components/MessageComposer/index.ts, src/components/index.ts, src/context/index.ts
MessageComposer now exports VoiceRecordingPreviewSlot and MessageComposerActions; the components barrel exports SummarizedMessagePreview; and the context barrel exports VirtualizedMessageListContext.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: arnautov-anton, martincupela

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly summarizes the main change: exposing internal contexts and composer components through public API barrels.
Description check βœ… Passed The description covers the goal, implementation, rationale, notes, and checks, with only the UI Changes section omitted.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/export-virtualized-message-list-context

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Size Change: +35 B (0%)

Total Size: 880 kB

πŸ“¦ View Changed
Filename Size Change
dist/cjs/index.js 292 kB +33 B (+0.01%)
dist/es/index.mjs 290 kB +2 B (0%)
ℹ️ View Unchanged
Filename Size
dist/cjs/audioProcessing.js 1.74 kB
dist/cjs/channel-detail.js 22.9 kB
dist/cjs/emojis.js 2.56 kB
dist/cjs/mp3-encoder.js 814 B
dist/cjs/ReactPlayerWrapper.js 547 B
dist/cjs/useChannelHeaderOnlineStatus.js 41 kB
dist/cjs/useMessageComposerController.js 1.01 kB
dist/cjs/useNotificationApi.js 57.5 kB
dist/css/channel-detail.css 2.84 kB
dist/css/emoji-picker.css 178 B
dist/css/emoji-replacement.css 456 B
dist/css/index.css 41.4 kB
dist/es/audioProcessing.mjs 1.65 kB
dist/es/channel-detail.mjs 22.6 kB
dist/es/emojis.mjs 2.48 kB
dist/es/mp3-encoder.mjs 768 B
dist/es/ReactPlayerWrapper.mjs 485 B
dist/es/useChannelHeaderOnlineStatus.mjs 40.5 kB
dist/es/useMessageComposerController.mjs 935 B
dist/es/useNotificationApi.mjs 56.1 kB

compressed-size-action

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 85.21%. Comparing base (05236db) to head (2a83f75).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3242      +/-   ##
==========================================
+ Coverage   85.18%   85.21%   +0.03%     
==========================================
  Files         505      505              
  Lines       15784    15784              
  Branches     5010     5010              
==========================================
+ Hits        13446    13451       +5     
+ Misses       2338     2333       -5     

β˜” View full report in Codecov by Harness.
πŸ“’ 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.

@oliverlaz oliverlaz merged commit 6b6a828 into master Jul 15, 2026
14 checks passed
@oliverlaz oliverlaz deleted the feat/export-virtualized-message-list-context branch July 15, 2026 11:27
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.

2 participants