Skip to content

Conversation

xsahil03x
Copy link
Member

@xsahil03x xsahil03x commented Jun 10, 2025

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced flexible and customizable reaction bubble overlays for displaying and picking reactions in chat messages.
    • Added new widgets for reaction indicators and icon lists, enabling enhanced reaction visualization and interaction.
    • Added widgets to listen for size changes and to flexibly size child widgets.
    • Added sorting options for reaction groups by score, count, and timestamps.
  • Improvements

    • Refined reaction picker and indicator layouts for more consistent alignment and appearance.
    • Enhanced message card and reaction display logic for better adaptability and styling.
    • Simplified and unified callback signatures for reaction picker icons.
    • Improved theme handling for message directionality.
  • Bug Fixes

    • Corrected logic for determining message theme direction in certain scenarios.
  • Refactor

    • Replaced legacy reaction indicator and alignment logic with new overlay-based implementations.
    • Streamlined the structure and rendering of message and reaction components for maintainability.
  • Tests

    • Updated tests to support new overlay system and revised callback signatures.
Before After
simulator_screenshot_7D4D867A-0121-433D-B4AE-099224075BF8 simulator_screenshot_1365DD3F-DFEC-4970-BFCF-08854F57A63D

Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

Walkthrough

This update introduces a comprehensive refactor and enhancement of the chat message reaction system. It adds new overlay widgets for reaction indicators and pickers, customizes layout and alignment logic, and introduces utility widgets for flexible sizing and size change detection. Legacy reaction indicator and alignment files are removed, and several callback and layout APIs are simplified or unified.

Changes

File(s) Change Summary
reaction_group.dart Added ReactionSorting class with static comparators for sorting ReactionGroup objects.
message_actions_modal.dart, message_reactions_modal.dart Refactored to use new overlay widgets for reaction pickers, simplifying alignment and header logic.
message_card.dart Updated margin logic to be direction-aware and based on reverse and failed state.
message_widget.dart Removed showReactionTail property; replaced FractionallySizedBox with new FlexibleFractionallySizedBox for layout.
message_widget_content.dart Refactored message row: replaced avatar/message card logic with extension, added ReactionIndicatorBubbleOverlay, extracted private helper, removed legacy reaction indicator.
flexible_fractionally_sized_box.dart Added new widget for flexible fractional sizing of child widgets.
size_change_listener.dart Added widget to detect and notify on size changes of child widgets.
reaction_indicator.dart Deleted: Removed old reaction indicator widget.
reaction_indicator_bubble_overlay.dart Added overlay widget for displaying reaction indicator bubbles.
reaction_indicator_icon_list.dart Added widget and supporting classes for displaying lists of reaction indicator icons.
reaction_picker.dart Changed default padding for picker; updated documentation and conditional extra padding logic.
reaction_picker_bubble_overlay.dart Added overlay widget for displaying reaction pickers attached to messages.
reaction_picker_icon_list.dart Simplified callback signatures, added icon size property, and unified icon building logic.
reaction_bubble_overlay.dart Added comprehensive overlay system for rendering reaction bubbles with custom painting and positioning.
reactions_align.dart Deleted: Removed extension for calculating reaction picker alignment.
user_reactions.dart Refactored import and reaction bubble logic, switched to custom-painted bubble and icon list.
stream_chat_theme.dart Fixed logic inversion in getMessageTheme regarding the reverse parameter.
stream_chat_flutter.dart Removed export of deleted reaction_indicator.dart.
message_actions_modal_test.dart, message_reactions_modal_test.dart Updated tests: removed Align wrappers, wrapped widget trees in Portal for overlay support.
reaction_picker_icon_list_test.dart Updated test callback signatures to match new parameterless API.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MessageWidget
    participant ReactionIndicatorBubbleOverlay
    participant ReactionPickerBubbleOverlay
    participant ReactionBubbleOverlay

    User->>MessageWidget: Tap on message/reaction
    MessageWidget->>ReactionIndicatorBubbleOverlay: Display reaction indicator
    MessageWidget->>ReactionPickerBubbleOverlay: Display reaction picker overlay (on action)
    ReactionIndicatorBubbleOverlay->>ReactionBubbleOverlay: Position and render indicator bubble
    ReactionPickerBubbleOverlay->>ReactionBubbleOverlay: Position and render picker bubble
    ReactionPickerBubbleOverlay-->>User: User picks a reaction
    ReactionPickerBubbleOverlay->>MessageWidget: Notify reaction picked
    MessageWidget->>MessageWidget: Update message reactions
Loading

Suggested reviewers

  • renefloor

Poem

In the meadow of code where chat bubbles bloom,
Reactions now sparkle, with overlays in the room.
Flexible boxes stretch, icons line up with pride,
Old widgets retire, as new overlays glide.
With every tap and smile, a rabbit hops in delight—
Chatting is now even more bright!
🐇✨

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • DFEC-4970: Entity not found: Issue - Could not find referenced Issue.

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@xsahil03x xsahil03x changed the base branch from master to v10.0.0 June 10, 2025 22:45
@xsahil03x
Copy link
Member Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

✅ 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.

Copy link
Contributor

@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.

Actionable comments posted: 10

🔭 Outside diff range comments (2)
packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart (1)

675-682: 💡 Verification agent

❓ Verification inconclusive

getMessageTheme Javadoc contradicts implementation (logic inversion)

The new implementation now returns ownMessageTheme when reverse == true, but the comment still claims the opposite, which will mislead maintainers and 3rd-party integrators.

-  /// If [reverse] is true, it returns the [otherMessageTheme], otherwise it
-  /// returns the [ownMessageTheme].
+  /// If [reverse] is true, it returns the [ownMessageTheme], otherwise it
+  /// returns the [otherMessageTheme].

Please update either the documentation or the code so they agree, and double-check all callers (e.g. tests in message_reactions_modal_test.dart and message_actions_modal_test.dart) for unintended behavioural changes.


Update Javadoc in getMessageTheme to match implementation

The current documentation is inverted relative to the code, which returns ownMessageTheme when reverse == true. Please update the comment so it accurately reflects the logic:

• File: packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart (lines 675–682)

-  /// If [reverse] is true, it returns the [otherMessageTheme], otherwise it
-  /// returns the [ownMessageTheme].
+  /// If [reverse] is true, it returns the [ownMessageTheme], otherwise it
+  /// returns the [otherMessageTheme].

• Double-check any callers (e.g. in message_reactions_modal_test.dart and message_actions_modal_test.dart) to ensure they still behave as expected after this documentation update.

packages/stream_chat_flutter/lib/src/message_modal/message_actions_modal.dart (1)

70-97: ⚠️ Potential issue

showReactionPicker flag is ignored & theme is unused – functional regression.

The previous implementation respected showReactionPicker.
After refactor the picker overlay is always built, so callers cannot hide it.
Additionally, theme is now an unused local producing a linter warning.

-    final theme = StreamChatTheme.of(context);
 ...
-    return StreamMessageModal(
-      spacing: 4,
-      alignment: alignment,
-      headerBuilder: (context) => ReactionPickerBubbleOverlay(
-        message: message,
-        reverse: reverse,
-        anchorOffset: const Offset(0, -8),
-        onReactionPicked: onReactionPicked,
-        reactionPickerBuilder: reactionPickerBuilder,
-        child: IgnorePointer(child: messageWidget),
-      ),
+    if (!showReactionPicker) {
+      return StreamMessageModal(
+        spacing: 4,
+        alignment: alignment,
+        headerBuilder: (_) => IgnorePointer(child: messageWidget),
+        contentBuilder: _buildContent,
+      );
+    }
+
+    return StreamMessageModal(
+      spacing: 4,
+      alignment: alignment,
+      headerBuilder: (context) => ReactionPickerBubbleOverlay(
+        message: message,
+        reverse: reverse,
+        anchorOffset: const Offset(0, -8),
+        onReactionPicked: onReactionPicked,
+        reactionPickerBuilder: reactionPickerBuilder,
+        child: IgnorePointer(child: messageWidget),
+      ),
       contentBuilder: _buildContent,
     );

(Extract _buildContent to keep the diff small.)

Fixing this restores expected behaviour and removes the dead theme variable.

🧹 Nitpick comments (11)
packages/stream_chat_flutter/test/src/message_modal/message_actions_modal_test.dart (1)

234-257: Nested Portal roots – harmless but redundant

_wrapWithMaterialApp introduces a Portal as the root, while widgets under test (StreamMessageActionsModal, …ReactionsModal, …BubbleOverlay) also create their own Portal instances.
flutter_portal supports nesting, yet extra roots marginally affect layout passes.

Not blocking, but you could drop the outer Portal and rely on the widget-under-test to host overlays, simplifying the test tree.

packages/stream_chat_flutter/test/src/message_modal/message_reactions_modal_test.dart (1)

247-276: Same observation as above – consider removing the top-level Portal wrapper to keep the test harness minimal.

packages/stream_chat/lib/src/core/models/reaction_group.dart (1)

37-41: Typo in documentation reference.

/// Creates a copy of [Reaction] with specified attributes overridden.[ReactionGroup].
A small fix prevents IDE mis-references.

packages/stream_chat_flutter/lib/src/message_widget/message_card.dart (1)

165-170: Avatar-overlap regression risk.

Previous logic added start/end margin when an avatar was shown; the new logic gates margin only on isFailedState. If the avatar is visible for successful messages the bubble may now clash with the avatar.

Please verify layout for:
showUserAvatar == DisplayWidget.gone vs DisplayWidget.show
isFailedState == false

You might want to re-introduce avatar-based spacing or make 12.0 derived from messageTheme.avatarSize.

packages/stream_chat_flutter/lib/src/reactions/picker/reaction_picker.dart (1)

111-116: Padding additive logic may double custom horizontal padding.

padding.add(extraPadding) unconditionally adds extraPadding when there is more than one icon.
If callers already pass horizontal padding (e.g. EdgeInsets.symmetric(horizontal: 8)), the result becomes 8 + 4 = 12 which could break pixel-perfect designs.

Consider:

-        padding: padding.add(extraPadding),
+        padding: EdgeInsets.only(
+          top: padding.top,
+          bottom: padding.bottom,
+          left: padding.left + (isSinglePickerIcon ? 0 : 4),
+          right: padding.right + (isSinglePickerIcon ? 0 : 4),
+        ),

Or document that the widget adds 4 px horizontally when multiple icons are present.

packages/stream_chat_flutter/lib/src/reactions/indicator/reaction_indicator_bubble_overlay.dart (1)

47-50: Target alignment hard-codes 1 / -1; consider textDirection.

AlignmentDirectional(reverse ? -1 : 1, -1) assumes LTR when reverse is false. In RTL locales the bubble tail may attach to the wrong side. Derive alignment from Directionality.of(context) instead of reverse.

packages/stream_chat_flutter/lib/src/reactions/user_reactions.dart (1)

106-109: Lookup of reaction icons is O(N) on every build – consider caching or a Map.

firstWhere scans the full reactionIcons list each time _UserReactionItem.build is executed.
With large custom icon sets or fast-scrolling reaction lists this quickly adds up.

-final reactionIcon = reactionIcons.firstWhere(
-  (it) => it.type == reaction.type,
-  orElse: () => const StreamReactionIcon.unknown(),
-);
+// Pre–compute a `{type: icon}` map once in `StreamChatConfiguration`
+// or at least convert locally before the loop:
+final iconByType = {
+  for (final i in reactionIcons) i.type: i,
+};
+final reactionIcon = iconByType[reaction.type] ??
+    const StreamReactionIcon.unknown();
packages/stream_chat_flutter/lib/src/reactions/indicator/reaction_indicator.dart (1)

70-78: isSingleIndicatorIcon recomputes length – minor micro-optimisation.

indicatorIcons is an Iterable; length traverses it. Convert to a List once and reuse.

-    final isSingleIndicatorIcon = indicatorIcons?.length == 1;
-    final extraPadding = switch (isSingleIndicatorIcon) {
+    final indicatorIconList = [...indicatorIcons];
+    final isSingleIndicatorIcon = indicatorIconList.length == 1;
+    final extraPadding = switch (isSingleIndicatorIcon) {
 ...
-    final indicator = ReactionIndicatorIconList(
-      indicatorIcons: [...?indicatorIcons],
+    final indicator = ReactionIndicatorIconList(
+      indicatorIcons: indicatorIconList,
     );
packages/stream_chat_flutter/lib/src/message_modal/message_reactions_modal.dart (1)

109-115: Minor – extract constant 0.78 or document its rationale.

Hard-coded width factors sprinkled across modals make later tuning hard. Consider a named constant or exposing it via the theme/config.

packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart (1)

426-438: Consider making the extension more specific to avoid conflicts.

The extension on generic Iterable<T> with a generic method name addConditionally could potentially conflict with other extensions in the codebase or third-party packages.

Consider one of these approaches:

  1. Make it a private extension specific to this file:
-extension<T> on Iterable<T> {
+extension _MessageWidgetIterableExtension<T> on Iterable<T> {
  1. Or move it to a utility class:
class WidgetListUtils {
  static Iterable<T> addConditionally<T>(
    Iterable<T> items,
    T? item, {
    required bool Function(T element) condition,
    bool reverse = false,
  }) sync* {
    for (final element in items) {
      if (item != null && !reverse && condition(element)) yield item;
      yield element;
      if (item != null && reverse && condition(element)) yield item;
    }
  }
}
packages/stream_chat_flutter/lib/src/reactions/reaction_bubble_overlay.dart (1)

1-2: Consider removing unnecessary ignore comment.

The cascade_invocations lint ignore might not be necessary. If there are no cascade invocation warnings in this file, this comment should be removed.

If the ignore is not needed, remove it:

-// ignore_for_file: cascade_invocations
-
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31b2809 and 3198045.

⛔ Files ignored due to path filters (12)
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_light.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_reversed_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_reversed_light.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_reversed_with_reactions_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_reversed_with_reactions_light.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_with_reactions_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_with_reactions_light.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_reactions_modal_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_reactions_modal_light.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_reactions_modal_reversed_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_reactions_modal_reversed_light.png is excluded by !**/*.png
📒 Files selected for processing (23)
  • packages/stream_chat/lib/src/core/models/reaction_group.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/message_modal/message_actions_modal.dart (2 hunks)
  • packages/stream_chat_flutter/lib/src/message_modal/message_reactions_modal.dart (2 hunks)
  • packages/stream_chat_flutter/lib/src/message_widget/message_card.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart (2 hunks)
  • packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart (4 hunks)
  • packages/stream_chat_flutter/lib/src/misc/flexible_fractionally_sized_box.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/misc/size_change_listener.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/indicator/reaction_indicator.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/indicator/reaction_indicator_bubble_overlay.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/indicator/reaction_indicator_icon_list.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/picker/reaction_picker.dart (3 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/picker/reaction_picker_bubble_overlay.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/picker/reaction_picker_icon_list.dart (7 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/reaction_bubble_overlay.dart (1 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/reaction_indicator.dart (0 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/reactions_align.dart (0 hunks)
  • packages/stream_chat_flutter/lib/src/reactions/user_reactions.dart (3 hunks)
  • packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart (1 hunks)
  • packages/stream_chat_flutter/lib/stream_chat_flutter.dart (0 hunks)
  • packages/stream_chat_flutter/test/src/message_modal/message_actions_modal_test.dart (3 hunks)
  • packages/stream_chat_flutter/test/src/message_modal/message_reactions_modal_test.dart (3 hunks)
  • packages/stream_chat_flutter/test/src/reactions/reaction_picker_icon_list_test.dart (4 hunks)
💤 Files with no reviewable changes (3)
  • packages/stream_chat_flutter/lib/stream_chat_flutter.dart
  • packages/stream_chat_flutter/lib/src/reactions/reaction_indicator.dart
  • packages/stream_chat_flutter/lib/src/reactions/reactions_align.dart
🔇 Additional comments (5)
packages/stream_chat_flutter/test/src/reactions/reaction_picker_icon_list_test.dart (1)

62-66: Callback signature change – lost reaction context?

onPressed is now VoidCallback; the reaction type is no longer passed to callers.
That’s fine for tests, but production code may still need the selected type. Ensure ReactionIconButton/ReactionPickerIconList derive the type from internal state (e.g. the ReactionPickerIcon) and surface it through higher-level callbacks (onReactionPicked).

If that hand-off was removed unintentionally, re-introduce a typed callback to avoid extra look-ups.

packages/stream_chat_flutter/lib/src/reactions/picker/reaction_picker_bubble_overlay.dart (1)

1-61: Well-implemented reaction picker bubble overlay.

The implementation is clean and follows Flutter best practices with proper documentation, const constructors, and appropriate theme usage.

packages/stream_chat_flutter/lib/src/reactions/picker/reaction_picker_icon_list.dart (1)

10-10: Excellent API simplification and improvements.

The changes improve the API design:

  • Using ValueSetter<Reaction> aligns with Flutter conventions
  • Simplified VoidCallback removes unnecessary parameters
  • Private _builder with public build() method provides better encapsulation
  • Icon size property allows flexible sizing

Also applies to: 28-32, 185-191, 225-243, 263-279

packages/stream_chat_flutter/lib/src/reactions/reaction_bubble_overlay.dart (1)

279-371: Well-implemented custom painter with good performance considerations.

The ReactionBubblePainter implementation is excellent:

  • Efficient path combination for bubble and tail circles
  • Proper use of RepaintBoundary in the default builder
  • Clean separation of mask, border, and fill painting
packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart (1)

710-713: 👍 Direction-aware alignment is a solid improvement

Switching from Alignment.centerRight/Left to AlignmentDirectional.centerEnd/Start automatically respects the current TextDirection, giving correct RTL support without additional code.
Looks good as-is.

@xsahil03x xsahil03x marked this pull request as ready for review June 16, 2025 13:45
@xsahil03x
Copy link
Member Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

✅ 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.

Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 80.09828% with 81 lines in your changes missing coverage. Please review.

Please upload report for BASE (v10.0.0@396fcca). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ib/src/reactions/indicator/reaction_indicator.dart 3.22% 30 Missing ⚠️
...ter/lib/src/reactions/reaction_bubble_overlay.dart 79.16% 25 Missing ⚠️
...lib/src/message_widget/message_widget_content.dart 83.82% 11 Missing ⚠️
...tream_chat/lib/src/core/models/reaction_group.dart 0.00% 8 Missing ⚠️
...flutter/lib/src/message_widget/message_widget.dart 91.22% 5 Missing ⚠️
.../lib/src/misc/flexible_fractionally_sized_box.dart 94.11% 1 Missing ⚠️
...chat_flutter/lib/src/reactions/user_reactions.dart 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             v10.0.0    #2277   +/-   ##
==========================================
  Coverage           ?   63.57%           
==========================================
  Files              ?      404           
  Lines              ?    25274           
  Branches           ?        0           
==========================================
  Hits               ?    16067           
  Misses             ?     9207           
  Partials           ?        0           

☔ 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.

@xsahil03x
Copy link
Member Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

✅ 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.

Copy link
Contributor

@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.

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart (1)

264-266: Row still uses CrossAxisAlignment.end; previous feedback unresolved.
end breaks the expected baseline alignment for incoming messages – please revert to start.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fba419e and 627bb98.

⛔ Files ignored due to path filters (6)
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_light.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_reversed_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_actions_modal_reversed_light.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_reactions_modal_dark.png is excluded by !**/*.png
  • packages/stream_chat_flutter/test/src/message_modal/goldens/ci/stream_message_reactions_modal_light.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • packages/stream_chat_flutter/CHANGELOG.md (1 hunks)
  • packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart (2 hunks)
  • packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart (4 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/stream_chat_flutter/CHANGELOG.md
🧰 Additional context used
🪛 GitHub Check: codecov/patch
packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart

[warning] 309-313: packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart#L309-L313
Added lines #L309 - L313 were not covered by tests


[warning] 350-354: packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart#L350-L354
Added lines #L350 - L354 were not covered by tests


[warning] 431-431: packages/stream_chat_flutter/lib/src/message_widget/message_widget_content.dart#L431
Added line #L431 was not covered by tests

packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart

[warning] 742-746: packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart#L742-L746
Added lines #L742 - L746 were not covered by tests

🔇 Additional comments (1)
packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart (1)

699-707: Validate widthFactor before passing it to FlexibleFractionallySizedBox.

widthFactor is forwarded directly without guarding against > 1, < 0, or NaN.
If FlexibleFractionallySizedBox hasn’t yet implemented the tighter assertions/clamping requested in previous reviews, an out-of-range value will overflow the layout in release builds.

 child: FlexibleFractionallySizedBox(
-  widthFactor: widget.widthFactor,
+  // Ensure safe range [0, 1].
+  widthFactor: widget.widthFactor.clamp(0.0, 1.0),

Alternatively, add a runtime assert in the widget’s constructor.

@xsahil03x xsahil03x merged commit eb9d91c into v10.0.0 Jun 17, 2025
9 checks passed
@xsahil03x xsahil03x deleted the refactor/reaction-bubble branch June 17, 2025 14:01
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