feat(pairing): iOS-style quick-connect auto-pairing popup#72
Open
rgvxsthi wants to merge 1 commit into
Open
Conversation
While the app is foregrounded and not connected to a ring, ambiently scan and, when a known ring is detected nearby (proximity-gated), slide up a bottom sheet (mirroring the coach sheet) showing the ring's product image + its detected advertised name (e.g. 'R09_AC03') and asking 'Is this your ring?' → Connect / Not this one - scan for others / Close. - RingBLEClient: passive startAmbientScan()/stopAmbientScan() decoupled from the connection-state machine (never flips the header pill); explicit scan/connect cleanly take over the radio. - QuickConnectNavigation (@observable, shared): candidate + isPresented + a session dismissed-set so it doesn't re-nag. - QuickConnectSheet: resolves the model via WearableModel.resolve, renders RingArtView + name + signal dots; Connect calls the real connect(to:). - MainTabView hosts the sheet after the coach sheet and drives the ambient scan + trigger via scenePhase/state/discovered observers. Gating: foreground + not connected/connecting/reconnecting/scanning. A healthy paired ring auto-reconnects (turns the scan off), so the popup only appears when the app is genuinely disconnected from its ring — i.e. the user wants to (re)pair. De-duped per session; proximity gate RSSI >= -65. iOS exposes no MAC address, so identity shown is the advertised name + product image only.
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
An iOS-proximity-pairing-style quick connect: while the app is foregrounded and not connected to a ring, it ambiently scans and — when a known ring is detected nearby — slides up a bottom sheet (mirroring the coach chat sheet) with the ring's product image + its detected advertised name (e.g. "R09_AC03") asking "Is this your ring?" → Connect / Not this one — scan for others / Close.
How
RingBLEClient— passivestartAmbientScan()/stopAmbientScan(), decoupled from the connection-state machine (never flips the header pill to "Scanning"); explicit scan/connect cleanly take over the radio.QuickConnectNavigation(@Observable, shared, mirrorsCoachNavigation) — candidate + isPresented + a session dismissed-set so it doesn't re-nag.QuickConnectSheet— resolves the model viaWearableModel.resolve, rendersRingArtView+ name + signal dots; Connect calls the realconnect(to:selectedModelID:); auto-dismisses on connect. ReusesSignalStrengthDots, PulseColors/PulseFont, glass buttons.MainTabViewhosts the sheet after the coach sheet and drives the ambient scan + trigger viascenePhase/state/discoveredobservers.Gating (so it's not annoying)
Scans only when foreground and not connected / connecting / reconnecting / scanning. A healthy paired ring auto-reconnects (→ turns the scan off), so the popup appears only when the app is genuinely disconnected from its ring — i.e. the user actually wants to (re)pair. De-duped per session; proximity gate RSSI ≥ −65.
Notes
WearableModel.advertisedNamePatterns(^R09_.*etc.) — no new mechanism.discovered: [DiscoveredRing],connect,RingArtView) — additive; no changes to the explicit PairingView flow.Image Preview