Skip to content

app: Omi picker without the consent sheet, and live words while onboarding - #26833

Merged
Git-on-my-level merged 3 commits into
mainfrom
app/onboarding-picker-live-words
Dec 1, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
app/onboarding-picker-live-words

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #26706, from David's onboarding run on an iPhone 15 Pro Max (iOS 27.2.1, local stack).

What changes

No "Find Nearby Accessories" consent sheet before the Omi picker (iOS 18+).
#26706 set ASPickerDisplaySettings.Options.filterDiscoveryResults on iOS 26.1+ so it could label the closest of several pendants "{name} · Nearest". That option hands the app raw discovery results, so iOS first shows "Omi wants to discover nearby accessories". Recordings from before and after #26706 show the sheet appearing only with that option. This PR drops app-side filtering:

  • The first pick of an app run uses Apple's ASDiscoveryDescriptor.bluetoothRange = .immediate, so only accessories right next to the phone are offered: the Omi being held, not one across the room. A second pick (Try Again) uses the normal range.
  • The "· Nearest" label, the nearestName channel argument and the accessoryPickerNearestName string are removed. Both callers (onboarding pairing step and the capture connect panel) are migrated.
  • Android and iOS 17 and older don't use AccessorySetupKit and are unchanged.

Live words on "Tell Omi about your week".
The live text came a sentence at a time, 5–7 s after the first word was spoken, because speech-to-text returns only finished chunks. Locally, Parakeet ends an utterance after a 0.6 s pause. In production, parakeet-window has a 6 s pace and emits only finished sentences. The app showed each chunk immediately; BLE and the socket add under 0.2 s.

  • PipelineActivationCapture now runs the phone's own on-device recogniser (the existing services/live_preview engine: SpeechTranscriber / SFSpeech on iOS, the on-device engine on Android) while the step listens. It shows the recogniser's words after the server's words that already cover them (LivePreviewCoverage).
  • Display only: audio routing, the local_preview declaration and the server transcript are untouched. The dictation is still matched to its conversation and enrolled as a voice sample on the server's words alone.
  • LivePreviewController gains a third reason to run, setScreenCapture, next to the server grant and the vendor_recognizer_on_opened_app front-capture reason. A capture end clears it, and the page asserts it again on the next capture change.
  • With no installed on-device model or speech permission, the engine never prompts or downloads, and the step shows the server's words as before.

Verification

  • flutter test on live_preview, devices, teach-voice, the yinka activation flow, onboarding first-run steps and voice_profile_running_recording_test.dart: 422 passed. New tests cover the screen reason (it starts without a grant, survives grant and front changes, and is cleared by a capture end) and the onboarding page (recogniser words show before server words and ignore words from before the page; leaving the page stops the recogniser; the server's words lead and alone decide the dictation's transcript).
  • flutter analyze on the changed directories: no new issues.
  • Profile build installed on a physical iPhone (iOS 27.2.1) against the local stack. Fresh install and onboarding: no consent sheet, the held Omi offered first with other Omis on nearby, and words appeared as spoken. Confirmed by David.

Product invariants affected

  • INV-CAP-1: OmiAccessorySetupPlugin.swift changes only how Apple's picker discovers and offers accessories. Connection, subscription and audio routing are untouched, and the onboarding recogniser takes a copied tap of frames already delivered, so pendant audio retention is unchanged.

UI-Evidence: none -- no layout or copy change on any screen; the picker is Apple's system sheet and the live text box is unchanged, only when words arrive in it differs, which a screenshot cannot show.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…consent sheet

- Pairing: drop the picker's own discovery filtering (filterDiscoveryResults).
  It made iOS show "wants to discover nearby accessories" before the picker.
  The first pick of a run now offers only accessories right next to the phone
  (Apple's .immediate range), so the Omi being held is the one offered; a
  retry widens to the normal range. Removes the "{name} · Nearest" label and
  its string.
- "Tell Omi about your week": the phone's own speech recogniser runs while the
  step listens (display only; audio routing and the server transcript are
  unchanged), so words show as they are spoken instead of a sentence at a time.
  The server's words lead; the dictation is still matched and enrolled on them
  alone. LivePreviewController gains a third reason to run, setScreenCapture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui ca392b6640b3e49e8cd31520d5bd41cfb44aecad. A later head keeps the approval while the PR's own UI changes stay the same, including after a rebase or a merge from main; a new or edited UI change needs a fresh one. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 109 files

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

- The onboarding test now runs finish()'s dictation matching: phone words that
  share none of the server's would make it refuse the conversation, so the
  title comes back only if it matches on the server's words.
- The screen-reason test checks that a capture end stops the recogniser.
- Clearer release note for the picker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 71fda7d04909a68250a6ddebb625f772302a0449. A later head keeps the approval while the PR's own UI changes stay the same, including after a rebase or a merge from main; a new or edited UI change needs a fresh one. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 733d38efc67909c36159aea8a57ebb4da253976c. A later head keeps the approval while the PR's own UI changes stay the same, including after a rebase or a merge from main; a new or edited UI change needs a fresh one. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

/approve-ui 733d38e

@Git-on-my-level
Git-on-my-level merged commit 0d04614 into main Dec 1, 2026
53 checks passed
@Git-on-my-level
Git-on-my-level deleted the app/onboarding-picker-live-words branch December 1, 2026 01:47
@Git-on-my-level

Copy link
Copy Markdown
Member Author

Post-merge independent review: FIX-FIRST (omi-panel review-20261201t015359-1442 @ 733d38e).

  • F1 (major): activation_capture.dart:484. The phone recogniser's words enable the dictation's Done tap. If the reader taps about 1 s after speaking, before the first server segment arrives 5–7 s later, finish() reads an empty _heard, and _enrollVoice returns early (fewer than 10 words), so the first-run voice sample is discarded. Fix: enable Done on the server's words only, or have finish() wait for the first server segment.
  • F2 (minor): activation_capture.dart:302. A capture end re-asserts the screen reason, so the recogniser keeps running without a capture.
  • F3 (minor): activation_flow.dart:564. liveText (server plus phone words) is passed as heard, so the timeout and no-transcript paths show the phone's words as the transcript.

Git-on-my-level added a commit that referenced this pull request Dec 1, 2026
…iew fixes) (#26852)

* app: onboarding dictation completes on the server's words (#26833 review fixes)

#26833 shows the phone's own recogniser words on the onboarding dictation
step. Its post-merge review (omi-panel review-20261201t015359-1442) found
that those display-only words leaked into decisions:

- F1: Done was enabled by any shown words, so a tap before the first
  server segment finished with no server words, dropping the first-run
  voice sample and matching the conversation on nothing. ActivationCapture
  now exposes heardText (the server's words alone); the dictation's check
  and the voice profile page's Continue gate on it.
- F2: a capture end cleared the screen reason, and the page's listener put
  it straight back, so the recogniser ran with no capture. The page now
  asserts the screen reason only while capture is active, and drops it
  otherwise.
- F3: the dictation passed shown text (server plus phone words) as heard,
  so the notes-timeout and no-transcript paths showed the phone's words as
  the transcript. It now passes heardText.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* app: changelog: no new entry; the unreleased onboarding live-words fragment covers this fix

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* app: voice bar waits for server words; screen reason follows capture edges (#26852 review)

omi-panel review-20261201t021652-020f on #26852:

- F1: on the voice profile page a full voice bar enabled Continue and
  auto-advanced with no server words, dropping the sample. Both Continue
  arms now need server words; the auto-advance waits for them and fires
  when they arrive after the bar is full.
- F2: a session roll ends the preview before capture's state moves, and
  the preview listener re-admitted the screen reason from the stale
  "recording" state. The reason now follows capture start/stop edges seen
  by the capture listener only; the preview listener is display only.
- F3: the capturing rule is defined once, as
  LiveWordsCapturing.capturingForLiveWords, used by LiveWordsCoordinator
  and the onboarding page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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