[Q1 Quality] WearOS - Improve login flow#4949
Merged
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the WearOS watch login synchronization flow by adding proper error handling, timeout mechanisms, and retry capabilities. The changes focus on the logic layer, with UI updates planned for a subsequent PR.
Changes:
- Adds type-safe state management with sealed interfaces for sync states and errors
- Implements a 30-second timeout for watch-to-phone connection attempts
- Adds race condition prevention for concurrent sync operations
- Provides comprehensive unit test coverage for WatchSync and WearMainActivityViewModel
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/ui/authentication/WatchSyncState.kt | Defines sealed interfaces for sync states (Idle, Syncing, Success, Failed) and error types |
| wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/WearMainActivityViewModel.kt | Adds timeout handling, retry mechanism, and proper state management for watch sync |
| modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/watchsync/WatchSync.kt | Improves error propagation with Result return type and exception handling |
| wear/src/test/kotlin/au/com/shiftyjelly/pocketcasts/wear/WearMainActivityViewModelTest.kt | Adds unit tests for ViewModel sync functionality |
| modules/features/account/src/test/java/au/com/shiftyjelly/pocketcasts/account/watchsync/WatchSyncTest.kt | Adds comprehensive unit tests for WatchSync error handling |
| modules/services/localization/src/main/res/values/strings.xml | Adds localized strings for sync status messages and error states (for future UI work) |
geekygecko
reviewed
Feb 5, 2026
3bae280 to
74d55b0
Compare
6 tasks
6 tasks
geekygecko
approved these changes
Feb 11, 2026
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.
Description
This PR improves the watch login sync experience by:
This is the first part of the job focusing only on the logic pieces. UI will be updated in a subsequent PR.
Fixes PCDROID-408
Testing Instructions
Just review the code and make sure the pipeline is green
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xml