Skip to content

Conversation

@xsahil03x
Copy link
Member

@xsahil03x xsahil03x commented Jan 15, 2026

Description of the pull request

This commit upgrades the project to Dart SDK ^3.10.0 and Flutter >=3.38.1. It also enables a comprehensive set of new lint rules from all_lint_rules.yaml to improve code quality, consistency, and maintainability.

The majority of the changes in this commit are automatic fixes and formatting adjustments applied by the Dart formatter and linter to align the codebase with the newly enabled rules. This includes:

  • Applying dart format --fix with a page width of 100 and trailing commas.
  • Enabling and autofixing new lint rules such as use_super_parameters, unnecessary_lambdas, use_if_null_to_convert_nulls_to_bools, and many others.
  • Deleting the analysis_options.yaml and .gitignore from stream_core_flutter as they are now handled at the root level.
  • Updating melos.yaml to reflect the new SDK constraints.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated Dart SDK requirement to ^3.10.0 and Flutter to >=3.38.1 for enhanced platform compatibility
    • Expanded linting rules with 30+ new code quality checkers and removed deprecated rules
    • Implemented standardized code formatting (100-character line width, trailing comma preservation)
    • Enhanced stream components with improved event handling and reconnection policy visibility

✏️ Tip: You can customize this high-level summary in your review settings.

This commit upgrades the project to Dart SDK `^3.10.0` and Flutter `>=3.38.1`. It also enables a comprehensive set of new lint rules from `all_lint_rules.yaml` to improve code quality, consistency, and maintainability.

The majority of the changes in this commit are automatic fixes and formatting adjustments applied by the Dart formatter and linter to align the codebase with the newly enabled rules. This includes:
- Applying `dart format --fix` with a page width of 100 and trailing commas.
- Enabling and autofixing new lint rules such as `use_super_parameters`, `unnecessary_lambdas`, `use_if_null_to_convert_nulls_to_bools`, and many others.
- Deleting the `analysis_options.yaml` and `.gitignore` from `stream_core_flutter` as they are now handled at the root level.
- Updating `melos.yaml` to reflect the new SDK constraints.
The `ui` scope is added to the list of allowed scopes for pull request titles in the `pr_title.yml` workflow. This workflow now validates for `llc`, `ui`, and `repo` scopes. Additionally, a temporary comment to remove the `main-design-system` branch is included, and the `semantic_changelog_update` job is enabled.
@xsahil03x xsahil03x requested a review from a team as a code owner January 15, 2026 19:57
@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

This PR updates Dart/Flutter SDK constraints to ^3.10.0 and >=3.38.1, applies extensive code formatting and style improvements across the stream_core library, updates lint rules configuration, adds resolver support to MutableEventEmitter, refactors the retry strategy with better encapsulation, and modernizes import paths in stream_core_flutter.

Changes

Cohort / File(s) Summary
SDK & Environment Configuration
melos.yaml, packages/stream_core/pubspec.yaml, packages/stream_core_flutter/pubspec.yaml, apps/design_system_gallery/pubspec.yaml
Updated Dart SDK constraint from ^3.6.2/^3.9.0 to ^3.10.0; Flutter minimum version from >=3.27.4 to >=3.38.1; added apps/** to monorepo packages pattern; removed flutter_lints dependency.
Linting & Analysis Configuration
.github/workflows/pr_title.yml, all_lint_rules.yaml, analysis_options.yaml, packages/stream_core_flutter/analysis_options.yaml
Updated PR workflow to include "ui" scope; enabled semantic_changelog_update step; added/removed 30+ lint rules; added formatter config (page_width: 100, trailing_commas); removed flutter_lints include.
Emitter Architecture Enhancement
packages/stream_core/lib/src/utils/event_emitter.dart
Added constructor to MutableEventEmitter with optional EventResolver support; resolvers applied in emit sequence to transform events before emission.
Retry Strategy Refactoring
packages/stream_core/lib/src/ws/client/reconnect/retry_strategy.dart
Converted public consecutiveFailuresCount field to private _consecutiveFailuresCount with public getter; improved encapsulation for mutation operations.
WebSocket Reconnection & State
packages/stream_core/lib/src/ws/client/reconnect/automatic_reconnection_policy.dart, packages/stream_core/lib/src/ws/client/stream_web_socket_client.dart, packages/stream_core/lib/src/ws/client/web_socket_connection_state.dart
Added public connectionState and networkState fields to reconnection policies; type-annotated _connectionStateEmitter; flattened isAutomaticReconnectionEnabled logic.
Event Serialization Logic
packages/stream_core/lib/src/ws/events/ws_request.dart
Updated HealthCheckPingEvent.toJson to always include client_id with connectionId value instead of conditional pattern matching.
Type Inference & Annotation Normalization
packages/stream_core/lib/src/errors/stream_api_error.dart, packages/stream_core/lib/src/logger/stream_log.dart, packages/stream_core/lib/src/logger/stream_logger.dart, packages/stream_core/lib/src/utils/disposable.dart
Added/removed explicit type annotations for private constants and fields; added ignore directives for lint rules; standardized declarations across multiple files.
TokenManager Signature Update
packages/stream_core/lib/src/user/token_manager.dart
Removed async modifier from getToken method (still returns Future via synchronized closure); maintains existing token caching behavior.
Comprehensive Formatting & Style
packages/stream_core/lib/src/api/..., packages/stream_core/lib/src/logger/..., packages/stream_core/lib/src/query/..., packages/stream_core/lib/src/user/..., packages/stream_core/lib/src/utils/... (15+ files)
Consolidated multi-line declarations to single-line; adjusted indentation/line breaks; reformatted enum entries, constructors, and initializers; moved field/method declarations inline; removed unnecessary blank lines.
Generated Code Formatting
packages/stream_core/lib/src/**/*.g.dart (5 files)
Reformatted generated JSON serialization helpers from multi-line to compact single-line map literals; no semantic changes to toJson output.
Flutter Component Modernization
packages/stream_core_flutter/lib/src/components/stream_button.dart, packages/stream_core_flutter/lib/src/theme/... (4 files)
Changed imports from package-qualified to relative paths; added explicit const constructor to DefaultStreamButton; switched optional icon rendering from pattern matching to inline property access.
Git & Project Configuration
packages/stream_core_flutter/.gitignore
Deleted entire .gitignore file (31 lines of ignore patterns removed).
Test Suite Formatting
packages/stream_core/test/query/..._test.dart, packages/stream_core/test/utils/..._test.dart (6 files)
Collapsed multi-line test declarations and method chains to single-line format; removed async modifiers from synchronous test cases; no changes to test logic or assertions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Rationale: The PR spans 40+ files with diverse change types (configuration, formatting, and functional edits). While most changes are repetitive formatting with low complexity, there are scattered functional changes requiring attention—particularly in event_emitter.dart (resolver logic), retry_strategy.dart (encapsulation refactor), and import path modernization. The high file count and heterogeneous nature offset the simplicity of individual changes.

Possibly related PRs

Poem

🐰 Hop along with newer constraints, we say,
From point-six to ten, we're modernized today!
Events resolve with grace, retries stand tall,
Formatting lines straight—a cleanup for all!
Flutter flies higher, imports smile bright,
Our code stands aligned, everything's right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is incomplete according to the template; it lacks CLA confirmation, best practices confirmation, testing information, and other required sections. Add CLA signature confirmation, verify best practices and testing sections, and fill in any missing Linear ticket or GitHub issue references as applicable.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: upgrading Flutter/Dart versions and enabling new lint rules, which aligns with the changeset's primary objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@xsahil03x
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 21.15385% with 41 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main-design-system@06f6a40). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...s/stream_core/lib/src/errors/stream_api_error.dart 0.00% 9 Missing ⚠️
.../client/reconnect/connection_recovery_handler.dart 0.00% 9 Missing ⚠️
...lib/src/ws/client/web_socket_connection_state.dart 0.00% 7 Missing ⚠️
packages/stream_core/lib/src/utils/result.dart 0.00% 4 Missing ⚠️
...re/lib/src/ws/client/reconnect/retry_strategy.dart 0.00% 3 Missing ⚠️
...b/src/attachment/uploader/attachment_uploader.dart 0.00% 2 Missing ⚠️
packages/stream_core/lib/src/user/user.dart 0.00% 2 Missing ⚠️
...re/lib/src/ws/client/stream_web_socket_client.dart 0.00% 2 Missing ⚠️
...stream_core/lib/src/api/stream_core_dio_error.dart 0.00% 1 Missing ⚠️
...ckages/stream_core/lib/src/user/token_manager.dart 0.00% 1 Missing ⚠️
... and 1 more

❌ Your patch check has failed because the patch coverage (21.15%) 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-design-system      #29   +/-   ##
=====================================================
  Coverage                      ?   40.19%           
=====================================================
  Files                         ?       53           
  Lines                         ?     1045           
  Branches                      ?        0           
=====================================================
  Hits                          ?      420           
  Misses                        ?      625           
  Partials                      ?        0           

☔ 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

@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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/stream_core/lib/src/user/token_manager.dart (1)

43-46: Bug: Setter compares against immutable field and never updates it.

The tokenProvider setter compares against _tokenProvider which is declared final (line 42). The comparison will work, but:

  1. The provider is never actually updated since _tokenProvider is immutable
  2. The setter effectively only calls expireToken() on first invocation (when providers differ), but subsequent calls have no lasting effect

If this setter is intended to allow changing the token provider, _tokenProvider should not be final. If the provider is meant to be immutable, this setter should be removed.

Proposed fix if provider should be mutable
-  // The provider used to load tokens when needed.
-  final TokenProvider _tokenProvider;
-  set tokenProvider(TokenProvider provider) {
-    // If the provider changes, expire the current token.
-    if (_tokenProvider != provider) expireToken();
-  }
+  // The provider used to load tokens when needed.
+  TokenProvider _tokenProvider;
+  set tokenProvider(TokenProvider provider) {
+    // If the provider changes, expire the current token and update.
+    if (_tokenProvider != provider) {
+      expireToken();
+      _tokenProvider = provider;
+    }
+  }
🤖 Fix all issues with AI agents
In `@analysis_options.yaml`:
- Around line 17-19: The formatter settings in analysis_options.yaml use
page_width (requires Dart ≥3.7) and trailing_commas: preserve (requires Dart
≥3.8), so update the project's SDK constraints and CI to match: bump the
environment SDK lower bound to at least 3.8.0 in pubspec.yaml (environment: sdk)
and ensure any CI/workflow actions or Docker images use Dart 3.8+ so the
analyzer/formatter won't error when running format or static analysis; reference
the keys page_width and trailing_commas in analysis_options.yaml and the
environment: sdk in pubspec.yaml when making the changes.

In `@packages/stream_core/pubspec.yaml`:
- Around line 18-19: The SDK constraint in the pubspec (the environment: sdk:
^3.10.0 entry) is too strict for Flutter 3.38's pre-release Dart and should be
adjusted; either loosen the constraint to accept the pre-release range (e.g.,
change the sdk spec to allow 3.10.0-290.0.beta or a caret range that includes
it), or confirm you will target a Flutter version that bundles stable Dart
3.10.0+ and leave the constraint as-is—update the environment sdk value
accordingly in packages/stream_core/pubspec.yaml to reflect the chosen approach.
🧹 Nitpick comments (2)
packages/stream_core/lib/src/ws/client/stream_web_socket_client.dart (1)

92-92: Consider removing or replacing print() statements with structured logging.

There are print() calls at lines 92, 219, and 242 that appear to be debug artifacts. These should either be removed before production release or replaced with a proper logging mechanism that can be configured by severity level.

packages/stream_core/lib/src/logger/stream_log.dart (1)

1-2: Minor style inconsistency between ignore directive and applied changes.

The omit_obvious_property_types directive is suppressed file-wide, yet _instance on line 14 had its type annotation removed (aligning with the lint). Meanwhile, fields on lines 16-19 retain explicit types (which is why the directive is needed). This mix of inferred vs. explicit types is slightly inconsistent but functionally correct.

Also applies to: 14-14

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 06f6a40 and f0ab9b8.

📒 Files selected for processing (55)
  • .github/workflows/pr_title.yml
  • all_lint_rules.yaml
  • analysis_options.yaml
  • apps/design_system_gallery/pubspec.yaml
  • melos.yaml
  • packages/stream_core/lib/src/api/interceptors/logging_interceptor.dart
  • packages/stream_core/lib/src/api/stream_core_dio_error.dart
  • packages/stream_core/lib/src/attachment/uploader/attachment_uploader.dart
  • packages/stream_core/lib/src/errors/stream_api_error.dart
  • packages/stream_core/lib/src/errors/stream_api_error.g.dart
  • packages/stream_core/lib/src/logger/impl/external_logger.dart
  • packages/stream_core/lib/src/logger/impl/file_logger.dart
  • packages/stream_core/lib/src/logger/stream_log.dart
  • packages/stream_core/lib/src/logger/stream_logger.dart
  • packages/stream_core/lib/src/platform/current_platform.dart
  • packages/stream_core/lib/src/query/filter/filter.dart
  • packages/stream_core/lib/src/query/filter/location/bounding_box.g.dart
  • packages/stream_core/lib/src/query/filter/location/circular_region.g.dart
  • packages/stream_core/lib/src/query/filter/location/location_coordinate.dart
  • packages/stream_core/lib/src/query/sort.dart
  • packages/stream_core/lib/src/query/sort.g.dart
  • packages/stream_core/lib/src/user/connect_user_details_request.g.dart
  • packages/stream_core/lib/src/user/token_manager.dart
  • packages/stream_core/lib/src/user/user.dart
  • packages/stream_core/lib/src/user/user_token.dart
  • packages/stream_core/lib/src/user/ws_auth_message_request.g.dart
  • packages/stream_core/lib/src/utils/comparable_field.dart
  • packages/stream_core/lib/src/utils/disposable.dart
  • packages/stream_core/lib/src/utils/event_emitter.dart
  • packages/stream_core/lib/src/utils/result.dart
  • packages/stream_core/lib/src/utils/shared_emitter.dart
  • packages/stream_core/lib/src/utils/state_emitter.dart
  • packages/stream_core/lib/src/ws/client/engine/stream_web_socket_engine.dart
  • packages/stream_core/lib/src/ws/client/engine/web_socket_engine.dart
  • packages/stream_core/lib/src/ws/client/reconnect/automatic_reconnection_policy.dart
  • packages/stream_core/lib/src/ws/client/reconnect/connection_recovery_handler.dart
  • packages/stream_core/lib/src/ws/client/reconnect/retry_strategy.dart
  • packages/stream_core/lib/src/ws/client/stream_web_socket_client.dart
  • packages/stream_core/lib/src/ws/client/web_socket_connection_state.dart
  • packages/stream_core/lib/src/ws/events/ws_request.dart
  • packages/stream_core/pubspec.yaml
  • packages/stream_core/test/query/filter_test.dart
  • packages/stream_core/test/query/list_extensions_test.dart
  • packages/stream_core/test/query/sort_test.dart
  • packages/stream_core/test/utils/event_emitter_test.dart
  • packages/stream_core/test/utils/shared_emitter_test.dart
  • packages/stream_core/test/utils/state_emitter_test.dart
  • packages/stream_core_flutter/.gitignore
  • packages/stream_core_flutter/analysis_options.yaml
  • packages/stream_core_flutter/lib/src/components/stream_button.dart
  • packages/stream_core_flutter/lib/src/theme/components/stream_button_theme.dart
  • packages/stream_core_flutter/lib/src/theme/stream_component_factory.dart
  • packages/stream_core_flutter/lib/src/theme/stream_theme.dart
  • packages/stream_core_flutter/lib/stream_core_flutter.dart
  • packages/stream_core_flutter/pubspec.yaml
💤 Files with no reviewable changes (2)
  • packages/stream_core_flutter/analysis_options.yaml
  • packages/stream_core_flutter/.gitignore
🔇 Additional comments (101)
packages/stream_core/lib/src/api/stream_core_dio_error.dart (1)

16-18: LGTM! Formatting adjustment aligns with project standards.

The indentation changes to the super() constructor call are purely cosmetic and follow the formatting applied by dart format --fix as part of the Flutter upgrade.

packages/stream_core/lib/src/logger/stream_logger.dart (2)

1-15: LGTM!

The explicit type annotations for _priorityEmojiMapper and _priorityNameMapper improve code clarity and align with the new lint rules. The types are correct and match the map contents.


44-45: LGTM!

The enum trailing semicolon placement on its own line is a valid formatting style applied by dart format --fix. No functional change.

packages/stream_core/lib/src/platform/current_platform.dart (2)

1-1: LGTM!

The single-line conditional import correctly uses the dart.library.io directive to select the appropriate platform detector implementation.


89-90: LGTM!

The semicolon placement on its own line is the expected output from dart format --fix with trailing commas enabled, consistent with the PR's formatting objectives.

packages/stream_core/lib/src/utils/comparable_field.dart (2)

44-44: LGTM: Class declaration formatting improved.

The single-line class declaration enhances readability while maintaining all type constraints and interfaces.


85-87: LGTM: Error handling formatting improved.

The trailing comma addition follows Dart formatting conventions and maintains the error message clarity.

packages/stream_core/lib/src/user/user.dart (3)

19-20: LGTM: Consistent initializer list formatting.

The spacing adjustment in the initializer list improves readability and aligns with the new formatting rules.


25-25: LGTM: Concise single-line constructor.

The guest constructor is now more concise while remaining readable within the 100-character page width.


57-63: LGTM: Improved props list formatting.

Formatting each property on its own line with trailing commas follows Dart best practices and makes future diffs cleaner when properties are added or removed.

packages/stream_core/lib/src/utils/result.dart (3)

94-102: LGTM!

The multi-line formatting improves readability. The getOrThrow() implementation correctly preserves the original stack trace using Error.throwWithStackTrace.


183-192: LGTM!

Formatting-only change consistent with the lint upgrade.


199-208: LGTM!

Formatting-only change consistent with the lint upgrade.

packages/stream_core/lib/src/ws/events/ws_request.dart (1)

17-23: LGTM! Clean use of Dart 3.x null-aware element syntax.

The ?connectionId syntax correctly omits the 'client_id' entry when connectionId is null, and includes it only when non-null. This is the idiomatic approach for conditional map entries in modern Dart.

Note: The AI summary incorrectly states this "always includes client_id" — in fact, the null-aware element syntax (?) ensures the key is conditionally included only when the value is non-null.

packages/stream_core/lib/src/attachment/uploader/attachment_uploader.dart (2)

115-119: LGTM! Formatting improves readability.

The typedef has been reformatted to a multi-line style, placing each parameter on its own line. This is consistent with the PR's automatic formatting objectives and improves readability without changing the signature.


154-155: LGTM! Lambda formatting is consistent.

The lambda expression has been reformatted to place the inner function on a new line, improving readability while preserving the functional behavior of passing the attachment ID along with progress updates.

packages/stream_core/lib/src/utils/disposable.dart (2)

1-1: LGTM - lint ignores are appropriate for this pattern.

The FutureOr<void> return type allows subclasses to implement either synchronous or asynchronous disposal, and the async keyword on the base method is a common pattern for overrideable disposal methods.


11-11: LGTM - type inference change is functionally equivalent.

The type is correctly inferred as bool from the initializer. This stylistic change aligns with the lint rules being enabled in this PR.

packages/stream_core/lib/src/api/interceptors/logging_interceptor.dart (5)

58-61: LGTM!

The removal of explicit type annotations on these static const declarations is appropriate. The types are clearly inferrable from the initializers (int for 1, String for the tab string), aligning with Dart's style recommendations for obvious type inference.


157-157: LGTM!

The single-line arrow form for this simple lambda is more concise and appropriate for the straightforward assignment operation.


221-225: LGTM!

Converting _printLine to expression-body syntax is appropriate since the method contains only a single expression. This is idiomatic Dart style.


298-303: LGTM!

The reformatted logPrint call improves readability by breaking up the complex string interpolation with the nested substring call across multiple lines.


352-356: LGTM!

Converting _logPrintRequest and _logPrintResponse to single-line arrow form is appropriate for these simple delegation methods and brings them in line with _logPrintError which was already in this form.

packages/stream_core/lib/src/query/filter/location/location_coordinate.dart (1)

82-83: LGTM!

Formatting-only change to split the long line. The Haversine formula calculation remains mathematically correct.

packages/stream_core/lib/src/errors/stream_api_error.dart (2)

57-69: LGTM!

Formatting adjustments for fromJson and props getter align with the 100-character page width and trailing comma conventions.


72-73: LGTM!

Adding explicit List<int> type annotations improves code clarity and aligns with the new lint rules.

packages/stream_core/lib/src/user/user_token.dart (1)

115-116: LGTM!

Standard enum formatting with the semicolon on a separate line for enhanced enums. No behavioral change.

packages/stream_core/lib/src/errors/stream_api_error.g.dart (1)

9-31: LGTM!

Formatting-only changes in generated serialization code. All field mappings and JSON keys remain correct and unchanged.

packages/stream_core/lib/src/query/filter/location/circular_region.g.dart (1)

9-13: LGTM!

Formatting-only change in generated serialization code. The JSON structure with lat, lng, and distance keys remains unchanged.

packages/stream_core/lib/src/ws/client/engine/stream_web_socket_engine.dart (1)

39-41: LGTM!

The initializer list formatting aligns with Dart's standard style. No functional changes.

packages/stream_core/lib/src/query/filter/location/bounding_box.g.dart (1)

9-14: LGTM!

Generated code reformatted by json_serializable. No changes to serialization logic or field mappings.

packages/stream_core/lib/src/user/connect_user_details_request.g.dart (1)

9-17: LGTM!

Generated code reformatted by json_serializable. Function signature consolidated to single line; serialization logic unchanged.

packages/stream_core/test/utils/shared_emitter_test.dart (3)

87-96: LGTM!

Test description reformatted to single line. No changes to test logic or assertions.


411-427: LGTM!

Test description reformatted to single line. Test behavior unchanged.


429-445: LGTM!

Test description reformatted to single line. Test behavior unchanged.

packages/stream_core/lib/src/utils/shared_emitter.dart (1)

101-119: LGTM!

Class declaration consolidated to single line within the 100-character page width. No API or behavioral changes.

packages/stream_core/lib/src/user/ws_auth_message_request.g.dart (1)

9-17: LGTM!

This is a formatting-only change in generated code. The _$WsAuthMessageRequestToJson function signature was reformatted to a single line, consistent with the PR's dart format --fix application.

packages/stream_core/test/query/list_extensions_test.dart (1)

1-2055: LGTM!

This comprehensive test file has only formatting changes applied via dart format --fix. All test logic, assertions, and expectations remain unchanged. The modifications include:

  • Lambda expressions moved to single lines (e.g., line 268, 289)
  • Method chains consolidated to single lines (e.g., lines 698, 708)
  • String interpolations reformatted for 100-character line width

The test coverage for upsert, updateWhere, batchReplace, partition, sortedInsert, insertUnique, sortedUpsert, merge, removeNested, and updateNested is thorough.

packages/stream_core/lib/src/query/filter/filter.dart (10)

1-2: Lint suppression for matching_super_parameters added.

The // ignore_for_file: matching_super_parameters directive suppresses warnings about parameter names in constructors not matching their super constructor parameters. This is appropriate here since the comparison operators use super.field, super.value which are positional and don't need to match by name.


244-267: LGTM!

The EqualOperator constructor was reformatted to a single line. The matches() implementation correctly handles:

  • Null value checks (PostgreSQL semantics)
  • Location coordinate special cases
  • Deep equality comparison

No functional changes.


275-291: LGTM!

The GreaterOperator constructor formatting change is consistent with the PR's formatting standards. The comparison logic using ComparableField and safe execution remains intact.


296-313: LGTM!

Formatting-only changes to GreaterOrEqualOperator. The initializer list now uses the new Dart 3 syntax with : on the next line, which is valid and consistent with the formatter output.


318-334: LGTM!

LessOperator constructor reformatted to single line. Logic unchanged.


339-356: LGTM!

LessOrEqualOperator formatting consistent with other comparison operators.


395-410: LGTM!

InOperator constructor formatting adjusted. The membership test logic remains correct.


420-432: LGTM!

ContainsOperator reformatted to single line. Containment logic unchanged.


508-522: LGTM!

QueryOperator constructor on single line. Full-text search logic intact.


527-546: LGTM!

AutoCompleteOperator formatting changes. The word prefix matching implementation remains correct with proper Unicode support for punctuation boundaries.

packages/stream_core/test/query/filter_test.dart (1)

1-2148: LGTM!

This extensive test file covering all filter operators has formatting-only changes. The modifications consolidate method chains (e.g., .matches(model)) to single lines and reflow array literals to fit within the 100-character line width.

Test coverage is comprehensive, including:

  • Comparison operators (Equal, Greater, GreaterOrEqual, Less, LessOrEqual)
  • List operators (In, Contains)
  • Existence operator
  • Evaluation operators (Query, AutoComplete)
  • Path existence operator
  • Logical operators (And, Or)
  • Location filtering (CircularRegion, BoundingBox)
  • Edge cases and PostgreSQL NULL semantics

All test assertions and expectations remain unchanged.

packages/stream_core/test/utils/state_emitter_test.dart (5)

28-35: LGTM!

The async modifier was correctly removed from this test since it doesn't contain any await calls. The test synchronously emits a value and verifies the state update.


37-44: LGTM!

Same pattern - async appropriately removed as this test is fully synchronous.


118-125: LGTM!

The update atomic method test correctly converted to synchronous.


127-135: LGTM!

The getAndUpdate test correctly converted to synchronous.


137-145: LGTM!

The updateAndGet test correctly converted to synchronous. All atomic update method tests are now appropriately marked as synchronous since they don't require awaiting any futures.

packages/stream_core/lib/src/utils/state_emitter.dart (1)

74-74: LGTM!

Formatting change aligns with the new 100-character page width setting. No semantic changes to the class declaration.

packages/stream_core/lib/src/query/sort.dart (3)

18-19: LGTM!

Valid Dart enum formatting. The semicolon on its own line is acceptable style when using trailing commas.


36-36: LGTM!

Trailing comma in enum is consistent with Dart formatting conventions.


48-54: LGTM!

Multi-line typedef formatting improves readability for this function signature with multiple parameters.

packages/stream_core/lib/src/query/sort.g.dart (1)

9-12: LGTM!

Generated code reformatted by build_runner with new formatting settings. No semantic changes to serialization output.

packages/stream_core/lib/src/ws/client/web_socket_connection_state.dart (2)

19-19: LGTM!

Typedef formatting adjusted to single line, consistent with 100-character page width.


106-121: LGTM!

Switch expression restructured for better readability. The DisconnectionSource subtypes are now explicit top-level branches within the Disconnected case, leveraging Dart 3's exhaustive pattern matching on sealed classes. The reconnection logic remains equivalent:

  • ServerInitiated: Disables reconnection for code 1000, token expired, and client errors; enables for others
  • UnHealthyConnection / SystemInitiated: Enables reconnection
  • UserInitiated: Disables reconnection
packages/stream_core/lib/src/ws/client/engine/web_socket_engine.dart (1)

184-185: LGTM!

Constructor initializer list formatting adjusted. The null-coalescing defaults (reason ?? 'Unknown', code ?? 0) remain unchanged.

packages/stream_core/test/query/sort_test.dart (1)

123-124: LGTM! Formatting changes align with PR objectives.

These are cosmetic formatting adjustments (collapsing multi-line initializations to single-line expressions) consistent with the dart format --fix applied across the repository. No functional changes to test logic.

Also applies to: 157-157, 174-174, 442-442

packages/stream_core/lib/src/user/token_manager.dart (1)

71-87: LGTM! The async removal is correct.

Removing the async keyword is appropriate since the method body directly returns the Future from synchronized(). The semantics remain identical—callers still receive a Future<UserToken>.

packages/stream_core/lib/src/ws/client/stream_web_socket_client.dart (4)

43-43: LGTM! Formatting adjustment for class declaration.

The implements clause moved to the same line as the class header is consistent with the formatting changes across the PR.


83-86: LGTM! Explicit type annotation improves clarity.

Adding the explicit MutableStateEmitter<WebSocketConnectionState> type annotation improves code readability and IDE support without changing behavior.


124-124: LGTM! Wildcard parameter updated to modern Dart convention.

The change from ( _, __) to ( _, _) aligns with Dart 3.x wildcard patterns. Using _ for unused parameters is the idiomatic approach.


165-169: LGTM! Formatting adjustment.

Minor alignment/spacing changes with no semantic impact.

packages/stream_core/lib/src/utils/event_emitter.dart (2)

60-61: LGTM! Formatting adjustment for class declaration.

The class declaration spanning two lines aligns with the formatting standards applied across the PR.


67-84: LGTM! Well-designed resolver chain implementation.

The resolver functionality is cleanly implemented:

  • Constructor properly defaults to empty iterable when no resolvers provided
  • The emit logic correctly applies resolvers in order, using the first non-null transformation
  • Falls back to emitting the original event when no resolver matches

The chain-of-responsibility pattern here is appropriate for event transformation use cases.

packages/stream_core/test/utils/event_emitter_test.dart (1)

129-129: LGTM! Formatting adjustment aligns with PR standards.

The test string moved to the same line as the test() call is consistent with the formatting changes applied across the repository. Test logic is unchanged.

packages/stream_core/lib/src/ws/client/reconnect/connection_recovery_handler.dart (1)

45-61: LGTM!

The constructor initializer reformatting looks clean and aligns well with the Dart 3 style. The use of if-case pattern matching (case final provider?) for nullable checks is idiomatic and the collection-if with spread operators for building the policies list is readable.

packages/stream_core/lib/src/ws/client/reconnect/automatic_reconnection_policy.dart (3)

15-27: LGTM!

The class declaration formatting and implementation are correct. The policy properly checks isAutomaticReconnectionEnabled from the connection state.


32-43: LGTM!

Clean implementation checking network connectivity state before allowing reconnection.


70-70: LGTM!

Trailing comma on the last enum member aligns with Dart formatting conventions and enables cleaner diffs for future additions.

packages/stream_core/lib/src/ws/client/reconnect/retry_strategy.dart (1)

68-75: Good encapsulation improvement.

Converting the mutable public field to a private backing field with a public getter prevents external code from directly modifying consecutiveFailuresCount. Mutations are now properly channeled through incrementConsecutiveFailures() and resetConsecutiveFailures().

packages/stream_core/lib/src/logger/impl/external_logger.dart (1)

3-10: LGTM!

The multi-line formatting of the typedef improves readability without changing semantics.

packages/stream_core/lib/src/logger/impl/file_logger.dart (4)

10-15: LGTM!

Removing explicit String type annotations from these constants aligns with the omit_obvious_property_types lint. Type inference handles these trivially.


29-29: LGTM!

Removing async is correct. The Finalizer callback signature is void Function(T), so the Future<void> returned by close() is discarded regardless. Dropping async removes unnecessary async state machine overhead.


75-75: LGTM!

Formatting adjustments from dart format --fix with the new line width. No semantic changes.

Also applies to: 120-122, 140-142, 168-171


178-181: LGTM!

The multi-line array literal improves readability while preserving the same filtering and sorting logic.

packages/stream_core_flutter/lib/stream_core_flutter.dart (1)

1-3: LGTM!

The export reordering is a minor organizational change that groups theme-related exports together logically. No functional impact.

apps/design_system_gallery/pubspec.yaml (2)

6-7: SDK constraint update is consistent.

The Dart SDK constraint update to ^3.10.0 aligns with other packages in the monorepo.


25-25: Remove this comment — no downgrade is evident.

The file currently shows build_runner: ^2.4.15, and git history shows this version has been present in the only commit that modified this file. There is no evidence of a previous version ^2.10.4 in the repository history.

Likely an incorrect or invalid review comment.

packages/stream_core_flutter/pubspec.yaml (1)

6-8: SDK constraints updated appropriately.

The Dart SDK constraint ^3.10.0 is consistent across the monorepo. The Flutter constraint bump from >=1.17.0 to >=3.38.1 is a significant change that aligns with the PR objective to leverage Flutter 3.38.1 features and new lint rules.

packages/stream_core_flutter/lib/src/theme/stream_theme.dart (2)

1-4: Import reorganization looks good.

The switch to relative imports for internal package files and the separation of framework vs. local imports is a reasonable organizational choice, likely driven by lint rules.


11-12: Constructor formatting is lint-compliant.

The initializer list formatting with aligned colons is consistent with the PR's dart format --fix application.

melos.yaml (2)

8-8: LGTM!

Adding apps/** to the packages list properly includes the design system gallery app in the monorepo workspace.


15-17: SDK constraints are appropriately permissive and will accept the latest Dart and Flutter versions.

The version constraints use >= operators, which correctly allow for Dart 3.10.4 and Flutter 3.38.6 (the current latest stable releases as of January 2026) in addition to the specified minimums. The comment about Flutter not following semantic versioning correctly justifies avoiding ^ syntax.

packages/stream_core_flutter/lib/src/theme/components/stream_button_theme.dart (1)

2-2: LGTM!

The switch to relative imports is consistent with the project's lint configuration (always_use_package_imports: false) and aligns with changes across other files in this PR.

analysis_options.yaml (1)

98-109: LGTM!

The disabled lint rules have appropriate justifications:

  • specify_nonobvious_* rules conflict with omit_local_variable_types as noted
  • unsafe_variance can produce false positives in valid generic code
  • document_ignores adds verbosity without significant value for this project
  • prefer_constructors_over_static_methods allows flexibility for factory patterns
.github/workflows/pr_title.yml (2)

22-25: LGTM!

Adding the ui scope appropriately supports design system related PRs with conventional commit validation.


36-39: Consider adding a ui scope mapping for design system changelog tracking.

The conventional_pr_title job now validates ui as a valid scope (Line 24), but semantic_changelog_update only maps llc to a package path. If UI-scoped PRs should also update a changelog, consider adding the mapping:

scopes: |
  {
    "llc": "packages/stream_core",
    "ui": "packages/stream_core_flutter"
  }

If ui-scoped PRs intentionally don't require changelog updates, this can be ignored.

packages/stream_core_flutter/lib/src/theme/stream_component_factory.dart (1)

2-6: LGTM!

The relative import change is consistent with the project's convention. The typedef reformatting to a single line improves readability without changing behavior.

packages/stream_core_flutter/lib/src/components/stream_button.dart (3)

2-4: LGTM! Relative imports align with lint configuration.

The switch from package imports to relative imports is consistent with the prefer_relative_imports lint rule enabled in this PR.


56-57: LGTM! Clean constructor using modern Dart syntax.

The new public constructor uses super.key appropriately, aligning with the use_super_parameters lint rule.


100-106: Update minimum SDK version in review comment: null-aware elements require Dart 3.8, not 3.10.

The ?props.iconLeft and ?props.iconRight syntax uses Dart 3.8's null-aware elements feature (not 3.10), which conditionally includes elements only when non-null. The stream_core_flutter package already enforces the correct constraint with sdk: ^3.10.0, which satisfies this requirement. However, note that the root workspace constraint (sdk: ^3.6.2) permits older Dart versions; ensure this doesn't cause issues for developers working with the workspace.

Likely an incorrect or invalid review comment.

all_lint_rules.yaml (4)

101-112: LGTM! New type inference lint rules for Dart 3.x.

The additions of no_literal_bool_comparisons, omit_obvious_local_variable_types, and omit_obvious_property_types are appropriate for modern Dart and help reduce verbosity while maintaining clarity.


227-227: Aligns with null-aware element usage in stream_button.dart.

The use_null_aware_elements rule corresponds to the ?props.iconLeft syntax used in the button component, ensuring consistent adoption of this Dart 3.x feature.


1-10: The conflicting lint rules you identified are present at the correct line numbers in all_lint_rules.yaml, but they are already properly resolved in analysis_options.yaml.

The file includes all_lint_rules.yaml as a reference catalog and deliberately disables the conflicting rules:

  • prefer_double_quotes: false (line 39) — keeps prefer_single_quotes
  • always_specify_types: false (line 45) — keeps omit_local_variable_types
  • always_use_package_imports: false (line 80) — keeps prefer_relative_imports
  • prefer_final_parameters: false (line 93) — keeps avoid_final_parameters

Each disabled rule includes an explanatory comment. The design is intentional: all_lint_rules.yaml serves as a complete reference, while analysis_options.yaml (lines 9-11) explicitly acknowledges that conflicts are resolved by selectively disabling rules.


172-175: Both strict_top_level_inference and switch_on_type lint rules are available in Dart 3.10.0. The strict_top_level_inference rule was introduced in Dart 3.7, and switch_on_type was introduced in Dart 3.9. No compatibility issues with the Dart version.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

This commit refactors the `design_system_gallery` app by:
- Deleting the `.gitignore` files in the root and `macos` directories.
- Removing the `analysis_options.yaml` file.
- Cleaning up the `pubspec.yaml` file by reordering dependencies and removing `flutter_lints`.
- Adding `const` modifiers to widgets and expressions throughout the app for improved performance.
- Making minor code style adjustments, such as reordering imports and simplifying a callback function.
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