Skip to content

fix(ui,llc): wasm support - #2940

Merged
renefloor merged 2 commits into
masterfrom
fix/wasm
Sep 4, 2026
Merged

fix(ui,llc): wasm support#2940
renefloor merged 2 commits into
masterfrom
fix/wasm

Conversation

@renefloor

@renefloor renefloor commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Submit a pull request

Github Issue: GetStream/stream-video-flutter#737 (comment)

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

This fixes the conditional import in 2 files and updates the style guide.

We still have to update drift/web.dart to drift/wasm.dart, but that only blocks apps with offline storage on web.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed CurrentPlatform errors on WebAssembly builds.
    • Fixed StreamAttachmentHandler errors on WebAssembly builds.
  • Documentation

    • Added guidance for web conditional imports and exports using the recommended platform check.
  • Quality Improvements

    • Enabled a lint rule to identify unsupported web library usage in Flutter code.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 642fb558-65f3-4bd4-9a34-cd52c0abe0b2

📥 Commits

Reviewing files that changed from the base of the PR and between 1fd1671 and 38d25c1.

📒 Files selected for processing (6)
  • STYLE_GUIDE.md
  • analysis_options.yaml
  • packages/stream_chat/CHANGELOG.md
  • packages/stream_chat/lib/src/core/platform_detector/platform_detector.dart
  • packages/stream_chat_flutter/CHANGELOG.md
  • packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler.dart

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Web conditional imports and exports now use dart.library.js_interop. The style guide documents this requirement, and analysis options enable the related lint. Changelogs record the WebAssembly fixes for platform detection and attachment handling.

Changes

Web platform selection

Layer / File(s) Summary
Conditional platform selection
packages/stream_chat/lib/src/core/platform_detector/platform_detector.dart, packages/stream_chat_flutter/lib/src/attachment/handler/stream_attachment_handler.dart, packages/stream_chat/CHANGELOG.md, packages/stream_chat_flutter/CHANGELOG.md
Web implementations now use dart.library.js_interop conditions. The package changelogs record the WebAssembly fixes.
Conditional import guidance
STYLE_GUIDE.md, analysis_options.yaml
The style guide documents dart.library.js_interop for dart2js and dart2wasm imports and exports. The analysis configuration enables avoid_web_libraries_in_flutter.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 38d25

Web and WebAssembly builds now select the platform and attachment implementations rather than falling through to unimplemented stubs. The accompanying lint and guidance align with this behavior, with no remaining merge-blocking risk identified.

Suggested reviewers: xsahil03x

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding WebAssembly support through conditional import fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wasm

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.

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.23%. Comparing base (1fd1671) to head (38d25c1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2940   +/-   ##
=======================================
  Coverage   74.23%   74.23%           
=======================================
  Files         437      437           
  Lines       28377    28377           
=======================================
  Hits        21066    21066           
  Misses       7311     7311           

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

@renefloor
renefloor merged commit c665778 into master Sep 4, 2026
31 checks passed
@renefloor
renefloor deleted the fix/wasm branch September 4, 2026 11:50
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