Skip to content

feat(app): expose Omi haptic through local URL scheme - #13698

Merged
undivisible merged 21 commits into
BasedHardware:mainfrom
woahwhattheheck:feature/external-haptic-trigger-6716
Oct 19, 2026
Merged

undivisible merged 21 commits into
BasedHardware:mainfrom
woahwhattheheck:feature/external-haptic-trigger-6716

Conversation

@woahwhattheheck

@woahwhattheheck woahwhattheheck commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add an external haptic trigger for the paired Omi device via the app-owned URL schemes: omi://device/haptic?level=1, 2, or 3 (with omi-dev / omi-beta for those build identities).
  • Reuse the existing performPlayToSpeakerHaptic BLE primitive rather than adding a second device transport path.
  • Keep HTTPS universal links out of this command surface and fail closed for malformed levels, missing paired devices, and unavailable haptic transports.
  • Add hermetic unit coverage for production/dev/beta routing, HTTPS rejection, level validation, missing-device behavior, and unavailable transports.

This gives integrations and local agent workflows a small external-output primitive: an agent can signal “finished” or “needs attention” on the wearable without requiring the user to watch a screen.

  • Include app/changelog/unreleased/20261001-local-link-haptics.json: “Make your paired Omi buzz from local app links.”

Verification

Added app/test/unit/external_haptic_trigger_test.dart covering the core path and main error paths.

The focused mobile changelog check passed (Mobile changelog fragment found.). At head aa72ae3502a6addc275ec750d5231bd8c0f8f05e, GitHub Actions Hygiene and Formatting passed. Hygiene includes passing mobile-changelog-entry and mobile-changelog-data checks.

On October 4, the unchanged service and existing focused test from head aa72ae3502a6addc275ec750d5231bd8c0f8f05e were executed in a minimal Flutter package using repository-pinned Flutter 3.44.5: 8/8 cases passed and focused flutter analyze reported no issues. Source Git blob hashes were verified before execution. Execution logs · Evidence artifact. This verifies the self-contained service/unit-test only; the full application dependency graph, Android/iOS builds, BLE/device integration, and upstream mobile CI remain separate. The mobile Dart/test/build jobs on this head were skipped by upstream CI.

The dispatch path itself reuses the existing device connection haptic writer, which already has focused BLE write coverage in the repository.

Security / trust boundary

The new parser accepts only the app identities' custom URL schemes (omi, omi-dev, omi-beta) and does not treat HTTPS links as executable haptic commands. Levels are restricted to the firmware/app contract range 1–3.

Product invariants affected

  • None identified; this is an additive external action over the existing paired-device haptic primitive.

Failure class (fixes)

Failure-Class: none

Backend Hermetic Merge Gate

Out of scope: app-only Dart change; no backend or lockfile changes.

Fixes #6716

Review in cubic

@woahwhattheheck
woahwhattheheck force-pushed the feature/external-haptic-trigger-6716 branch from 9cb50c6 to 5f933ec Compare September 13, 2026 11:01

@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

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/lib/core/app_shell.dart Resolved
Comment thread app/lib/core/app_shell.dart Resolved

@woahwhattheheck woahwhattheheck left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exact-head review finding (19ca04d): the parser checks are strict, and current CI is green, but the new trust boundary still has an unbounded physical-actuator flood path. Production Android registers the omi URL scheme on an exported, BROWSABLE MainActivity, so other apps / browser navigation can invoke omi://device/haptic?.... openAppLink then calls ensureConnection(..., force: true) and immediately writes the haptic characteristic. In firmware, every haptic write calls play_haptic_milli, which cancels the pending haptic_off_work and schedules a new delayed-off timer; repeated level-3 links can therefore continuously extend motor-on time far beyond the nominal 500 ms command while also forcing BLE reconnection when disconnected.

Please bound this external command before merge—e.g. an app-side per-device cooldown / burst limiter (set before awaiting the connection/write so concurrent URI deliveries cannot race through it), or another explicit authorization/opt-in boundary that prevents arbitrary URL-scheme callers from driving an unbounded stream. Add a focused regression test proving rapid repeated external commands are rejected/coalesced rather than each reaching playHaptic. This preserves the intended local-agent notification use case without turning a BROWSABLE custom scheme into an unlimited wearable actuator/reconnect primitive.

@woahwhattheheck woahwhattheheck left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

SOURCE RED · exact successor 4ae37974a28afe2ddf1236d4bc7c96327b24655b · independent review by Z-LaplaceHarbor-913948-X7K4 (ZLH-X7K4) / GPT-5.6 Sol.

The successor materially closes the predecessor’s immediate concurrency hole: the per-device slot is reserved synchronously before the first awaited reconnect/write, exact-boundary timing is deterministic, and an unavailable/failed dispatch consumes the slot. The new test correctly proves an immediate second URI cannot race through while the first player Future is pending.

One stop-merge physical-output/reconnect class remains: the limiter bounds admission time, not in-flight dispatches. After cooldown elapses, a second URI is accepted even if the first playHaptic Future is still unresolved. On the real AppShell path that Future first awaits ServiceManager.instance().device.ensureConnection(deviceId, force: true). DeviceService.ensureConnection() holds its global _mutex across _connectToDevice() / connection.connect(). Therefore, during a slow/offline reconnect an external caller can feed one accepted haptic URI every two seconds; those calls can queue behind the device mutex. When the connection finally succeeds, the queued calls acquire the mutex in turn, see the now-connected transport, return it immediately, and then each executes performPlayToSpeakerHaptic(level) outside the mutex. That converts a rate-limited arrival stream into a delayed burst of physical BLE writes, and still permits a bounded-but-growing reconnect/request queue while the first operation is unresolved.

This is directly reproducible at the new helper boundary without BLE: hold the first playHaptic Completer pending; advance injected elapsed time to exactly 2s; invoke a second haptic for the same device. Current code admits the second call and invokes player a second time even though the first dispatch is still pending. The current hostile advances to 2s only after completing the first Future, so it misses this case.

Closure: make same-device dispatch single-flight in addition to the cooldown (e.g. reserve an in-flight flag synchronously and release it only after playHaptic completes, while preserving the cooldown timestamp so failed dispatches still consume a slot), or mechanically prevent a later admitted URI from reaching reconnect/write while an earlier one is pending. Add the deterministic hostile first pending -> elapsed >= cooldown -> second same-device URI => rateLimited/coalesced and player call count remains 1; then prove a later call is admitted only after first completion plus the intended cooldown semantics. Keep per-device independence if multiple devices are intentionally supported.

Positive findings: scheme/host/path/level parsing remains narrow; production AppShell uses the module-global limiter rather than constructing a fresh limiter; same-device immediate concurrency and failed-dispatch retry storms are materially improved. Current exact-head workflow truth at review: Web Checks, Desktop Swift CI, Repo Checks, Backend Hermetic E2E, Backend Checks, and Desktop Checks completed SUCCESS; Mobile App Checks was still IN_PROGRESS, so this review does not call the whole head green.

REVIEW ONLY. Source/ref/finalization stay with the PR owner. Any head move invalidates this verdict.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feature (new external haptic URL-scheme trigger), not a bug fix — per policy, features in app/mobile are approve-only, not merged. Scoped diff, custom-scheme-only (HTTPS explicitly rejected), tests added. No abuse signals.

@woahwhattheheck woahwhattheheck left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

SOURCE GREEN on exact successor a35e37271d3323b4c184071dad0f3c62267f1df3 — independent rereview by Z-NoetherSpindle-914044-L6P3 (ZNS-L6P3) / GPT-5.6 Sol.

The residual physical-output/reconnect class from review 5191017002 is mechanically closed on this head. ExternalHapticRateLimiter.tryAcquire() now rejects a same-device request whenever that device is already in _inFlight, before consulting the cooldown and before any awaited reconnect/write; the reservation is added synchronously at admission and released only in finally. _lastAcceptedAt is deliberately retained across release, so false-return and throwing dispatches still consume the cooldown rather than creating retry storms. The production path uses the module-global limiter, so repeated openAppLink() deliveries do not instantiate fresh state.

The new hostile is the exact prior counterexample: first playHaptic Future remains unresolved, injected monotonic elapsed advances to the full 2-second boundary, a second same-device URI returns rateLimited, and player call count remains 1. Only after the first Future completes and releases single-flight can another dispatch enter. A separate throw-path hostile proves finally releases _inFlight without erasing the cooldown timestamp. The parser remains narrowly restricted to the three app-owned schemes, exact device/haptic, and one canonical level in 1..3; HTTPS and repeated/noncanonical level encodings remain non-handled. The AppShell path still fails closed when no paired device/connection exists or the native BLE transport lacks the haptic characteristic.

I do not find a surviving source-level blocker in the predecessor flood/burst class on this exact SHA. This is a source verdict only; upstream maintainer policy/merge authority and hosted execution remain separate. Any head movement invalidates this review.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks for this — reviewed alongside the maintainer approval on this head. The implementation is clean: ExternalHapticTrigger.tryParse is strict (exact scheme/host/path, single canonical level in 1–3, rejects 0x2/02/duplicated params), and the rate limiter's synchronous admission + single-flight + cooldown-consumed-on-failure design is well covered by the new unit tests.

Two non-blocking observations:

  1. Capability guard only covers NativeBleTransport. In app_shell.dart the pre-write check is transport is NativeBleTransport && !transport.hasCharacteristic(...), but watch_transport.dart and rayban_meta_transport.dart both override writeCharacteristic as no-op successes, so on those transports performPlayToSpeakerHaptic returns true and the trigger reports played with nothing actually written. Cosmetic today since the result is only logged, but worth either extending the guard or noting it, in case the result is ever surfaced to users or callers.

  2. Doc nit: the omi/omi-dev/omi-beta schemes are pre-existing registrations (Android flavor manifests, iOS AUTH_CALLBACK_SCHEME) shared with OAuth callback handling. Since the haptic surface is only reachable because of that registration, a line in the PR description or integrator docs about platform registration would help anyone wiring up an agent integration.

Also verified the early return in openAppLink only swallows URIs the parser claims — OAuth callbacks (omi://todoist/callback?... etc.) can't collide with the device/haptic shape, so no regression there. Nice work reusing performPlayToSpeakerHaptic rather than adding a second transport path.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added the flutter flutter work label Sep 13, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

app/mobile feature (URL-scheme haptic trigger), not a bug fix — approve-only per confidence gate (features stay approve, no merge). Reviewed: scheme allowlist is custom (omi/omi-dev/omi-beta) only, HTTPS explicitly rejected, level validated 1-3, reuses existing BLE haptic primitive, hermetic tests added. No abuse signals.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

app/mobile feature (URL-scheme haptic trigger), not a bug fix — approve-only per confidence gate. Reviewed: scheme allowlist is custom-only (omi/omi-dev/omi-beta), HTTPS explicitly rejected, level validated 1-3, reuses existing BLE haptic primitive, hermetic tests added. No abuse signals.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-evaluated under current policy (backlog drain).

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mobile feature (URL-scheme haptic trigger), not a bug fix — approve-only per policy; reuses existing BLE primitive, has test coverage, fails closed on malformed input.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mobile feature (approve-only per policy — non-desktop features don't merge). Scoped, tested, no auth/secrets touched.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feature (new external haptic-trigger URL scheme for the paired device), not a bug fix. app/lib is mobile/cross-platform Flutter code, not desktop/ or app/macos/, so per policy this needs Nik's product call rather than an autonomous merge. CI green, scoped and well-tested; approve only.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mobile feature (haptic via local URL scheme), reuses existing BLE primitive, has unit tests, no auth/secret surface touched. Not desktop so no Summer Challenge ping; approve-only per confidence gate (feature, not a bug fix).

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

feat(app): new haptic URL-scheme trigger -- feature, approve-only per policy. No abuse signals (scheme allowlist, no HTTPS/credential surface).

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mobile feature (haptic via URL scheme), not a bug fix — approve-only per policy.

Watch and Ray-Ban transports no-op characteristic writes and still return success, so the external haptic URL reported played without a motor write. Only a native BLE transport that exposes the speaker haptic characteristic may proceed.
Restores app_shell.dart after an empty placeholder commit and keeps the external haptic path from reporting played on Watch or Ray-Ban transports, which no-op characteristic writes.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mobile feature (haptic via URL scheme), not a bug fix — approve-only per policy. Hygiene check failing but not a merge candidate anyway.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mobile feature (haptic trigger via local URL scheme), not a bug fix — approve only per policy, no merge. Note: Hygiene check is currently failing and this introduces a new externally-triggerable device-action surface worth a security glance.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the careful work here - the fail-closed design and the single-flight rate limiter are well done, and this head already carries maintainer approval. One mechanical blocker remains before merge.

Blocking: Hygiene mobile-changelog-entry is red on this head

App changes require an unreleased changelog fragment that travels with the commit. This PR adds a user-invokable capability (omi://device/haptic?level=1|2|3), so it should carry a real fragment under app/changelog/unreleased/ describing the new scheme; a {"kind": "none"} fragment is only appropriate for internal-only edits. Adding it turns the PR run and the post-merge push run green together.

Review notes on the changed files:

  • app/lib/services/external_haptic_trigger.dart - the parser is tight: allowlisted schemes (omi/omi-dev/omi-beta), host must be device, exactly one haptic path segment, a single canonical level in 1-3 (rejects 0x2, 02, %2B2, and repeated params). I particularly like that the rate limiter's admission timestamp survives a failed dispatch, so failed reconnect attempts still consume the 2s window instead of accumulating a burst.
  • app/lib/core/app_shell.dart - good if (!mounted) return guard after the await. The playHaptic callback fails closed unless the transport is NativeBleTransport and actually exposes the speaker haptic characteristic, which correctly sidesteps the Watch/Ray-Ban no-op writeCharacteristic trap where performPlayToSpeakerHaptic would report success without a motor write. The notHandled fall-through preserves the existing deep-link path.
  • app/lib/services/devices/transports/native_ble_transport.dart - the read-only hasCharacteristic wrapper is minimal and the fail-closed intent is documented at the call site and the method.
  • app/test/unit/external_haptic_trigger_test.dart - thorough coverage: scheme matrix, HTTPS rejection, non-canonical levels, no paired device, unavailable transport, single-flight past cooldown, cooldown-consumed-on-failure, and thrown-player release semantics.

One design note for the record (not blocking): custom URL schemes can be fired by any local app, and on Android indirectly by web content. The per-device cooldown plus fail-closed transport check keeps that surface to an occasional buzz on the user's own wearable with no data returned to the caller - fine for the linked use case (#6716), just worth revisiting if this family of omi://device/... commands grows.

Once the changelog fragment lands and Hygiene goes green, this looks merge-ready from my side; no further review needed.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

Add the user-facing release note required by PR BasedHardware#13698's mobile changelog gate.

Verification commands:
python3 .github/scripts/check-mobile-changelog.py --base f098880 --head HEAD
python3 .github/scripts/mobile-changelog.py validate
git diff --cached --check

Changelog checks use the repository scripts from upstream main at
8cdeea9.
Resolve the AppShell link-routing conflict by retaining the reviewed haptic
handler and upstream Home Screen widget routing. Preserve the reviewed
haptic service and unit-test blobs.

Verification commands:
python3 .github/scripts/check-mobile-changelog.py --base 8cdeea9 --head HEAD
python3 .github/scripts/mobile-changelog.py validate
git diff --check 8cdeea9...HEAD

Flutter is not installed in the local environment.

woahwhattheheck commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level The blocking mobile changelog requirement is now satisfied in this PR. app/changelog/unreleased/20261001-local-link-haptics.json contains the user-facing note: “Make your paired Omi buzz from local app links.”

At head aa72ae3502a6addc275ec750d5231bd8c0f8f05e, Hygiene and Formatting passed. Hygiene explicitly reports PASS mobile-changelog-entry and PASS mobile-changelog-data.

The branch also incorporates main while retaining both Home Screen link routing and the haptic handler. The reviewed haptic service and unit tests are preserved. The PR description now records these results; Flutter tests were not run locally, and mobile test/build jobs were skipped by CI.

Final status: PR Metadata Preflight also passed on this head. GitHub reports the PR as mergeable with a clean merge state.

@Git-on-my-level
Git-on-my-level dismissed their stale review October 2, 2026 23:41

Dismissing this changes-requested review: the missing mobile changelog fragment has been added (app/changelog/unreleased/20261001-local-link-haptics.json) and the Hygiene check, including mobile-changelog-entry, now passes on the current head.

@Git-on-my-level

Copy link
Copy Markdown
Member

The changelog blocker from the prior review is resolved — app/changelog/unreleased/20261001-local-link-haptics.json is in place in the same format as the existing fragments, and Hygiene (including mobile-changelog-entry) and Formatting are green on this head, so I've dismissed the outstanding changes-requested review.

The substantive implementation still looks good on re-read against the merged base: the strict URL grammar and scheme allowlist in external_haptic_trigger.dart, the per-device single-flight limiter that consumes its cooldown even on failed dispatch, and the fail-closed NativeBleTransport.hasCharacteristic gate in app_shell.dart before reusing performPlayToSpeakerHaptic all hold up, and the new unit suite covers the main error paths. Thanks also for keeping the merge of current main in the branch — that keeps the review surface to the five authored files.

Leaving the merge decision to the maintainers; re-adding positive-signal.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added the positive-signal Automation verified a genuine fix/quality contribution label Oct 2, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @woahwhattheheck — this is a carefully built change. Reviewed all five files on head aa72ae3; per-file notes:

  • app/lib/services/external_haptic_trigger.dart — the parser is strict in the right ways: scheme allowlist (omi/omi-dev/omi-beta), host must be device, exactly one haptic path segment, and exactly one canonical level in {1,2,3} (rejects 0x2, 02, +2, and duplicated params). The ExternalHapticRateLimiter is per-device single-flight, uses a monotonic stopwatch, reserves admission synchronously before any await, and consumes the 2s cooldown even on failed dispatch — that bounds reconnect/BLE-write churn from link floods. Nice touch keeping throw paths releasing single-flight via finally.
  • app/lib/core/app_shell.dart — dispatch at the top of openAppLink short-circuits only for handled haptic results, so all existing widget/OAuth routes are untouched. The fail-closed gate (transport is! NativeBleTransport || !transport.hasCharacteristic(...)) correctly prevents the Watch/Ray-Ban no-op writeCharacteristic implementations from reporting a false "played". I verified openAppLink is a _AppShellState method, so the mounted guard and Logger usage are valid.
  • app/lib/services/devices/transports/native_ble_transport.dart — the read-only hasCharacteristic wrapper around the existing private _hasCharacteristic is clean and doesn't alter any existing read/write behavior.
  • app/test/unit/external_haptic_trigger_test.dart — good hermetic coverage: all three schemes, HTTPS rejection, malformed levels, no-paired-device, unavailable transport, single-flight during a pending dispatch, cooldown consumption on failure, and throw-release semantics.
  • app/changelog/unreleased/20261001-local-link-haptics.json — valid single-fragment entry, user-facing wording.

One ask: the mobile Dart/Build/Formatting CI jobs were skipped on this head, so the new 240-line test file hasn't been executed by CI. Please confirm it runs (e.g. push a trivial update or trigger the mobile CI path) before merge.

For maintainers: this introduces a new externally-invokable actuation surface on the paired wearable (<scheme>://device/haptic). The implementation fails closed and the OS custom-scheme prompt plus the rate limiter bound abuse, so I don't see a technical blocker — but accepting this command surface as product direction (local agent/integration output primitive) is a maintainer call that needs sign-off on the current head before merge.


This review was drafted by an AI reviewing agent on behalf of the Omi maintainers. It reflects policy and code analysis, not a human decision.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added the needs-maintainer-review Needs a human maintainer to sign off before merge label Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Executed the existing focused haptic test against current head aa72ae3502a6addc275ec750d5231bd8c0f8f05e on October 4:

  • 8/8 existing cases passed, with no skipped cases.
  • Focused flutter analyze of the service and test completed with No issues found.
  • Flutter 3.44.5, matching the version pinned in this head's mobile CI.

Successful execution and complete logs · Evidence artifact

The runner downloaded the unchanged service and existing test from the exact commit, verified their Git blob hashes before execution (a8ea6e2c1c756502743161438476dd1c5ae06f76 and ebf2ee1456eee612469ef6b28104589df95988da), and placed them in a minimal Flutter package named omi. This avoids downloading the unrelated application dependency graph; neither file was rewritten or replaced with a stub.

flutter test --no-pub test/unit/external_haptic_trigger_test.dart --reporter expanded
flutter analyze --no-pub lib/services/external_haptic_trigger.dart test/unit/external_haptic_trigger_test.dart

The artifact contains the JSON test event stream, console/analyzer logs, source provenance, runtime version, and resolved harness lockfile. The cases cover supported schemes, HTTPS and malformed-level rejection, missing/unavailable devices, pending single-flight dispatch, failed-dispatch cooldown, and thrown-player cleanup.

This establishes execution of the existing self-contained unit test only—not the full app dependency graph, Android/iOS builds, BLE/device integration, or a replacement for upstream CI. The original PR branch remains unchanged at aa72ae35; no CI-tier labels or merge gates were changed.

@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks @woahwhattheheck — the test-execution ask from the prior review is resolved. The evidence run is tied to this exact head (blob hashes a8ea6e2c for app/lib/services/external_haptic_trigger.dart and ebf2ee14 for app/test/unit/external_haptic_trigger_test.dart match the PR files), 8/8 cases pass, and focused flutter analyze is clean on Flutter 3.44.5.

I also re-verified the dispatch wiring against main: ensureConnection(id, force:) is used identically elsewhere, and the NativeBleTransport-only gate is genuinely necessary because the Watch/Ray-Ban transports' writeCharacteristic is a no-op that would otherwise report a false "played".

No technical blockers remain from my side. What's left is maintainer product sign-off on the current head: the approvals on record predate aa72ae3, and this PR adds a new externally-invokable actuation surface (omi://device/haptic) on the paired wearable — a direction call on a local agent/integration output primitive rather than a code-correctness question. The fail-closed parser, transport gate, and per-device rate limiter bound the misuse surface well.


This comment was drafted by an AI reviewing agent on behalf of the Omi maintainers. It reflects policy and code analysis, not a human decision.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@undivisible
undivisible merged commit d96b02c into BasedHardware:main Oct 19, 2026
51 checks passed
kodjima33 pushed a commit that referenced this pull request Oct 20, 2026
AppShell listens to app links through `uriLinkStream.distinct()`, which
drops any link equal to the one before it. #13698 routes
`omi://device/haptic?level=N` through the same stream, so the second
identical haptic link (an agent signalling "done" again, a Shortcut run
twice) never reaches runExternalHapticTrigger: no buzz, no log line.
Changing the level makes it work again, which is how it shows up.

Haptic links are commands, so they now pass the dedupe; the trigger's
2s rate limiter already bounds bursts. Every other link is still
deduped as before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose haptic motor through Developer API / external trigger

4 participants