fix(ui): replace get_thumbnail_video with the stream_thumbnail plugin - #2829
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe PR replaces ChangesThumbnail dependency migration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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_chat_flutter/lib/src/video/video_service.dart`:
- Line 37: Use the explicit StreamThumbnailFormat.png default in the video
service declaration at
packages/stream_chat_flutter/lib/src/video/video_service.dart:37 and the
corresponding default at
packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart:49,
replacing the shorthand .png in both sites.
In `@packages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dart`:
- Line 64: Update the video thumbnail image provider’s operator == and hashCode
to include imageFormat and every other thumbnail-generation parameter, including
frame, size, and quality, alongside video and scale. Ensure identical option
sets remain equal while any differing generation option produces a distinct
cache key.
In `@packages/stream_chat_flutter/pubspec.yaml`:
- Around line 73-84: Remove all stale get_thumbnail_video.framework references
from the iOS Runner Xcode project, including file references, build-phase
entries, and linked-framework settings, while preserving the stream_thumbnail
dependency configuration and other framework links.
🪄 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: a0ecedcb-df72-421d-9b19-54393ad55c10
📒 Files selected for processing (5)
melos.yamlpackages/stream_chat_flutter/CHANGELOG.mdpackages/stream_chat_flutter/lib/src/video/video_service.dartpackages/stream_chat_flutter/lib/src/video/video_thumbnail_image.dartpackages/stream_chat_flutter/pubspec.yaml
| stream_thumbnail: | ||
| # Stream-maintained thumbnail plugin. Pinned to a git ref until it is | ||
| # published to pub.dev. | ||
| # | ||
| # **Note:** Before publishing stream_chat_flutter, this MUST be swapped | ||
| # back to a pub version constraint — git deps are not allowed on pub.dev | ||
| # and will block the release. | ||
| # ignore: invalid_dependency | ||
| git: | ||
| url: https://github.com/GetStream/stream-core-flutter.git | ||
| ref: ef5b25a851c132b299e08a3ad9d73ef7f2d16dfd | ||
| path: packages/stream_thumbnail |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Remove leftover framework reference in the iOS project.
The get_thumbnail_video dependency was removed from the pubspec, but sample_app/ios/Runner.xcodeproj/project.pbxproj still links get_thumbnail_video.framework. This may cause build failures or fail to resolve the duplicate-symbol crash on iOS. Please update the Xcode project (or run pod install if applicable) to remove the stale framework reference.
🤖 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_chat_flutter/pubspec.yaml` around lines 73 - 84, Remove all
stale get_thumbnail_video.framework references from the iOS Runner Xcode
project, including file references, build-phase entries, and linked-framework
settings, while preserving the stream_thumbnail dependency configuration and
other framework links.
Source: Linked repositories
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2829 +/- ##
=======================================
Coverage 71.35% 71.35%
=======================================
Files 430 430
Lines 26945 26945
=======================================
Hits 19226 19226
Misses 7719 7719 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Swaps the `get_thumbnail_video` dependency for Stream's own `stream_thumbnail` plugin (uniquely-named `StreamThumbnailPlugin`), which resolves the iOS duplicate-symbol crash when an app also depends on `video_thumbnail` / `video_editor` (#2360). Internal-only change: the affected `imageFormat` (now `StreamThumbnailFormat`) is on non-exported `src/video` symbols, so the public API is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0918733 to
949c70b
Compare
Submit a pull request
Linear: FLU-
Github Issue: #2360
CLA
Description of the pull request
Replaces the
get_thumbnail_videodependency with Stream's ownstream_thumbnailplugin.Why
get_thumbnail_videoships an iOSVideoThumbnailPluginsymbol that collides withvideo_thumbnail/video_editor, causing a duplicate-symbol crash when an app depends on both alongside this SDK (#2360). It also lacks Swift Package Manager support, which will become a hard build error on upcoming Flutter versions.stream_thumbnail(maintained in stream-core-flutter) uses a uniquely-namedStreamThumbnailPluginand ships SPM support, resolving both.What changed
get_thumbnail_video→stream_thumbnailinmelos.yamlandstream_chat_flutter/pubspec.yaml.video_service.dart/video_thumbnail_image.dartto useStreamThumbnail.thumbnailData(...)andStreamThumbnailFormat.Non-breaking
The affected symbols (
imageFormat, now typedStreamThumbnailFormat) live onsrc/video/classes that are not exported by the public barrel — no public API changes.Testing
flutter analyzeis clean and thumbnail generation was verified end-to-end. Thestream_thumbnaildep is pinned to a git ref until it is published to pub.dev; it must be swapped to a pub version (along withstream_core_flutter) before releasing.Screenshots / Videos
N/A — no visual change.
Summary by CodeRabbit
Bug Fixes
Updates
StreamThumbnailFormat(default remains PNG).