Repository navigation
feat(app): connect Omi and OmiGlass at the same time for multi-modal conversations - #13706
apoorvdarshan wants to merge 15 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 122 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Reviewed the multi-device implementation across the core paths. This hangs together well: the per-device connection model in Notes from reading the diff — none of these block on their own:
Agent-guidance note for maintainers: this PR adds The PR is honest that no hardware verification was done — real BLE reconnect timing, the OmiGlass camera start/stop writes over a live link, and the pendant-drop audio handover are exactly the parts the in-memory-transport tests can't cover. Shipping simultaneous Omi + OmiGlass pairing at all, with the pendant-audio/glasses-photo role split, is a product-direction decision on top of the request in #2954 — leaving this for human maintainer review and sign-off with on-device validation rather than anything automated. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
d294404 to
582f299
Compare
|
Rebased onto upstream |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile feature (app/, Flutter) — new capability (simultaneous Omi + OmiGlass connection), not a bug fix, so per policy this is approve-only (confidence gate doesn't apply to features). Not desktop, so Summer Challenge tracks (Windows/speed/design are desktop-specific) don't match either. CI green (Android Compile Smoke, Dart Analyze & Tests pass), no abuse signals.
|
Follow-up on the rebase to
New reads on this head also look right: the Two things for the record, neither newly blocking:
With the maintainer approval on this exact head, I've removed 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.
Re-evaluated under current policy (backlog drain).
f704f6a to
2f997cc
Compare
|
Rebased onto latest |
|
CI / l10n note (executor): Needed next (CloudAgent / parent): restore full Skip resolving optional review threads; #13702 backend reindex P2 remains intentionally deferred. |
CI fix: Danish l10n restore + ARB dedupePushed to What broke
Fix
Verification (local)
CI should trend green on Formatting (ARB), Generated Files, and Dart Analyze & Tests. No fork |
ad1a6d5 to
58ed42c
Compare
|
Rebased |
|
Pushed
Flutter is not installed on the Cloud VM, so I did not re-run |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile feature (approve-only per policy — non-desktop features don't merge). Well-tested multi-device support, no auth/secrets touched.
|
Follow-up on the changes since the last automated pass (then at Verified on
Still true from the earlier pass and unchanged by the rebase: no on-hardware validation is evidenced — live BLE reconnect timing, OmiGlass camera start/stop over a real link, and the pendant-drop audio handover remain outside what the in-memory-transport tests cover. That's the one thing worth a physical-device smoke test before release. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Rebased |
9eb08d8 to
e75a689
Compare
|
Hygiene failed after the rebase on |
kodjima33
left a comment
There was a problem hiding this comment.
feat(app): connect Omi+OmiGlass simultaneously — mobile feature, approve-only per policy (not a bug fix). CI green, no abuse signals.
5f90c76 to
7ce0214
Compare
kodjima33
left a comment
There was a problem hiding this comment.
Mobile feature (multi-device Omi+OmiGlass), approve-only per policy; extensively tested.
7ce0214 to
7c81a39
Compare
|
Rebased |
Rebase the existing multi-device feature; merge localization additions without dropping current main keys. All 54 focused provider/pairing/connection/widget tests passed. Failure-Class: none.
The localization contract passes after regeneration and pinned Dart formatting. Failure-Class: none.
74ec21f to
5a10f76
Compare
|
Reviewed the multi-device rework on the current head — this is a well-engineered take on #2954. Some notes from the code review: What looks right
Non-blocking observations
Before merge
The engineering quality here is high and the feature is a long-requested one. The multi-device role semantics (pendant drop promotes glasses to audio, mute affects audio only) and the pairing/replace UX are product-level decisions, so I'm leaving the final call for human maintainer sign-off alongside the on-device validation. 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.
Feature (multi-device Omi+OmiGlass capture) in mobile bucket — approve-only per policy (not a bug fix); also DIRTY so not mergeable regardless.
kodjima33
left a comment
There was a problem hiding this comment.
Feature (simultaneous Omi+OmiGlass connection), not a bug fix — approve-only per confidence gate; also DIRTY (needs manual rebase, left untouched).
kodjima33
left a comment
There was a problem hiding this comment.
Feature (multi-device BLE connection); approve-only per policy, large but scoped to app/ l10n+dart, no abuse signal.
Integrates upstream 789de51 without rewriting PR history. Verification evidence: repair-evidence/20261011-13706-*.log (local coordinator handoff); PR body records commands and remaining hardware limitations. Failure-Class: none
Capture the actual Flutter widgets using their existing isolated test fixtures, the iOS theme and bundled fonts. This documents the rendered UI only; radio behavior, on-device interactions and firmware timing remain pending central hardware validation.
Preserve inherited instructions and both speech and multi-device contract links with concise wording. Failure-Class: none
kodjima33
left a comment
There was a problem hiding this comment.
feat(app): connect Omi+OmiGlass simultaneously -- feature, approve-only
kodjima33
left a comment
There was a problem hiding this comment.
feat(app): connect Omi+OmiGlass simultaneously -- feature, approve-only
kodjima33
left a comment
There was a problem hiding this comment.
Re-affirming prior approval after new commits (rebase/localization maintenance only, no material change). Still a feature (multi-device Omi+OmiGlass pairing) and still DIRTY, so approve-only, no merge.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep DeviceService.disconnectDevice disposing the dropped transport (main's orphan-transport fix) inside the per-device mutex, and route readoption through the per-device debouncers. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
main's readoption path re-runs the connect side effects after setIsConnected(false); with the audio/photo role model that path goes through registerConnectedDevice, which skipped _onDeviceConnected while _activeAudioDeviceId still named the device. Clear it together with the admitted link so the next reconcile runs the full connect path again. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
Holding the mutex while disposing the transport deterministically hangs main's "disconnecting after a timed-out connect" fakeAsync test (the dispose continuation never runs and the test times out); the lock-free shape main uses passes it. The drop still takes effect immediately and disposes the transport, and forgetDevice/ensureConnection keep their per-device serialization. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
kodjima33
left a comment
There was a problem hiding this comment.
Feature (simultaneous Omi + OmiGlass multi-device connection) — approve only per area rule; maintainer hardware sign-off still needed per PR body.
Main added the saved-pendant automatic reconnect (SavedPendantReconnect, manual-disconnect suppression, stale-bond recovery, launch arming). The merge keeps it for the primary Bluetooth device and keeps the branch's multi-device model: - DeviceService uses main's connectionBuilder/reconnect constructor; the connect path arms savedReconnectEnabled only for the primary and keeps the transport alive on timeouts and retryable failures. - disconnectDevice and forgetDevice are lock-free (forget waited out a 60 s launch connect on the per-device mutex); a connect that fails after its connection was removed rethrows without disposing twice. - initiateConnection arms the saved reconnect for the primary and keeps the one-shot launch connect for a companion the user has not disconnected. - Companion-slot preferences move to a PairedDeviceSlots extension and photo streaming to a capture part, keeping preferences.dart and capture_controller.dart at main's size. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
- Forget Device lets DeviceProvider.forgetDevice own the saved slots, so a paired companion is promoted and the device name follows it; forgetting the only device emits deviceChanges so the saved reconnect retires it. - Wedge recovery reconnects any saved device, not only the primary. - Forget and user disconnect bump a per-device release generation that a queued or in-flight connect checks before clearing the manual-disconnect flag or building a new connection. - NativeBleTransport does not manage a device released during its readiness check, and unmanages if disposed while manageDevice was in flight. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01L6nc4Dq4LXiSGCnJBvD7ix
kodjima33
left a comment
There was a problem hiding this comment.
Feature (simultaneous Omi + OmiGlass connection), not a bug fix -- approve only, do not merge. Large diff, needs-maintainer-review label present.
|
Verdict: strong, cohesive implementation — no blocking issues found; leaving the merge decision with the maintainers. Verified in the diff:
Agent-guidance note: this PR adds Performance/cost: a pendant+glasses session holds two BLE links and photos are base64-chunked over the existing listen socket — same channel as single-device OpenGlass, so no new spend surface; battery cost is inherent to running two devices. USER IMPACT: you can keep an Omi pendant and OmiGlass connected at the same time — glasses photos land in the same conversation as the pendant's audio, both batteries show in the header, and forgetting one device cleanly leaves the other. One remaining ask: I couldn't run the Flutter suite in my environment (no toolchain) and the visible CI on this head shows only the AI reviewer, so a green app-test run in CI on this head would close the last verification gap. This head already carries a human approval; final merge timing stays with the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- BtDevice.getDeviceInfo without a link returns BtDevice.empty() again when nothing is remembered, as on main. Returning the connected device there persisted it as the paired device and filled the page with device rows, which pushed the device_page perf gate over its layout/paint caps. - The second-device section is its own widget that selects only the companion state it shows, so DeviceProvider ticks no longer rebuild it. - Forget-from-settings tests mock configureSavedReconnect: main's DeviceService.forgetDevice now awaits it first, and an unanswered platform call parked the forget inside the widget test's fake clock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The Device page's "Pair second device" row now requires a remembered (paired) primary device instead of any live link. A never-paired link has nothing to add a companion to, and the row was the remaining extra layout work over main in the device_page perf gate, whose fixture connects an Omi without pairing it. - The multi-device role tests save the pendant and glasses before connecting them, as the pairing flow does. Without a saved record a connect without a live link reports BtDevice.empty() (main's behaviour, restored in the previous commit), which those tests relied on not happening. No assertion changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Verdict: this is a well-engineered, cohesive feature — the multi-device architecture is right and the test coverage is unusually good. One non-blocking correctness gap below; leaving the merge call to a human maintainer since it is a user-facing product feature and the current head has not yet been re-approved by a human. What I verified:
One gap (non-blocking): Performance: launch/auto-connect attempts now run in parallel per saved device (bounded at two); no new polling loops — the picker's while-paired discovery scan stops on page dispose. Cost: no new endpoints or API spend; photos reuse the existing listen socket. Security/privacy: BLE-only, no native (Swift/Kotlin) changes, no new data recipients — photo capture scope is unchanged from single-device OmiGlass, just coexistent. Blast radius: single-device users are affected via the refactored forget/pairing paths and Agent guidance note: this PR adds USER IMPACT: once paired, an Omi pendant and OmiGlass stay connected at the same time — the pendant records audio while the glasses contribute photos to the same conversation; the device page and home battery pill show both devices. Still wanted before merge: the companion status check above, and real-hardware confirmation of a pendant+glasses session (the evidence screenshots are headless-test renders, not device captures). Changelog fragment is present. Leaving for human maintainer review — product sign-off for shipping simultaneous Omi + OmiGlass capture, and the current head needs a fresh human approval. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Connect an Omi pendant and OmiGlass simultaneously so the pendant provides audio and the glasses provide photos to the same conversation. Fixes #2954.
789de5136cd124991e9956f9ff72891b3ad4416dwith a regular merge. Preserved current device-health telemetry, sync-only capture admission and uplink cancellation; queued role reconciliation retains its account-generation token. Localizations regenerated from merged ARBs.resolve_photo_conversation_sourcealready relabels conversations with photos asopenglass.secondDeviceis used by both companion settings headers. Existing name-based camera detection is centralized, not expanded.Validation
--concurrency=2.flutter test --concurrency=2 test/providers/device_provider_multi_device_test.dart test/services/capture/tiered_capture_test.dart test/services/capture/resume_sync_fence_test.dart— 33 passed (overlaps the initial run).bash app/scripts/analyze_ratchet.sh— passed.(cd app && python3 scripts/l10n.py check)— 49 locales / 3837 keys, generated freshness passed.Remaining validation and maintainer decisions
Real Omi + OmiGlass BLE behavior is unverified: confirm both stay connected, pendant transcript and glasses photos share one conversation, pendant loss/restoration transfers the audio role, camera start/stop follows role changes, and the stored source becomes
openglass. iOS/Android radio timing, the pairing/replace UX and audio-only mute semantics still need maintainer hardware sign-off. Host tests are not hardware evidence; mobile installation is coordinated separately.Product invariants affected
INV-CAP-1 — preserve the upstream audio-retention policy while selecting the audio device.
Failure-Class: none
Line-count exceptions
Merge formatter exception
The ordinary merge pre-commit hook ran. Unrelated imported-main formatter changes were then restored byte-for-byte to pinned
789de5136, and a user-authorized, one-command commit-hook override was used only for that restore-only amend. Git identity, conflict-marker checks and pinned formatting checks for authored paths passed manually. The full preflight and pre-push gates remain enabled.UI evidence
Host-rendered snapshots of the actual Flutter widgets using isolated test fixtures, bundled fonts and iOS theme. These are not phone/simulator captures or hardware sign-off.
Instruction-size follow-up: shortened only wording around inherited guidance and existing contract links after creating unique timestamp backups. The lean-guide and documentation-reference checks pass; all instructions and contract destinations remain intact.
The bounded pre-push gate, including the shared PR preflight, passed with all selected gates enabled and no bypass variables; branch pushed without force. Full CI/platform suites and physical hardware checks remain separate evidence.
Line-Count-Exception: app/lib/providers/device_provider.dart | 1663 -> 1916 | multi-device role reconciliation (per-device connections, audio/photo roles, companion battery) runs inside DeviceProvider's existing connect/disconnect lifecycle and launch arming, so it can't be split out without restructuring main's methods