Repository navigation
feat(app): say why Connect found no device - #26625
Merged
Merged
Conversation
Device Scan Empty only says the list stayed empty. Nik's 1.0.602 Forget then re-pair test hit it three times with no way to tell a scan that never ran from a radio that heard nothing or a pendant that stopped advertising. A companion Device Scan Empty Diagnosis event reports discovery_runs (scans finished since Connect opened) and peripherals_seen (named BLE peripherals the last native scan heard before the supported-device filter). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review: a blocked or failed scan still counted as a discovery run, and an earlier scan's peripheral count could leak into a later diagnosis. The native discoverer now records a per-scan outcome (not_started, unfinished, blocked, failed, completed) and counts peripherals only for a completed scan started after Connect armed the timer. startScan is awaited so a native rejection reports failed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review: Connect can open while a discovery is in flight; the sequence mark was taken after that scan started, so its result was reported as not_started. The window mark now records whether a scan is in flight and attributes it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review: peripherals_seen counted only named peripherals, so a radio hearing only anonymous advertisements looked silent. Count distinct peripheral ids before the name filter; device eligibility is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Device Scan Emptyfires when Connect still has no device after 10 s. It doesn't say why. A companion event,Device Scan Empty Diagnosis, now fires with it:scan_outcome: the latest BLE scan in the window (started after Connect opened, or already running when it opened):not_started,unfinished,blocked(adapter or permission),failed(native rejected it) orcompleted.peripherals_seen: distinct BLE advertisers (by peripheral id, named or anonymous) that completed scan heard, before any name or supported-device filter. Always 0 unless the outcome iscompleted, so an earlier scan's count never carries over. Withcompleted, 0 means the radio heard nothing. Above 0 means advertisers were heard but no supported Omi.startScanis now awaited so a native rejection reportsfailed. DeviceService already catches each discoverer's errors, so the page behaves as before.The existing event is unchanged (its properties are immutable), so the onboarding funnel consumer is untouched.
Why
Nik's real-device acceptance test of #26539 on 1.0.602: Forget Device, then Connect. Three Connect opens on builds 1647 and 1648 each fired
Device Scan Empty, and the page showed "No Omi Found" for over a minute. Nik's same phone and pendant re-paired within ~20 s on build 1644 (Nov 27 20:05–20:16 UTC). Upload timing maps 1647 to12eda380, before #26539, and nothing in the scan path changed between 1644 and 1647. So #26539 is probably not the cause, and the current telemetry can't tell the remaining causes apart. This event will on the next failure.Tests
flutter test test/providers/onboarding_provider_pairing_presentation_test.dart test/utils/analytics/onboarding_funnel_analytics_test.dart test/services/(Flutter 3.44.5): the empty-scan test assertsscan_outcome: not_startedandperipherals_seen: 0.test/unit/native_bluetooth_discoverer_scan_outcome_test.dartcovers completed (count), unfinished, blocked and failed, including that blocked and failed clear an earlier count, that a scan already running when Connect opens reports its real result, that a scan finished before Connect opened is ignored, and that anonymous advertisements count without becoming devices.flutter test test/unit/ test/providers/ test/services/devices/: 5744 passed. One file,listen_custody_test.dart, fails to load locally both with and without this change, becausedev_env.g.dartisn't generated in this worktree.python3 scripts/check_event_registry.py: generated output current, consumer executable, PostHog delta $+0.UI-Evidence: none -- telemetry only; the Connect page renders the same
Failure class
Failure-Class: none
The only
fix:commit corrects code added earlier in this PR. Nothing shipped.Product invariants affected
none
🤖 Generated with Claude Code