Skip to content

Rename MessageMenu components to MessageActions#6356

Merged
gpunto merged 3 commits intov7from
mv-messagemenu-messageactions
Apr 10, 2026
Merged

Rename MessageMenu components to MessageActions#6356
gpunto merged 3 commits intov7from
mv-messagemenu-messageactions

Conversation

@gpunto
Copy link
Copy Markdown
Contributor

@gpunto gpunto commented Apr 10, 2026

Goal

Rename "MessageMenu" components to "MessageActions" to align naming across platforms.

Implementation

  • Rename SelectedMessageMenu composable to MessageActions and move it from selectedmessage to messageactions package
  • Rename MessageMenuHeader to MessageActionsHeader
  • Rename MessageOptionItemVisibility to MessageActionsOptionsVisibility
  • Rename relevant ChatComponentFactory methods and corresponding params classes
  • Remove MessageOptionsTheme and ReactionOptionsTheme, consolidating their settings into a new MessageActionsConfig inside ChatUiConfig

Testing

  1. Long-press a message → verify the message actions overlay appears and works correctly
  2. Check that reaction options and message options are displayed as before

Summary by CodeRabbit

  • Refactor
    • Reorganized message actions UI components for improved API clarity and consistency.
    • Consolidated message actions configuration into a unified ChatUiConfig structure, replacing legacy theming APIs.
    • Updated component factory references to align with the restructured message actions composables.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@gpunto gpunto added the pr:breaking-change Breaking change label Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.25 MB 5.82 MB 0.57 MB 🔴
stream-chat-android-ui-components 10.60 MB 10.96 MB 0.36 MB 🟡
stream-chat-android-compose 12.81 MB 12.25 MB -0.56 MB 🚀

@gpunto
Copy link
Copy Markdown
Contributor Author

gpunto commented Apr 10, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Walkthrough

A comprehensive refactoring renames message menu components and configuration from "SelectedMessageMenu"/"MessageMenu" naming to "MessageActions" across the codebase, moves files from the selectedmessage package to messageactions, removes legacy theme classes (MessageOptionsTheme, ReactionOptionsTheme), consolidates configuration into ChatUiConfig.messageActions, and updates all dependent call sites, factories, and tests.

Changes

Cohort / File(s) Summary
Message Actions Core Components
ui/components/messageactions/MessageActions.kt, MessageActionsHeader.kt, ReactionCountRow.kt, ReactionsMenu.kt, UserReactionRow.kt
Package moved from selectedmessage to messageactions; public composables renamed from SelectedMessageMenu/MessageMenuHeader to MessageActions/MessageActionsHeader; internal previews updated accordingly.
Component Factory & Parameters
ui/theme/ChatComponentFactory.kt, ChatComponentFactoryParams.kt
Removed MessageMenu* factory functions and parameter types; added MessageActions* equivalents; updated ReactionsMenu/ReactionsMenuContent to delegate to messageactions.* package; parameter types renamed (MessageMenuParamsMessageActionsParams, etc.).
Configuration & Theme Consolidation
ui/theme/ChatTheme.kt, ChatUiConfig.kt
Removed reactionOptionsTheme and messageOptionsTheme parameters/accessors from ChatTheme; added messageActions: MessageActionsConfig property to ChatUiConfig with nested optionVisibility and reactionsEnabled config.
Legacy Theme Removal
ui/theme/MessageOptionsTheme.kt, ReactionOptionsTheme.kt
Deleted entire files; MessageOptionsTheme and ReactionOptionsTheme classes removed from public API.
Visibility & Extensions
messageoptions/MessageActionsOptionsVisibility.kt, util/extensions/MessageActionsOptionsVisibility.kt
Renamed public data class from MessageOptionItemVisibility to MessageActionsOptionsVisibility; updated all extension receiver types from MessageOptionItemVisibility to MessageActionsOptionsVisibility.
Message Overlay & List Integration
ui/messages/ChannelScreen.kt, list/MessageContainer.kt, messageoptions/MessageOptions.kt
Updated component factory calls from MessageMenu/MessageMenuOptions to MessageActions/MessageActionsOptions; swapped visibility config source from messageOptionsTheme.optionVisibility to config.messageActions.optionVisibility.
Tests
ui/messages/MessageActionsTest.kt, ReactionsMenuContentTest.kt, util/extensions/MessageActionsOptionsVisibilityTest.kt
Renamed test class from SelectedMessageMenuTest to MessageActionsTest; updated imports from selectedmessage.* to messageactions.*; updated test type usages from MessageOptionItemVisibility to MessageActionsOptionsVisibility.
Documentation
compose/messages/MessageActions.kt, SelectedReactionsMenu.kt (docs folder)
Updated example code to import and use MessageActions composable instead of SelectedMessageMenu; updated SelectedReactionsMenu examples to import from messageactions package.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes


🐰 A hop, skip, and rebranded jump,
Old menu names in the refactor dump,
MessageActions now leads the way,
With cleaner config to save the day,
Themes retired, fresh code in play! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 13.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and concisely summarizes the main refactoring change: renaming MessageMenu components to MessageActions.
Description check ✅ Passed The description covers Goal, Implementation, and Testing sections as required by the template, though UI Changes, Contributor/Reviewer Checklists, and GIF sections are missing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 mv-messagemenu-messageactions

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.kt (1)

27-28: Consider aligning doc link slugs with “MessageActions” naming.

The snippet was renamed to MessageActions, but the three KDoc links still point to selected-message-menu paths. If the docs URL has been renamed too, update these links for consistency.

Suggested link update
- * [Usage](https://getstream.io/chat/docs/sdk/android/compose/message-components/selected-message-menu/#usage)
+ * [Usage](https://getstream.io/chat/docs/sdk/android/compose/message-components/message-actions/#usage)

- * [Handling Actions](https://getstream.io/chat/docs/sdk/android/compose/message-components/selected-message-menu/#handling-actions)
+ * [Handling Actions](https://getstream.io/chat/docs/sdk/android/compose/message-components/message-actions/#handling-actions)

- * [Customization](https://getstream.io/chat/docs/sdk/android/compose/message-components/selected-message-menu/#customization)
+ * [Customization](https://getstream.io/chat/docs/sdk/android/compose/message-components/message-actions/#customization)

Also applies to: 87-88, 148-149

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.kt`
around lines 27 - 28, The KDoc links in the MessageActions documentation still
reference the old "selected-message-menu" slug; update all occurrences in
MessageActions (KDoc block at top and other KDoc references inside the
MessageActions.kt file, e.g., near the usages around the MessageActions
component) to use the new "message-actions" (or the correct current slug) so the
doc URLs match the renamed snippet and are consistent across the file.
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.kt (1)

211-220: Add explicit thread/state contract to new public config KDoc.

MessageActionsConfig is public and documented, but the KDoc doesn’t explicitly state threading/state expectations (e.g., immutable value object consumed from UI/main context).

As per coding guidelines **/*.kt: Document public APIs with KDoc, including thread expectations and state notes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.kt`
around lines 211 - 220, Update the KDoc for the public data class
MessageActionsConfig to include explicit thread/state contract: state that
MessageActionsConfig is an immutable value object (data class) intended to be
created/observed on the UI/main thread and safe to read from Compose/state
holders, and mention that callers should not mutate it after construction and
should provide new instances for updates; reference MessageActionsConfig and its
optionVisibility: MessageActionsOptionsVisibility property in the doc to make
the contract clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.kt`:
- Around line 211-220: Update the KDoc for the public data class
MessageActionsConfig to include explicit thread/state contract: state that
MessageActionsConfig is an immutable value object (data class) intended to be
created/observed on the UI/main thread and safe to read from Compose/state
holders, and mention that callers should not mutate it after construction and
should provide new instances for updates; reference MessageActionsConfig and its
optionVisibility: MessageActionsOptionsVisibility property in the doc to make
the contract clear.

In
`@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.kt`:
- Around line 27-28: The KDoc links in the MessageActions documentation still
reference the old "selected-message-menu" slug; update all occurrences in
MessageActions (KDoc block at top and other KDoc references inside the
MessageActions.kt file, e.g., near the usages around the MessageActions
component) to use the new "message-actions" (or the correct current slug) so the
doc URLs match the renamed snippet and are consistent across the file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5c426ecf-5169-4694-9ad0-e8a9b5f2b2fd

📥 Commits

Reviewing files that changed from the base of the PR and between 1f1b9c1 and 2c4d5fd.

⛔ Files ignored due to path filters (6)
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_failed_message.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_failed_message_in_dark_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_my_message.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_my_message_in_dark_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_their_message.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_their_message_in_dark_mode.png is excluded by !**/*.png
📒 Files selected for processing (22)
  • stream-chat-android-compose/api/stream-chat-android-compose.api
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/MessageActions.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/MessageActionsHeader.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/ReactionCountRow.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/ReactionsMenu.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/UserReactionRow.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageoptions/MessageActionsOptionsVisibility.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageoptions/MessageOptions.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageContainer.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageOptionsTheme.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ReactionOptionsTheme.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/util/extensions/MessageActionsOptionsVisibility.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/MessageActionsTest.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ReactionsMenuContentTest.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/util/extensions/MessageActionsOptionsVisibilityTest.kt
  • stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.kt
  • stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/SelectedReactionsMenu.kt
💤 Files with no reviewable changes (3)
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ReactionOptionsTheme.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageOptionsTheme.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt

@gpunto gpunto marked this pull request as ready for review April 10, 2026 11:11
@gpunto gpunto requested a review from a team as a code owner April 10, 2026 11:11
@gpunto gpunto force-pushed the mv-messagemenu-messageactions branch from 44c697f to 5d4ab49 Compare April 10, 2026 14:18
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
66.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@gpunto gpunto enabled auto-merge (squash) April 10, 2026 14:41
@gpunto gpunto merged commit 6971069 into v7 Apr 10, 2026
14 of 15 checks passed
@gpunto gpunto deleted the mv-messagemenu-messageactions branch April 10, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:breaking-change Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants