Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/stream_chat/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Fixed `OwnUser` specific fields getting lost when creating a new `OwnUser` instance from
an `User` instance.
- Fixed `Client.currentUser` specific fields getting reset on `user.updated` events.
- Fixed build in dart2wasm environment.

✅ Added

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:stream_chat/src/core/platform_detector/platform_detector_stub.dart'
if (dart.library.html) 'platform_detector_web.dart'
if (dart.library.js_interop) 'platform_detector_web.dart'
if (dart.library.io) 'platform_detector_io.dart';

/// Possible platforms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export 'stream_attachment_handler_base.dart'
if (dart.library.html) 'stream_attachment_handler_html.dart'
if (dart.library.js_interop) 'stream_attachment_handler_html.dart'
if (dart.library.io) 'stream_attachment_handler_io.dart'
show StreamAttachmentHandler;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export 'unsupported_db.dart'
if (dart.library.io) 'native_db.dart' // implementation using dart:io
if (dart.library.html) 'web_db.dart';
if (dart.library.js_interop) 'web_db.dart';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

🧩 Analysis chain

Good switch; confirm web_db.dart is Wasm‑safe (no dart:html or non‑Wasm APIs).

If web_db.dart still uses dart:html or html-only storage APIs, this gate will break Wasm. Ensure it uses the Wasm-friendly drift/web/wasm path.


🏁 Script executed:

#!/bin/bash
# Ensure persistence web impl avoids dart:html
rg -nC2 -e "^import\s+['\"]dart:html['\"]" packages/stream_chat_persistence/lib/src/db/shared/web_db.dart || true
# Grep for drift wasm/web connectors (adjust patterns to your impl)
rg -nC2 -e "drift.*wasm" -e "import\s+['\"][^'\"]*drift/web" packages/stream_chat_persistence/lib/src/db/shared/web_db.dart || true

Length of output: 273


Do not approve — web_db.dart is not Wasm-safe; implement a Wasm connector

packages/stream_chat_persistence/lib/src/db/shared/web_db.dart still imports 'package:drift/web.dart' and has "// TODO: Replace with WASM implementation"; this uses web-only APIs and will break the Wasm gate. Replace with a Wasm-friendly connector (e.g., drift/web/wasm) or a drift wasm implementation that avoids dart:html, then re-verify.