Skip to content

refactor(ui): rework composer attachments with themes and new variants#112

Open
xsahil03x wants to merge 5 commits intomainfrom
refactor/composer-attachments
Open

refactor(ui): rework composer attachments with themes and new variants#112
xsahil03x wants to merge 5 commits intomainfrom
refactor/composer-attachments

Conversation

@xsahil03x
Copy link
Copy Markdown
Member

@xsahil03x xsahil03x commented May 5, 2026

Summary

  • Per-widget themes for every composer attachment, with matching StreamComponentFactory builder slots and BuildContext extensions.
  • Two new variants: StreamMessageComposerEditMessageAttachment and StreamMessageComposerUnsupportedAttachment.
  • Unified leading/trailing media slot under a themed thumbnail across reply, edit-message, and link-preview previews (thumbnailSize/thumbnailShape/thumbnailSide).

Notable breaking changes

  • Renamed StreamMessageComposerLinkPreviewAttachment.mediathumbnail, and StreamMessageComposerReplyAttachment.trailingthumbnail.
  • Renamed mediaSize/mediaShape/mediaSide on the link-preview theme to thumbnailSize/thumbnailShape/thumbnailSide.
  • StreamMessageComposerMediaFileAttachmentStreamMessageComposerMediaAttachment (dropped the redundant "File" segment).
  • Removed StreamMessageTheme/StreamMessageThemeData/StreamMessageStyle; the reply and link-preview previews now read colors directly from StreamColorScheme.

Smaller changes

  • StreamFileTypeIcon now centers its SVG inside the icon's render box, so it stays centered when given larger constraints.
  • StreamRemoveControl shows a click cursor on web/desktop when hovered.

Test plan

  • melos run analyze
  • melos run test:flutter
  • Regenerate goldens for the link-preview and reply attachment tests (melos run update:goldens) — output drifted from the constraint relaxation and the new themed thumbnail wrapping.
  • Spot-check the composer attachment showcases in the design system gallery (Edit Message, Unsupported, file-icon thumbnails, max-width playground knob).

Summary by CodeRabbit

  • New Features

    • Added several message-composer attachment types (edit, file, link preview, media, reply, unsupported) and streamlined composer variants.
  • Improvements

    • Per-attachment theming and thumbnail customization for richer visuals.
    • Hover/cursor feedback enhanced for interactive controls.
    • Replaced legacy attachment implementations with unified, theme-aware composer components.
  • Documentation

    • Design system gallery updated with playgrounds and showcases for all new attachment types.

@xsahil03x xsahil03x requested a review from a team as a code owner May 5, 2026 14:07
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This PR replaces legacy MessageComposer attachment widgets with a new StreamMessageComposer* family, adds per-attachment theme types and StreamComponentFactory builder slots, removes the old StreamMessageTheme, updates exports, gallery widgetbook entries, and tests, and separately introduces bounded cross-axis support for StreamIntrinsicFlex (StreamIntrinsicBoundedCrossAxis) with related tests and small UX tweaks (mouse cursors, file-icon centering).


Changes

Message Composer Attachment System

Layer / File(s) Summary
Data / Theme Shapes
packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_*_attachment_theme.dart, *.g.theme.dart
Adds seven new per-attachment theme types and generated mixins (attachment, edit-message, file, link-preview, media, reply, unsupported) with lerp/copyWith/merge/==/hashCode.
Global Theme Integration
packages/stream_core_flutter/lib/src/theme/stream_theme.dart, stream_theme.g.theme.dart, stream_theme_extensions.dart, packages/stream_core_flutter/lib/src/theme.dart
Wire new attachment theme fields into StreamTheme (factory/raw/copyWith/lerp/equals/hash), add BuildContext getters, remove former StreamMessageTheme/streamMessageTheme export/getter.
Factory / Customization
packages/stream_core_flutter/lib/src/factory/stream_component_factory.dart, stream_component_factory.g.theme.dart
Add new StreamComponentBuilders builder slots for message-composer attachments and propagate them through raw constructor, copyWith, lerp, merge, equality, and hash.
Core Implementation
packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_*.dart
Introduce new public widgets: StreamMessageComposerAttachment (container) and specific attachments: EditMessage, File, LinkPreview, Media, Reply (with StreamReplyDirection), and Unsupported. Each has a Props type, Default* renderer, and theme-default merging.
Removal of Legacy
packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_*.dart, stream_message_theme.dart, *.g.theme.dart
Deleted legacy implementations: MessageComposerFileAttachment, MessageComposerLinkPreviewAttachment, MessageComposerMediaFileAttachment, MessageComposerReplyAttachment, StreamMessageComposerAttachmentContainer, and the StreamMessageTheme + generated mixins.
Public Exports & Barrel
packages/stream_core_flutter/lib/src/components/message_composer.dart, packages/stream_core_flutter/lib/src/theme.dart
Updated exports to new stream_message_composer_* modules and removed stream_message_theme export; added hide DefaultStreamMessageComposer* clauses for defaults.
Small UX/Accessibility Tweaks
packages/stream_core_flutter/lib/src/components/controls/stream_remove_control.dart, accessories/stream_file_type_icon.dart, apps/design_system_gallery/lib/components/common/stream_tap_target_padding.dart
Wrap remove control and tap-target padding with MouseRegion(cursor: SystemMouseCursors.click) and center SVG alignment in DefaultStreamFileTypeIcon.
Gallery & Tests
apps/design_system_gallery/lib/app/gallery_app.directories.g.dart, apps/design_system_gallery/lib/components/message_composer/*.dart, packages/stream_core_flutter/test/components/message_composer/*_golden_test.dart
Widgetbook entries renamed/added to StreamMessageComposer* naming, new playground/showcase files for edit-message, media, reply, unsupported; golden tests migrated to new APIs and updated props (Text widgets, caption/thumbnail, StreamReplyDirection).
Changelog
packages/stream_core_flutter/CHANGELOG.md
Documented new attachments, per-component theming, themed thumbnail slots, factory builder slots, and UX improvements.

StreamIntrinsicFlex — Bounded Cross-Axis & Tests

Layer / File(s) Summary
API / Marker Widget
packages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dart
Add public StreamIntrinsicBoundedCrossAxis to mark a child for bounded cross-axis measurement; extend parent data with boundedCrossAxis flag.
Layout Algorithm
packages/stream_core_flutter/lib/src/components/common/stream_intrinsic_flex.dart
Introduce bounded cross-axis handling into measurement/layout passes: new helpers _layoutChildOrAddBoundedHint and _appendBoundedHint, update passes to apply cross-axis ceilings for flagged children and re-layout flex children accordingly.
Usage Updates
packages/stream_core_flutter/lib/src/components/reaction/stream_reactions.dart
Wrap reaction bubble child in StreamIntrinsicBoundedCrossAxis when reactions overlap to bound width and preserve z-order/alignment.
Gallery / Playground
apps/design_system_gallery/lib/components/common/stream_intrinsic_flex.dart
Extend playground and showcase with bounded-child demos, per-child bounded flags, and new showcase sections (Bounded Align, Bounded ListView).
Tests
packages/stream_core_flutter/test/components/common/stream_intrinsic_flex_test.dart
Add tests that validate bounded-cross-axis hints and layout behavior under constrained/unconstrained conditions and upstream-culprit scenarios.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes


Poem

A rabbit hops through attachment trees,
New streams and themes dance in the breeze,
Bounded bounds and cursor clicks,
Files, previews, replies, and tricks —
Hooray for tidy composer keys! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/composer-attachments

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 42.79176% with 250 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.82%. Comparing base (639f994) to head (e96a554).

Files with missing lines Patch % Lines
...ream_message_composer_edit_message_attachment.dart 0.00% 58 Missing ⚠️
...hment/stream_message_composer_file_attachment.dart 0.00% 44 Missing ⚠️
...tream_message_composer_unsupported_attachment.dart 0.00% 32 Missing ⚠️
...ment/stream_message_composer_media_attachment.dart 0.00% 30 Missing ⚠️
...essage_composer_edit_message_attachment_theme.dart 9.09% 10 Missing ⚠️
...stream_message_composer_file_attachment_theme.dart 9.09% 10 Missing ⚠️
...tream_message_composer_media_attachment_theme.dart 9.09% 10 Missing ⚠️
...message_composer_unsupported_attachment_theme.dart 9.09% 10 Missing ⚠️
...flutter/lib/src/theme/stream_theme_extensions.dart 42.85% 8 Missing ⚠️
...ents/stream_message_composer_attachment_theme.dart 36.36% 7 Missing ⚠️
... and 6 more

❌ Your patch check has failed because the patch coverage (42.79%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
- Coverage   31.38%   30.82%   -0.56%     
==========================================
  Files         163      171       +8     
  Lines        6319     6559     +240     
==========================================
+ Hits         1983     2022      +39     
- Misses       4336     4537     +201     

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

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.

Actionable comments posted: 3

🧹 Nitpick comments (6)
packages/stream_core_flutter/test/components/message_composer/message_composer_attachment_reply_golden_test.dart (1)

16-76: ⚡ Quick win

Add at least one reply-thumbnail golden scenario.

This matrix validates direction/remove states, but it doesn’t exercise the new thumbnail slot introduced in this PR. Adding one light + one dark thumbnail case will guard the new visual path.

🧪 Minimal coverage addition
         children: [
+          GoldenTestScenario(
+            name: 'incoming_with_thumbnail_no_remove',
+            child: _buildReplyInTheme(
+              StreamMessageComposerReplyAttachment(
+                title: const Text('Reply to John Doe'),
+                subtitle: const Text('We had a great time during our holiday.'),
+                direction: StreamReplyDirection.incoming,
+                onRemovePressed: null,
+                thumbnail: const SizedBox(width: 40, height: 40),
+              ),
+            ),
+          ),
           for (final style in StreamReplyDirection.values)
             GoldenTestScenario(
               name: '${style.name}_no_remove',
@@
         children: [
+          GoldenTestScenario(
+            name: 'incoming_with_thumbnail_no_remove',
+            child: _buildReplyInTheme(
+              StreamMessageComposerReplyAttachment(
+                title: const Text('Reply to John Doe'),
+                subtitle: const Text('We had a great time during our holiday.'),
+                direction: StreamReplyDirection.incoming,
+                onRemovePressed: null,
+                thumbnail: const SizedBox(width: 40, height: 40),
+              ),
+              brightness: Brightness.dark,
+            ),
+          ),
           for (final style in StreamReplyDirection.values)
             GoldenTestScenario(
               name: '${style.name}_no_remove',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/stream_core_flutter/test/components/message_composer/message_composer_attachment_reply_golden_test.dart`
around lines 16 - 76, The golden tests for StreamMessageComposerReplyAttachment
are missing coverage for the new thumbnail slot; add at least one light and one
dark GoldenTestScenario that passes a non-null thumbnail widget into
StreamMessageComposerReplyAttachment (use the existing _buildReplyInTheme helper
and iterate over one or more StreamReplyDirection values or add a dedicated
scenario), name them clearly (e.g., '${style.name}_with_thumbnail_light' and
'${style.name}_with_thumbnail_dark'), and ensure the thumbnail is a simple
deterministic widget (e.g., a small Icon or CircleAvatar) so the new visual path
is exercised in both brightness modes.
apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_link_preview.dart (1)

70-74: ⚡ Quick win

Align use-case naming with gallery convention.

Please rename this Showcase use case to the required convention (Type/Size Variants) and keep/add Real-world Example as its own use case label for consistency in Widgetbook navigation.

As per coding guidelines, "Component use cases should follow the naming convention: 1) Playground (interactive with knobs), 2) Type/Size Variants (all variants), 3) Real-world Example (contextual usage)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_link_preview.dart`
around lines 70 - 74, The `@widgetbook.UseCase` currently named "Showcase" for the
StreamMessageComposerLinkPreviewAttachment component should be renamed to
"Type/Size Variants" to match gallery conventions; update the UseCase annotation
name value for StreamMessageComposerLinkPreviewAttachment accordingly and ensure
there is a separate `@widgetbook.UseCase` with the name "Real-world Example" (add
one if missing) so the component has both "Type/Size Variants" and "Real-world
Example" use cases alongside the existing "Playground" pattern.
apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_unsupported.dart (1)

51-55: ⚡ Quick win

Align this use-case title with the standard naming convention.

Please rename Showcase to Type/Size Variants and keep/add a separate Real-world Example use case.

As per coding guidelines, "Component use cases should follow the naming convention: 1) Playground (interactive with knobs), 2) Type/Size Variants (all variants), 3) Real-world Example (contextual usage)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_unsupported.dart`
around lines 51 - 55, Change the widgetbook use-case names to follow the
standard order: update the `@widgetbook.UseCase` annotation where type is
StreamMessageComposerUnsupportedAttachment to rename the existing use-case from
"Showcase" to "Type/Size Variants", and add a separate `@widgetbook.UseCase` block
named "Real-world Example" (using the same type
StreamMessageComposerUnsupportedAttachment) so both variants and a contextual
example are present; ensure the two use-cases are adjacent and keep other
annotation fields (type/path) unchanged.
apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_reply.dart (1)

73-77: ⚡ Quick win

Normalize the use-case name to the required convention.

Please switch this use-case label from Showcase to Type/Size Variants, and keep/add a dedicated Real-world Example case.

As per coding guidelines, "Component use cases should follow the naming convention: 1) Playground (interactive with knobs), 2) Type/Size Variants (all variants), 3) Real-world Example (contextual usage)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_reply.dart`
around lines 73 - 77, Rename the current `@widgetbook.UseCase` name value from
'Showcase' to 'Type/Size Variants' for the StreamMessageComposerReplyAttachment
use case (the annotation with type StreamMessageComposerReplyAttachment and path
'[Components]/Message Composer'), and add a separate `@widgetbook.UseCase` entry
named 'Real-world Example' that renders the same widget in contextual/usage
form; ensure both useCase annotations remain in the file so the component
follows the required Playground/Type/Size Variants/Real-world Example
convention.
apps/design_system_gallery/lib/components/message_composer/message_composer_file_attachment.dart (1)

72-76: ⚡ Quick win

Update use-case naming to the expected gallery pattern.

Rename Showcase to Type/Size Variants and keep/add Real-world Example for consistent component discovery.

As per coding guidelines, "Component use cases should follow the naming convention: 1) Playground (interactive with knobs), 2) Type/Size Variants (all variants), 3) Real-world Example (contextual usage)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_file_attachment.dart`
around lines 72 - 76, Update the widgetbook use-case naming for
StreamMessageComposerFileAttachment by changing the existing `@widgetbook.UseCase`
name value from "Showcase" to "Type/Size Variants" and add an additional
`@widgetbook.UseCase` entry with name "Real-world Example" (type
StreamMessageComposerFileAttachment) so the component follows the required
Playground/Type/Size Variants/Real-world Example pattern; keep the existing type
reference to StreamMessageComposerFileAttachment and ensure the new use-case
includes the same or appropriate path metadata for component discovery.
apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_edit_message.dart (1)

64-68: ⚡ Quick win

Use the standard use-case label set for this component.

Replace Showcase with Type/Size Variants and keep/add Real-world Example as a dedicated use case to match gallery conventions.

As per coding guidelines, "Component use cases should follow the naming convention: 1) Playground (interactive with knobs), 2) Type/Size Variants (all variants), 3) Real-world Example (contextual usage)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_edit_message.dart`
around lines 64 - 68, The UseCase annotation currently uses the label 'Showcase'
for StreamMessageComposerEditMessageAttachment; update the name value to
'Type/Size Variants' and add a separate UseCase entry named 'Real-world Example'
(keeping the type as StreamMessageComposerEditMessageAttachment) so the
component follows the gallery naming convention (Playground, Type/Size Variants,
Real-world Example).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/stream_core_flutter/CHANGELOG.md`:
- Around line 46-50: The changelog bullets mix legacy and new widget names which
can confuse migrations; update each bullet to include an explicit old→new
mapping (e.g., "MessageComposerFileAttachment →
StreamMessageComposerFileAttachment") and ensure every rename mention references
both the original symbol and its replacement (e.g.,
StreamMessageComposerAttachment replacing
StreamMessageComposerAttachmentContainer, MessageComposerReplyAttachment →
StreamMessageComposerReplyAttachment, MessageComposerLinkPreviewAttachment →
StreamMessageComposerLinkPreviewAttachment, MessageComposerMediaFileAttachment →
StreamMessageComposerMediaAttachment), and also clarify API changes (e.g.,
replace borderColor/borderRadius with shape: OutlinedBorder? and side:
BorderSide? and add style: StreamMessageComposerAttachmentThemeData?) so each
bullet is a direct mapping the reader can copy/paste.

In
`@packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_reply_attachment.dart`:
- Around line 228-235: The VerticalDivider instantiation in
stream_message_composer_reply_attachment (and the similar one in
stream_message_composer_edit_message_attachment) uses an unsupported radius
parameter which causes a compile error; remove the `radius:
BorderRadius.all(radius.max),` entry from the VerticalDivider constructor
(leaving width, thickness, indent, endIndent, and color) so the widget matches
Flutter's public API for VerticalDivider.

In
`@packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_unsupported_attachment_theme.g.theme.dart`:
- Around line 32-37: The generated lerp method for
StreamMessageComposerUnsupportedAttachmentThemeData calls an undefined helper
lerpDouble$; fix by making the helper available: either add the proper
import/export that provides lerpDouble$ (ensure the utility module is exported
into the part file's namespace) or replace the call with a known implementation
(e.g. dart:ui's lerpDouble or a locally defined double lerp helper) and update
the generator if needed so theme_extensions_builder emits the correct import or
symbol; locate the lerp method in
stream_message_composer_unsupported_attachment_theme.g.theme.dart and adjust the
symbol resolution for lerpDouble$ (or add the utility) so the code compiles.

---

Nitpick comments:
In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_edit_message.dart`:
- Around line 64-68: The UseCase annotation currently uses the label 'Showcase'
for StreamMessageComposerEditMessageAttachment; update the name value to
'Type/Size Variants' and add a separate UseCase entry named 'Real-world Example'
(keeping the type as StreamMessageComposerEditMessageAttachment) so the
component follows the gallery naming convention (Playground, Type/Size Variants,
Real-world Example).

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_link_preview.dart`:
- Around line 70-74: The `@widgetbook.UseCase` currently named "Showcase" for the
StreamMessageComposerLinkPreviewAttachment component should be renamed to
"Type/Size Variants" to match gallery conventions; update the UseCase annotation
name value for StreamMessageComposerLinkPreviewAttachment accordingly and ensure
there is a separate `@widgetbook.UseCase` with the name "Real-world Example" (add
one if missing) so the component has both "Type/Size Variants" and "Real-world
Example" use cases alongside the existing "Playground" pattern.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_reply.dart`:
- Around line 73-77: Rename the current `@widgetbook.UseCase` name value from
'Showcase' to 'Type/Size Variants' for the StreamMessageComposerReplyAttachment
use case (the annotation with type StreamMessageComposerReplyAttachment and path
'[Components]/Message Composer'), and add a separate `@widgetbook.UseCase` entry
named 'Real-world Example' that renders the same widget in contextual/usage
form; ensure both useCase annotations remain in the file so the component
follows the required Playground/Type/Size Variants/Real-world Example
convention.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_unsupported.dart`:
- Around line 51-55: Change the widgetbook use-case names to follow the standard
order: update the `@widgetbook.UseCase` annotation where type is
StreamMessageComposerUnsupportedAttachment to rename the existing use-case from
"Showcase" to "Type/Size Variants", and add a separate `@widgetbook.UseCase` block
named "Real-world Example" (using the same type
StreamMessageComposerUnsupportedAttachment) so both variants and a contextual
example are present; ensure the two use-cases are adjacent and keep other
annotation fields (type/path) unchanged.

In
`@apps/design_system_gallery/lib/components/message_composer/message_composer_file_attachment.dart`:
- Around line 72-76: Update the widgetbook use-case naming for
StreamMessageComposerFileAttachment by changing the existing `@widgetbook.UseCase`
name value from "Showcase" to "Type/Size Variants" and add an additional
`@widgetbook.UseCase` entry with name "Real-world Example" (type
StreamMessageComposerFileAttachment) so the component follows the required
Playground/Type/Size Variants/Real-world Example pattern; keep the existing type
reference to StreamMessageComposerFileAttachment and ensure the new use-case
includes the same or appropriate path metadata for component discovery.

In
`@packages/stream_core_flutter/test/components/message_composer/message_composer_attachment_reply_golden_test.dart`:
- Around line 16-76: The golden tests for StreamMessageComposerReplyAttachment
are missing coverage for the new thumbnail slot; add at least one light and one
dark GoldenTestScenario that passes a non-null thumbnail widget into
StreamMessageComposerReplyAttachment (use the existing _buildReplyInTheme helper
and iterate over one or more StreamReplyDirection values or add a dedicated
scenario), name them clearly (e.g., '${style.name}_with_thumbnail_light' and
'${style.name}_with_thumbnail_dark'), and ensure the thumbnail is a simple
deterministic widget (e.g., a small Icon or CircleAvatar) so the new visual path
is exercised in both brightness modes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5194090-e2d3-458f-b826-bdbb38299fa4

📥 Commits

Reviewing files that changed from the base of the PR and between 639f994 and 0e330cc.

⛔ Files ignored due to path filters (5)
  • packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_link_preview_dark_matrix.png is excluded by !**/*.png
  • packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_link_preview_light_matrix.png is excluded by !**/*.png
  • packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_reply_custom_matrix.png is excluded by !**/*.png
  • packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_reply_dark_matrix.png is excluded by !**/*.png
  • packages/stream_core_flutter/test/components/message_composer/goldens/ci/message_composer_attachment_reply_light_matrix.png is excluded by !**/*.png
📒 Files selected for processing (48)
  • apps/design_system_gallery/lib/app/gallery_app.directories.g.dart
  • apps/design_system_gallery/lib/components/common/stream_tap_target_padding.dart
  • apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_edit_message.dart
  • apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_link_preview.dart
  • apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_media.dart
  • apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_reply.dart
  • apps/design_system_gallery/lib/components/message_composer/message_composer_attachment_unsupported.dart
  • apps/design_system_gallery/lib/components/message_composer/message_composer_file_attachment.dart
  • packages/stream_core_flutter/CHANGELOG.md
  • packages/stream_core_flutter/lib/src/components/accessories/stream_file_type_icon.dart
  • packages/stream_core_flutter/lib/src/components/controls/stream_remove_control.dart
  • packages/stream_core_flutter/lib/src/components/message_composer.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_attachment_container.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_file_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_link_preview_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_media_file_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_reply_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_edit_message_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_file_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_link_preview_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_media_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_reply_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/stream_message_composer_unsupported_attachment.dart
  • packages/stream_core_flutter/lib/src/factory/stream_component_factory.dart
  • packages/stream_core_flutter/lib/src/factory/stream_component_factory.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_attachment_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_attachment_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_edit_message_attachment_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_edit_message_attachment_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_file_attachment_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_file_attachment_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_link_preview_attachment_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_link_preview_attachment_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_media_attachment_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_media_attachment_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_reply_attachment_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_reply_attachment_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_unsupported_attachment_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_composer_unsupported_attachment_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_theme.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/stream_theme.dart
  • packages/stream_core_flutter/lib/src/theme/stream_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/theme/stream_theme_extensions.dart
  • packages/stream_core_flutter/test/components/message_composer/message_composer_attachment_link_preview_golden_test.dart
  • packages/stream_core_flutter/test/components/message_composer/message_composer_attachment_reply_golden_test.dart
💤 Files with no reviewable changes (7)
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_attachment_container.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_file_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_reply_attachment.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_theme.g.theme.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_link_preview_attachment.dart
  • packages/stream_core_flutter/lib/src/components/message_composer/attachment/message_composer_media_file_attachment.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_message_theme.dart

Comment thread packages/stream_core_flutter/CHANGELOG.md
xsahil03x and others added 3 commits May 5, 2026 16:23
…k preview colors

MessageComposerReplyAttachment and MessageComposerLinkPreviewAttachment
now read colors directly from StreamColorScheme (semantic where
available, brand/chrome shades otherwise) instead of the removed
StreamMessageTheme/StreamMessageThemeData/StreamMessageStyle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… variants

Adds per-widget themes and StreamComponentFactory builder slots for every
composer attachment, introduces edit-message and unsupported variants, and
unifies the leading/trailing media slot under a themed thumbnail across
reply, edit-message, and link-preview previews.

- Add StreamMessageComposerEditMessageAttachment and
  StreamMessageComposerUnsupportedAttachment with matching themes.
- Theme reply/edit-message/link-preview thumbnails via thumbnailSize/
  thumbnailShape/thumbnailSide; rename media (link-preview) and trailing
  (reply) parameters to thumbnail.
- Drop the redundant "File" segment from
  StreamMessageComposerMediaFileAttachment, now StreamMessageComposerMediaAttachment.
- Wire all seven attachment widgets into StreamComponentFactory and
  expose BuildContext extensions for each new theme.
- Center StreamFileTypeIcon SVG inside its render box and add a click
  cursor to StreamRemoveControl on web/desktop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@xsahil03x xsahil03x force-pushed the refactor/composer-attachments branch from 0e330cc to e96a554 Compare May 5, 2026 14:23
xsahil03x and others added 2 commits May 6, 2026 17:17
…urement

Introduces a per-child marker that opts a single child of
StreamIntrinsicFlex into measurement under the parent's cross-axis
ceiling instead of the default unbounded constraints. This unblocks
descendants that require a bounded cross-axis (shrink-wrapping
viewports, Wrap, etc.) without forcing the whole column into bounded
measurement, so unmarked siblings keep shrink-wrapping to their
natural extent.

Used in DefaultStreamReactions to wrap the bubble subtree, fixing
layout failures when a message bubble contains a shrink-wrapping
ListView (e.g. the voice-recording attachment playlist).

When a layout failure does surface, the rendering library augments the
FlutterError via informationCollector with a hint pointing at
StreamIntrinsicBoundedCrossAxis, the affected StreamIntrinsicFlex
identified via describeForError, a fallback diagnostic for upstream
sources (UnconstrainedBox / OverflowBox), and the canonical
flutter.dev/unbounded-constraints link. Cascade errors from the
failed subtree are dropped so error reporters and the debug console
see only the actionable failure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Material wrapping the thumbnail in each composer attachment was
defaulting to MaterialType.canvas, which paints an opaque background
behind the thumbnail. Set type to MaterialType.transparency so the
Material only contributes clipping and the thumbnail itself shows
through cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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