Skip to content

fix(app): stop forcing CV1 onboarding on omi-enumerated non-CV1 devices#9274

Merged
mdmohsin7 merged 1 commit into
mainfrom
fix/omi-onboarding-devkit-gate
Jul 8, 2026
Merged

fix(app): stop forcing CV1 onboarding on omi-enumerated non-CV1 devices#9274
mdmohsin7 merged 1 commit into
mainfrom
fix/omi-onboarding-devkit-gate

Conversation

@mdmohsin7

@mdmohsin7 mdmohsin7 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Problem

Connecting a Friend Dev Kit 1 force-showed the interactive device onboarding — the CV1 consumer-pendant button tutorial (transcription demo → single-press → power-cycle → double-tap config). That tutorial is meant only for the CV1 pendant.

Cause

DevKit boards (and Glass / Neo / Friend) share the omi BLE service UUID, so they all enumerate as DeviceType.omi. The onboarding gate in _checkDeviceOnboarding tried to skip DevKits via DeviceUtils.isOmiDevKit, but that helper only matched the substring DEVKIT (no space):

return value.toUpperCase().contains('DEVKIT');

The device advertises "Friend Dev Kit 1""FRIEND DEV KIT 1", which contains "DEV KIT" (spaced) but not "DEVKIT". So the skip didn't fire and the CV1 tutorial was shown. This contradicted the sibling helpers isOmiCv1 (excludes 'DEV KIT') and getDeviceImagePath, which already treat the same device as not a CV1.

Fix

  1. lib/pages/home/page.dart — flip the gate from deny-listing DevKit to allow-listing CV1:

    if (!DeviceUtils.isOmiCv1(modelNumber: pairedModel, deviceName: device.name)) return;

    isOmiCv1's documented purpose is "scoping CV1-only UI like the button tutorial" — exactly this flow. Onboarding now fires only for a positively-identified CV1, and also correctly skips Glass / Neo / Friend.

  2. lib/utils/device.dartisOmiDevKit now also matches the spaced "DEV KIT" spelling. It's no longer called in lib/ after (1), but it's a public helper that carried the same space bug — this removes the latent trap and makes it consistent with its siblings.

  3. test/utils/device_test.dart — regression tests for the spaced "Friend Dev Kit 1" form in both isOmiDevKit and isOmiCv1 groups.

Verification

  • flutter test test/utils/device_test.dart22/22 pass, including isOmiCv1(deviceName: 'Friend Dev Kit 1') == false (the assertion that would have caught this bug).
  • flutter analyze lib/pages/home/page.dart lib/utils/device.dart test/utils/device_test.dart → no new issues (remaining infos are pre-existing, far from the edited gate).

🤖 Generated with Claude Code

Review in cubic

The interactive device onboarding (CV1 button tutorial: single-press,
power-cycle, double-tap) was force-shown when a Friend Dev Kit connected.
DevKit boards enumerate as DeviceType.omi, and the skip gate relied on
isOmiDevKit, which only matched 'DEVKIT' (no space) — so 'Friend Dev Kit 1'
slipped through and got the consumer-pendant tutorial.

Gate on isOmiCv1 instead (its documented purpose is scoping CV1-only UI),
so onboarding fires only for a positively identified CV1. This also skips
Glass/Neo/Friend, which likewise share DeviceType.omi.

Also fix isOmiDevKit to recognize the spaced 'DEV KIT' spelling, matching
its siblings isOmiCv1/getDeviceImagePath, so the latent trap can't bite a
future caller.

Test: flutter test test/utils/device_test.dart -> 22/22 pass, including the
literal 'Friend Dev Kit 1' name from the report.
@mdmohsin7 mdmohsin7 merged commit 803dc93 into main Jul 8, 2026
16 checks passed
@mdmohsin7 mdmohsin7 deleted the fix/omi-onboarding-devkit-gate branch July 8, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant