Device: Clearer warning when a profile has no paired device#540
Merged
Conversation
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.
What changed
The overview device card used to show a red warning triangle in the corner when a profile had no paired Bluetooth device selected. The icon didn't explain what was wrong, and tapping it dropped users into the profile edit screen with no context.
It's now replaced with a softer inline banner between the card header and the battery summary that spells out the problem in plain text. Tapping it still opens the profile to select a paired device. The banner only appears when the card is expanded, so collapsed rows stay compact.
Also fixes a case where the warning would never show at all: after unpairing a device from its profile, a lingering cached address used to hide the old triangle. The new banner is gated on profile data only, so it shows up whenever the profile really has no paired device.
Technical Context
PodDevice.hasSelectedPairedDevicereads onlyble.meta.profile.address/profileAddress— never the cache fallback thatPodDevice.addressuses. That closes the post-unpair hole where the cached address kept the triangle hidden.MissingPairedDeviceBanneris its own composable rather than reusingSettingsInfoBoxbecause the shared component has hardcoded outer padding that fights the card's column padding and no whole-surfaceonClick.SinglePodsCardMissingAddressPreview/DualPodsCardMissingAddressPreviewwere never actually rendering the warning branch — the mocks carried hardcoded addresses. AddedsinglePodMissingPairedDevice()/dualPodMissingPairedDevice()fixtures so the previews now exercise the real path.overview_card_missing_paired_device_cdkey was deleted from all 76 locale files to avoidExtraTranslationlint warnings onbeta/releasebuilds. The new key will land in non-English locales on the next Crowdin sync.