fix(llc, core, ui, localization): hide raw StreamChannel errors behind themed, connection-aware states - #2849
Merged
xsahil03x merged 2 commits intoJul 30, 2026
Conversation
…d themed, connection-aware states Port of #2846 to v9. Adapts the original change to the v9 baseline: - Dart 3.6.2: dot-shorthands (`.unknown`/`.cancel`/`.w600`, etc.) rewritten as explicit enum/const references; `StreamChatError` keeps `EquatableMixin`. - v9 design system: the scroll-view error widget, `StreamChat` default channel loading/error states, and the message-list error state use v9's `chatThemeData`/`ElevatedButton`/`CircularProgressIndicator` instead of the v10 design-system widgets (`StreamButton`, `StreamLoadingSpinner`, etc.). - Skipped: the `StreamScrollViewLoadingWidget` `size`/`StreamLoadingSpinnerSize` redesign (depends on v10-only `stream_core_flutter`) and the v10-only `StreamReactionListView`. The incidental `dio` bump is not included. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
VelikovPetar
approved these changes
Jul 29, 2026
- Refactor StreamScrollViewErrorWidget to v10's extract-to-vars structure (icon → effective* values → title/subtitle/retryButton → padded Column), adapted to v9's design system. - Theme the retry button like the poll widgets: OutlinedButton with accentPrimary foreground and bodyBold text (matches v10's bodyEmphasis). - Add outer padding to the empty/loading widgets and mirror v10's structure. - Color the initial-load and load-more spinners with accentPrimary. - Make every scroll view's error state connection-aware, including the v9-only channel-grid, draft-list and message-search-grid, and pass the connection-aware errorSubtitle on all lists. - Match the core StreamChannel default error state's layout settings to the UI widget while keeping colors on Flutter/Material defaults (core has no design system). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
xsahil03x
deleted the
port/master-to-v9/FLU-628_hide-raw-streamchannel-errors
branch
July 30, 2026 11:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FLU-628
Port of #2846 to v9.
Raw
StreamChannelinitialization errors — and the default list/scroll-view error states — were leaking unthemed, unlocalized error details to end users. This routes them through themed, localized, connection-aware default states (no internet / slow connection / generic), overridable at every level.What changed
stream_chatStreamChatNetworkError.type(StreamChatNetworkErrorType) exposing the transport failure kind; deprecateisRequestCancelledErrorin favor oftype == StreamChatNetworkErrorType.cancel.Channel.initializederrored or itsname/image/extraDatasetters throwing — a subsequent successful (re)init recovers cleanly (supports the retry flow).toString()forStreamWebSocketError/StreamChatNetworkError.stream_chat_flutter_coreStreamChannelState.retry()to re-run a failed channel init.DefaultStreamChannelBuilders, an inherited widget supplying default loading/error builders to descendantStreamChannels.StreamChannelerror state no longer exposes raw error details.stream_chat_flutterStreamChatnow installs themed, connection-aware default loading & error states forStreamChannel— overridable per-StreamChannelor viaDefaultStreamChannelBuilders.StreamScrollViewErrorWidgetgainserrorSubtitle(+ style), defaulting to the generic localized copy.stream_chat_localizationsconnectionError*,slowConnectionError*,genericError*) for all supported locales.Port notes — differences from #2846
The original PR targets the current
master(v10) baseline. This port adapts it to v9:.unknown,.cancel,.w600,.symmetric, …) are rewritten as explicit enum/const references, andStreamChatErrorkeepsEquatableMixin(v9's deliberate choice).StreamButton,StreamLoadingSpinner,context.streamColorScheme,streamSpacing,icons.*,stream_core_flutter), none of which exist on v9. The scroll-view error widget, theStreamChatdefault channel loading/error states, and the message-list error state are re-implemented with v9'schatThemeData/ElevatedButton/CircularProgressIndicator/Icons.*.message_list_view: v9's error state is a single styledText, so it becomes connection-aware viaresolveNetworkErrorText(...).title(no subtitle/retry button, matching v9's existing UI).StreamChannelerror uses "Try Again".Intentionally omitted (v10-only):
StreamScrollViewLoadingWidgetsize/StreamLoadingSpinnerSizeredesign (depends on v10-onlystream_core_flutter); v9 keepsCircularProgressIndicator+height/width.StreamReactionListView— a v10-only component that doesn't exist on v9.dioversion bump.Testing
dart analyze --fatal-infosclean across all four packages.goldens/ci/, and none of the touched files have golden tests.🤖 Generated with Claude Code