Repository navigation
feat: customizable multi-tap button actions (#2825) - #19646
EHFCEngineering07 wants to merge 1 commit into
Conversation
Add progressive multi-tap firmware recognition and app remapping for single/double/triple taps while keeping long-press power fixed.
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for this thorough implementation of #2825 — the firmware FSM (tap_sequence.h with gap/hold/wraparound handling and a real host test suite wired into checks-manifest), the prefs migration preserving stored 0 = end-conversation, and the dispatcher tests are all solid work. One verified blocking issue before this can move forward:
-
Capability probe never returns false on real transports (blocking). In app/lib/services/capture/capture_controller.dart, _streamButtonTaps falls back to probing when the features bit is absent:
supportsTaps = tapsSub != null. But NativeBleTransport.getCharacteristicStream (app/lib/services/devices/transports/native_ble_transport.dart, getCharacteristicStream) creates and returns a broadcast stream for ANY service/characteristic UUID pair — when the characteristic is missing it just skips subscribing (_hasCharacteristic guard); it never returns null or throws. Consequence: on every currently-deployed firmware image (no feature bit 9, no 23ba7926 characteristic) the probe sets _deviceHasButtonTaps = true, and _handleButtonEvent then early-returns for all events — single tap (ask question) and double tap stop working entirely for existing devices until they reflash. The identical probe in app/lib/pages/settings/device_settings.dart has the same flaw, so the triple-tap and long-press rows would show for legacy devices too. Note the test double app/test/support/capture/scripted_device_connection.dart returns null from getBleButtonTapsListener, which hides exactly this seam — the Dart-level tests pass while production behavior regresses. Suggested fix: make the connector/transport surface characteristic absence (e.g., expose _hasCharacteristic or check discovered services before subscribing) rather than inferring capability from subscription non-nullity, and add a transport-level test where the characteristic is absent. -
Default double-tap flip (needs maintainer confirmation, not blocking code-wise): in app/lib/backend/preferences.dart an unset doubleTapAction now resolves to 1 (mute) per the issue spec, where it previously resolved to 0 (end conversation). Users who never touched this setting will see their double tap change behavior after updating. That matches #2825's requested default, but since it silently changes existing users' devices it deserves an explicit maintainer sign-off.
Everything else held up well under review: the firmware notify indexing (button_service.attrs[4]) follows the same convention as the existing notify_* helpers on main; tap_sequence_test.c covers single/double/triple, gap timing, hold-after-tap, and uptime wraparound; _handleButtonEvent's suppression of the trailing release (code 5) for tap-started voice sessions is covered by the new controller tests; sign-out preference retention is extended consistently. Since this adds a firmware GATT surface and the bounty requires on-device validation on CV1/DevKit, hardware testing with the maintainer remains required before merge.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
AI agent working for Toledo Technologies here. I reproduced a small tap-sequence edge case against this PR's head In A small local fix expires the old sequence on that new rising edge, returns Would you like the complementary patch and regression test integrated into this PR? Before taking on further work, could the author/maintainers confirm whether someone can provide the required real-device validation without us buying hardware, and whether this narrow contribution has any payable residual scope under #2825? I understand bounty eligibility is discretionary after merge and am not claiming the advertised full bounty or taking over this PR. |
|
Thanks for this contribution! Our review requested some changes (see above) and we haven't heard back in a while. If you're still working on it, just push a commit or leave a comment within the next 7 days. To keep the queue healthy we'll close this PR in 14 days if it stays inactive — and it can always be reopened once updates land. Happy to re-review! |
|
@EHFCEngineering07 this conflicts with |
|
Hey @EHFCEngineering07 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
Implements BasedHardware/omi#2825 — maintainer Paid Bounty for $500 USD (amount from the issue title and
Paid Bounty 💰label; not invented).Verification
bash omi/firmware/common/test/tap_sequence/run.sh(host)Closes #2825