omi icon indicating copy to clipboard operation
omi copied to clipboard

Mobile pairing onboarding bypasses shared Bluetooth permission recovery and skips blocked-state help

Open Itaxh1 opened this issue 2 months ago • 0 comments

Product impact

Primary loop layer: Capture. First-time pairing can present a dismiss-only permission dialog and omit the delayed support guidance exactly when Bluetooth readiness blocks discovery.

Verification scope

Revalidated against freshly fetched upstream main at d1fdcb4cc4fbd021eac799630e476f144e6bc18a (2026-09-23). Relevant source blobs were checked against the audited checkout. The fault-injection/device steps below are the proposed reproduction and regression checks; they were not executed during this audit. Store-release exposure and affected-user counts are UNKNOWN.

Current behavior and evidence

Onboarding's denied-permission path invokes its own dialog callback and returns (app/lib/providers/onboarding_provider.dart:375). That callback builds a single-button dialog whose action only closes it (app/lib/pages/onboarding/find_device/page.dart:60). The app's shared Bluetooth guidance already opens Settings for unauthorized Bluetooth (app/lib/widgets/bluetooth_guidance_listener.dart:89).

A separate readiness failure returns before the ten-second help timer is installed (app/lib/providers/onboarding_provider.dart:398); the support control depends on the timer's enableInstructions flag (app/lib/pages/onboarding/find_device/page.dart:108).

Discovery is not permanently stopped: the device provider already runs immediate discovery and a ten-second scan timer (app/lib/providers/device_provider.dart:581). This issue is the inconsistent blocked-state UX and recovery, not the previously overstated claim that scanning never resumes.

Reproduction

  1. On a clean iPhone install, enter device pairing and deny Bluetooth permission.
  2. Observe the onboarding-specific dismiss-only dialog; compare with the shared Settings recovery used elsewhere.
  3. Repeat with permission granted but Bluetooth powered off before entering pairing. Check immediate guidance and the delayed support area.
  4. Enable Bluetooth or grant access in Settings, return to the app, and measure time to discovery without leaving/re-entering onboarding.
  5. Repeat on Android, including its adapter-enable action and the existing older-Android location requirement.

Proposed fix

Use the existing readiness/guidance owner for onboarding too. Show blocked-state help independently of whether a scan started. Revalidate the pending operation when returning from Settings or when the adapter becomes ready, and resume discovery promptly without creating duplicate scan timers or competing dialogs. Retain Connect later/skip where already offered.

Acceptance criteria

  • [ ] Denied permission offers a working Open Settings recovery and preserves onboarding progress.
  • [ ] Bluetooth-off state explains the required action immediately; support/skip do not depend on successful scanning.
  • [ ] Returning with Bluetooth ready resumes the pending discovery operation without revisiting the screen.
  • [ ] One discovery owner/timer and one relevant prompt exist; disposal prevents late UI updates.
  • [ ] Tests cover denied, off, ready, Settings return and disposal; attach physical-iPhone verification before claiming the user-observed pairing stall fixed.

Duplicate/fix check

Merged #11210 introduced shared disabled-Bluetooth guidance; this is the remaining onboarding bypass after that change. Merged #7132 concerns lost bond information, a different failure. #6131 concerned returning users skipping permissions after reinstall. General onboarding work belongs to #5486. Open multi-device PR #13706 touches these providers but its inspected patches do not replace this denied-permission dialog or the early-return/help ordering.

Additional duplicate check on 2026-09-23: closed #5688 covers skipping permissions without a warning, and #41 covers mismatched permission buttons; neither is this pairing dialog/help-timer path. Open #13706 at 3cddbc8c5f6c1210277a6c477b4573e649b12a75 was inspected: it changes multi-device pairing and discovery after readiness, while retaining these denied-permission and pre-help early returns.

Itaxh1 avatar Sep 23 '26 22:09 Itaxh1