Repository navigation
fix(app): let a repeated Omi haptic link buzz every time - #22718
Conversation
AppShell listens to app links through `uriLinkStream.distinct()`, which drops any link equal to the one before it. BasedHardware#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.
|
This is a correct, tightly scoped fix — no blocking issues from me.
Security: the deep-link → haptic surface already existed (#13698); this only removes adjacent-dedupe, and the rate limiter still caps it at one buzz per 2s per device. No new attack surface. USER IMPACT: sending the same Omi haptic link again now buzzes the device again; every other app link behaves exactly as before. Nothing further required from my side — leaving merge sign-off to a human maintainer. Automated maintainer feedback 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.
Scoped mobile bug fix (24 lines) for haptic link dedupe with clear repro table and new test; 5/5 confidence, CI green.
What's wrong
AppShell listens to app links through a deduped stream:
distinct()drops any link equal to the previous one. #13698 sendsomi://device/haptic?level=Nthrough this same stream, so the second identical haptic link never reachesrunExternalHapticTrigger: no buzz and no "External haptic trigger result" log line. That is the feature's main use (an agent signalling "done" again, a Shortcut run twice); the trigger's 2 s rate limiter exists because repeats are expected. Changing the level makes it work again, which hides the cause. app_links 6.4.1 emits every opened URL on iOS with no dedupe of its own, so thedistinct()is the only filter.haptic?level=2,haptic?level=2haptic?level=2,haptic?level=3app/settings,app/settingsChange
isRepeatedAppLinkinexternal_haptic_trigger.dartkeeps the dedupe for every link except a haptic command, and AppShell passes it todistinct. Bursts stay bounded by the existing rate limiter.Tests
test/unit/external_haptic_trigger_test.dart, group "app link stream":distinct()passes one);omi://app/settingsis still dropped, also around a haptic link.The existing trigger and rate limiter tests pass unchanged.
UI-Evidence: none -- no visible UI; the fix lets a repeated link reach the device haptic.
Failure-Class: none