Repository navigation
feat(app): recording Live Activity on the Lock Screen and Dynamic Island - #18887
Conversation
When iOS relaunches Omi with the pendant still connected (state restoration after the process is killed), the native manager rediscovered services before Flutter was listening, and connectPeripheral then returned early for the already-connected peripheral. Flutter never received onDeviceReady, waited 60 s, and showed the pendant as disconnected until the app was reopened. connectPeripheral now asks OmiBleConnectPolicy what to do: connect, replay onDeviceReady when services are known, or rediscover them. NativeBleTransport already treats a repeated ready event as a re-subscribe. The policy is proven through its own seam by ios-ble-connect-policy (FC-already-satisfied-request-as-noop, the iOS twin of Android's BleConnectRouter).
Adds an iOS Live Activity for capture: the designed Lock Screen card and the compact, minimal and expanded Dynamic Island, with Pause/Resume and End Conversation (Stop for the phone mic) buttons on iOS 17+. Layout follows the omi-ios-v2 design package: fixed type and controls, only the pendant scales with the device (layout.KH), verified on 375/393/402/440 pt simulators. - CaptureSystemSurface projects CaptureController state; the OS draws the timer, and Resume is offered only after a user pause. - Actions run through CaptureController.performSystemSurfaceAction and are bound to the recording id and conversation revision, so old cards cannot act on a newer recording. - CaptureVoiceMeter reads the audio capture already forwards (pendant Opus decoded, phone PCM16) with the voice-introduction RMS threshold; the strip moves about once a second while voice is heard and settles flat in silence. The tap is presentation-only and cannot drop audio. - forceProcessingCurrentConversation no longer resets the next conversation, and removes its skeleton, when the conversation changes during the WAL drain. - Show on Lock Screen toggle in Notifications settings.
kodjima33
left a comment
There was a problem hiding this comment.
Feature (iOS Live Activity/Dynamic Island), app area not desktop — approve-only per policy, no merge. No abuse signals in diff.
|
Thanks for this — for a first contribution it's an unusually disciplined piece of iOS work, and the scope hangs together as one feature (the l10n churn is entirely mechanical
Nothing below is blocking — the approved head stands; these are merge-time calls:
This review was produced by an automated review agent on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Translates the eight native strings that shipped English-only in the Live Activity catalog (the island and card subtitles, the "Open Omi to …" recovery titles and the App Intent titles) into all 48 app locales, and reuses the app's own translations for the intent's "Conversation" parameter. Every key in Localizable.xcstrings now covers the same 49 locales as the Flutter app.
…lies Each button tap armed a 20 s fallback task that kept sleeping after Flutter had already answered. CaptureIntentReply now owns that timer and cancels it when the reply arrives; whichever comes first resumes the continuation, the other is a no-op, and a missing reply still fails the tap instead of leaving it waiting.
Conflicts were limited to app/lib/l10n: main's ARB files and generated localizations are taken as-is, and showOnLockScreen is re-added to all 49 locales with scripts/l10n.py.
SCA-561 made capture_coordinator the single ownership authority: public CaptureController APIs dispatch events and nothing else mutates ownership. The Live Activity still paused and resumed the phone through private mute and mic-restart calls, and chose its own finish path per source. Its buttons are now one more caller of the live page's controls: pauseCapture, resumeCapture and finishCapture, so the coordinator decides what each does for whichever source owns capture. Phone vs. pendant and batch state come from the committed read model instead of private fields. Finish before the first transcript now matches the live page and requests processing; an empty result only clears the processing skeleton.
kodjima33
left a comment
There was a problem hiding this comment.
Mobile feature (iOS Live Activity), not desktop -> approve-only per policy, no merge. Well-tested, no abuse signals, reconnect fix bundled in is minor.
|
Follow-up on the current head (c9299ff) — the three commits pushed after the earlier automated review resolve the notes it left:
Also re-checked at this head: the widget extension stays render-only (the action dispatcher handler is installed only in Runner; the BatteryWidget target compiles This review was produced by an automated review agent on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
c9299ff to
63f8746
Compare
… the card Stop pauses and Start resumes. End saves the conversation when there is one and always closes the Lock Screen and Dynamic Island card. A pendant keeps listening after its conversation ends, so the card stays closed for the rest of that recording, as when it is swiped away. End is bold and never waits for a transcript. Start and End reuse the app's own translations.
kodjima33
left a comment
There was a problem hiding this comment.
Mobile feature (iOS Live Activity/Dynamic Island) + bundled BLE reconnect fix, area=app not desktop -> approve-only per policy, no merge. Re-reviewed at new commit d428a8a; no abuse signals, extensively tested per PR body (device + simulators + unit suites).
The pendant keeps picking up audio; Mute and Unmute say whether Omi uses it, so the card no longer says Start/Stop. A user mute reads "Muted"; a system interruption keeps "Paused". The labels reuse the app's own translations, and long ones shrink a little instead of cutting off.
…hoto The Live Activity drew the pendant as a glossy orb from the v2 design. It now shows the app's pendant photo, lit with a soft glow while audio is captured and its lights-off photo otherwise, the same pictures the Battery widget uses.
|
Follow-up on the current head (d428a8a) — the two commits since the last automated review change how the card's buttons behave, and both changes check out:
One small non-blocking note: the renamed keys in This head already carries maintainer approval; from the automation side nothing blocks merge. This review was produced by an automated review agent on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile feature (iOS Live Activity for recording), not a bug fix -> approve-only, re-confirmed per current policy. mergeStateStatus DIRTY, backend unchanged per PR description.
kodjima33
left a comment
There was a problem hiding this comment.
Feature (iOS Lock Screen / Dynamic Island Live Activity) — mobile/ios area, approve-only per policy. mergeStateStatus DIRTY, not merging.
Preserve main BLE readiness recovery, implicit Flutter engine registration and Home Screen widgets. Attach the Live Activity to the current engine, share the native widget catalog and route capture links over Home. Formatting and hygiene were checked locally; no web changes are introduced.
|
@Git-on-my-level thanks for the review. On the Three changes since 41fe4c4:
|
Stop turns the phone microphone off, so Start from the Lock Screen has to start a recording while Omi is in the background. iOS refuses that to a plain Live Activity intent, the mic start failed, and the recording failed closed: the card's Start ended the phone recording it was meant to resume. - On iOS 18 and later, Start for a stopped phone mic is an audio recording intent, which iOS lets start recording in the background. Pendant Start is unchanged. - iOS 17 has no such intent, so a stopped phone mic offers no Start on the card; tapping the card opens Omi. - A stopped card no longer goes stale: iOS may suspend Omi while the mic is off, and Start has to stay on the card.
kodjima33
left a comment
There was a problem hiding this comment.
Re-confirmed after new commits: iOS Lock Screen/Dynamic Island Live Activity feature, files under app/ios + app/lib (Flutter mobile), mobile area, not a bug fix -> approve-only stands. No abuse signals, mergeStateStatus now CLEAN.
|
Reviewed the full diff on the current head. This is a well-built feature — some notes from a deep pass, nothing blocking: Architecture (verified in code)
Two things worth keeping in mind post-merge (non-blocking)
Docs ( Thanks @Itaxh1 — the tap-staleness fencing in particular is a pattern worth reusing. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
…ve-activity Conflicts: - app/lib/l10n: main's files, with showOnLockScreen re-added through scripts/l10n.py. - app/test/providers/force_processing_placeholder_test.dart: the phone sync double keeps main's stampError and injectable instance, and this branch's one gate per drain. main made openHomeDeepLink return whether the destination opened, so the capture link returns false for a recording that has ended.
The capture link's stale path now reports that nothing opened; the test fails if it claims the capture page was shown.
kodjima33
left a comment
There was a problem hiding this comment.
Feature (Lock Screen / Dynamic Island Live Activity, iOS) — approve-only per confidence gate; large diff, DIRTY, not mergeable regardless.
…ant audio is verified main now hides Listening and the timer while a pendant's audio is unverified. The Lock Screen card and Dynamic Island do the same: they name the pendant, show no time, keep the wave still, and keep Stop and End.
|
Reviewed this head (
One surface worth a physical-device sanity check before release: The localization churn (~60 locales + generated files, one No blocking issues found from my side. Since the current head is a merge commit pushed after the last maintainer approval, it just needs a maintainer re-approval pass before merging — everything is green on CI here. This review is AI-generated feedback on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
@cubic-dev-ai review New since your last pass (41fe4c4):
|
@Itaxh1 I can’t review only the new changes because the PR history changed. Comment |
|
@cubic review |
There was a problem hiding this comment.
All reported issues were addressed across 131 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Re-trigger cubic
…d keep a rejected setting from reaching the card - While pendant audio is unverified the card's clock stops, so waiting for audio is not counted as capture time. - If the Show on Lock Screen write is rejected, the cached preference is restored before the error, so the next card update cannot send the rejected value. - The lifetime listener guard is tested while a close is still in flight. - The changelog note names the iOS versions the buttons and the moving wave need.
|
@cubic-dev-ai review All 4 findings from the last pass are fixed in a6a4e1a (head d59c9da):
|
@Itaxh1 I've dismissed this issue:
|
@Itaxh1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 131 files
You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Re-trigger cubic
… clock test Without the wait, a card that counted the time before audio arrived would still show zero and pass.
|
@cubic-dev-ai review The finding from the last pass is fixed in 88cd28e. The card clock test now waits 12 s before the pendant's audio is verified, and still expects zero elapsed after verification. With the clock fix removed it fails (expected 0, actual 12). |
@Itaxh1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 131 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Re-trigger cubic
TL;DR
Recording now shows up outside the app on iPhone. While Omi records, a Live Activity on the Lock Screen and in the Dynamic Island shows the recording state, a live timer and Omi's breathing waveform, with Stop / Start and End controls, so a recording can be checked and controlled without opening the app.
iPhone only: Android is unchanged and keeps its existing "Recording in progress" notification.
Lock Screen
Dynamic Island (Stop, then Start)
Recorded on an iPhone 15 Pro Max (iOS 26), before Stop flattened the wave into a line. Full-quality clips: Lock Screen · Dynamic Island
What changed and why
Adds an iOS Live Activity for recording: the Lock Screen card plus the compact, minimal and expanded Dynamic Island, with Stop / Start and End on iOS 17+. It shows capture state the app already has, so the backend is unchanged. Layout follows the
omi-ios-v2design package (LockScreen/Island/HomeScreengeometry andtokens.json). Text and controls stay the same size on every iPhone. Only the pendant scales, usinglayout.KH.CaptureSystemSurfaceprojectsCaptureControllerstate. iOS draws the timer, and Start appears only after a user stop. Card actions are tied to the recording id and conversation revision, so a tap on an old card cannot act on a newer recording.pauseCapture/resumeCapture/finishCaptureas the live page, Home card and quick actions. The coordinator decides what each does for whichever source owns capture (SCA-561 single ownership). Each tap carries its recording and conversation, and the coordinator rejects it if they changed by the time it is applied, so a tap that waited behind a stop or handoff never acts on the recording that replaced it. Phone vs. pendant and batch state come from the committed read model.omi-liquid-dock2: bars breathe to 45% over 1.6 s with a 13-bar ripple) for as long as recording runs. iOS draws it on the system clock through WidgetKit's clock-hand rotation effect, so the app sends no animation updates. When capture stops, pauses or finishes, or the card goes stale, the bars lie flat in a line, and Start brings the moving wave back. The effect is not in the public SDK, so it is looked up at run time, and the card shows the still wave wherever it is unavailable. It plays on iOS 18 and later.AudioRecordingIntent, which iOS lets start recording in the background. iOS 17 has no such intent, so there a stopped phone mic shows no Start, and tapping the card opens Omi. Pendant Start is unchanged. A stopped card no longer goes stale, because iOS may suspend Omi while the mic is off and Start has to stay on the card.contracts/siri/README.md). That CI build draws the card without buttons; releases are built with Xcode 27.Product invariants affected
none
How it was verified
TZ=UTC bash app/test.shat this head: the spine suite (138) and the whole app suite (3,872) passed.main:flutter test test/services/capture test/services/bridges test/providers/force_processing_placeholder_test.dart test/widgets/settings/live_activity_settings_test.dart: 216 passed.flutter test test/services test/providers test/widgets/settings test/widgets/home: 995 passed.TZ=UTC flutter test test/spine: 129 passed.flutter analyzeon every changed Dart file: no issues.ContentState, and also a payload from an older build that still carries the removed voice, batch and wave-time fields. Both decode.python3 app/scripts/l10n.py check: ok (49 locales).AVAudioEnginefailedkAUStartIOwith error 2003329396, andaudiomxdloggedClient 'Runner(…)' is in the background and isn't allowed to start recording … hasEntitlementToStartRecordingInTheBackground=NO. The coordinator then failed closed, which ended the recording and closed the card.OmiCaptureRecordingIntent.compiler(>=6.4)gate forced off. Both paths compile, and nothing outside the gated code references the intent.ci:full): iOS Compile Check passed on the pinned Xcode 26.6, including "Prove stable iOS compiler emits no Siri metadata". Dart Analyze & Tests, Generated Files, Seeded Journeys (hermetic), Formatting, Hygiene, the Desktop Swift contracts and the Siri Xcode 27 advisory also passed.project.pbxproj: the 48 added lines passplutil -lint; each of the 18 new object IDs is defined once and referenced. Runner and RunnerRayBanDat build the manager, attributes and intent, BatteryWidget builds the attributes, intent and card, and the watch app builds none of them.pod installleaves the file unchanged.CaptureIntentReply(not committed) covers reply before timeout, missing reply, error reply, and a late reply after the timeout; each resumes exactly once.mainat 8c45d9f (2026-10-04): fullbash app/test.sh: 4,654 passed, 14 skipped, 0 failed. Analyzer ratchet passed, CI's Dart and ARB format checks pass on every changed file, andscripts/l10n.py checkis ok. Mergingmainneeded two follow-ups.openHomeDeepLinknow returns whether a destination opened, so the capture link returns false for a recording that has ended. The Process Now test double keeps bothmain's injectable phone sync and this branch's one gate per drain.Tests
app/test/services/capture/capture_system_surface_test.dart: card actions (Stop/Start keeps elapsed time, stale actions rejected), phone and batch End, stall recovery vs. user stop, no activity updates for the wave during silence or speech, an update at each full hour so the timer runs past it, an Omi call shown as an interruption without Stop or Start, a Stop that queued behind a pendant-to-phone handoff rejected instead of pausing the new phone recording, a failed action kept on the card through health refreshes until the recording changes, and a tap still queued at shutdown reported as failed.app/test/services/bridges/live_activity_bridge_test.dart: owner handoff, so an old controller cannot detach a newer one, and close completes without a native channel (iOS before 16.1) or after a native detach error.app/test/services/capture/capture_coordinator_test.dart: a card's pause, resume and finish apply only while its recording and conversation are current; a stale one runs nothing.app/test/widgets/settings/live_activity_settings_test.dart: the Show on Lock Screen switch is hidden while iOS has Live Activities off for Omi and returns after Settings, and a failed native update restores the switch and the saved preference. Both fail on the previous widget. A rejected preference write also keeps the old choice, which the next card update sends; this fails without the restore.app/test/services/capture/capture_socket_generation_test.dart: with a real provider and a pendant whose audio is unverified, the card claims neither Listening nor a time, and keeps Pause. Once audio is verified, the claim returns. A lapse in verification hides it again and stops the clock until audio returns. This fails without the change.app/test/widgets/home/home_navigation_test.dart: a card link for a recording that has ended shows Home, opens nothing, and reports that nothing opened.app/test/providers/force_processing_placeholder_test.dart: if the conversation changes during the WAL drain, the processing skeleton is removed and the next conversation is not reset. A drain that goes stale keeps the skeleton a newer request is still showing; this fails without the ownership check.Failure class (fixes)
Failure-Class: none
Scoped cleanups (optional)
None.
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 3799 -> 3858 | The Live Activity's recording identity, read-model getters and action entry point (which delegates to pauseCapture/resumeCapture/finishCapture) belong to the capture owner
Line-Count-Exception: app/lib/services/capture/capture_coordinator.dart | 2828 -> 2869 | A Live Activity tap is checked when pause, resume or finish is applied, so its target type, event fields, environment fields and the stale-tap check live with the reducer