-
-
Notifications
You must be signed in to change notification settings - Fork 214
fix: Ethernet not recognized as connectivity state #1090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Ethernet not recognized as connectivity state #1090
Conversation
Provides better alignment with newer version of connectivity_plus Add basic testing Part 1 of 2 to fix Issue parse-community#1042
|
🚀 Thanks for opening this pull request! |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds an Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds ethernet to the ParseConnectivityResult enum in the dart package to align with the newer version of connectivity_plus package. This is Part 1 of a 2-part fix for LiveQuery connectivity issues (#1042).
- Adds
ethernetenum value toParseConnectivityResult - Includes basic connectivity tests using a mock provider
- Maintains backward compatibility with existing LiveQuery reconnection logic
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/dart/lib/src/network/parse_connectivity.dart | Adds ethernet enum value with documentation to ParseConnectivityResult |
| packages/dart/test/src/network/parse_live_query_test.dart | Adds MockConnectivityProvider and tests for all connectivity states including ethernet |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/dart/test/src/network/parse_live_query_test.dart (1)
90-187: LGTM! Comprehensive coverage of connectivity states.The test cases effectively verify handling of all connectivity states (wifi, ethernet, mobile, none) including the newly added ethernet support. The test structure is clear and consistent.
Optional: Consider verifying Parse reinitialization behavior.
Each test calls
Parse().initialize()without explicit cleanup. If Parse maintains global state, consider verifying that repeated initialization doesn't cause issues, or add cleanup to ensure test isolation. This may already work correctly if Parse handles reinitialization gracefully.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/dart/lib/src/network/parse_connectivity.dart(1 hunks)packages/dart/test/src/network/parse_live_query_test.dart(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Agent
🔇 Additional comments (3)
packages/dart/lib/src/network/parse_connectivity.dart (1)
8-10: LGTM! Clean enum addition.The
ethernetenum value is properly documented and logically positioned. This change successfully extends connectivity detection to support Ethernet connections as described in the PR objectives.packages/dart/test/src/network/parse_live_query_test.dart (2)
9-31: LGTM! Well-designed mock implementation.The
MockConnectivityProvidercorrectly implements theParseConnectivityProviderinterface with appropriate use of a broadcast stream and proper resource cleanup.
189-224: LGTM! Stream emission test is well-structured.The test correctly verifies that connectivity state changes are emitted through the stream in the expected order, with proper subscription cleanup to prevent resource leaks.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1090 +/- ##
==========================================
+ Coverage 43.46% 43.51% +0.05%
==========================================
Files 61 61
Lines 3587 3587
==========================================
+ Hits 1559 1561 +2
+ Misses 2028 2026 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mtrezza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know when this is ready for merge.
|
@mtrezza I'm ready to merge if you are. |
# [dart-v9.4.2](dart-9.4.1...dart-9.4.2) (2025-12-02) ### Bug Fixes * Ethernet not recognized as connectivity state ([#1090](#1090)) ([f76fde4](f76fde4))
|
🎉 This change has been released in version dart-v9.4.2 |
Provides better alignment with newer version of connectivity_plus Add basic testing
Part 1 of 2 to fix Issue #1042
Part 2 PR is #1091
Pull Request
Issue
#1042
Closes: This is only part 1 of 2 required to fix this. This change to the Dart package must be commit with a new version number before the second part in the Flutter package can be applied.
Approach
Adds ethernet to enum to be consistent with connectivity_plus package that this code depends on.
Tasks
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.